]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'read_auxv' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
eac215cc
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's read_auxv op into a method of
4 process_target.
5
6 * target.h (class process_stratum_target): Remove the target op.
7 (struct process_target): Add the target op. Also add
8 'supports_read_auxv'.
9 * target.cc (process_target::read_auxv): Define.
10 (process_target::supports_read_auxv): Define.
11
12 Update the derived classes and callers below.
13
14 * server.cc (handle_qxfer_auxv): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_read_auxv): Define.
18 (linux_read_auxv): Turn into ...
19 (linux_process_target::read_auxv): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 (nto_process_target::supports_read_auxv): Define.
24 (nto_read_auxv): Turn into ...
25 (nto_process_target::read_auxv): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
28
eb497a2a
TBA
292020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
30
31 Turn process_stratum_target's request_interrupt op into a method of
32 process_target.
33
34 * target.h (struct process_stratum_target): Remove the target op.
35 (class process_target): Add the target op.
36
37 Update the derived classes and callers below.
38
39 * remote-utils.cc (putpkt_binary_1): Update.
40 (input_interrupt): Update.
41 (getpkt): Update.
42 * server.cc (handle_v_requests): Update.
43 * linux-low.cc (linux_target_ops): Update.
44 (linux_request_interrupt): Turn into ...
45 (linux_process_target::request_interrupt): ... this.
46 * linux-low.h (class linux_process_target): Update.
47 * lynx-low.cc (lynx_target_ops): Update.
48 (lynx_request_interrupt): Turn into ...
49 (lynx_process_target::request_interrupt): ... this.
50 * lynx-low.h (class lynx_process_target): Update.
51 * nto-low.cc (nto_target_ops): Update.
52 (nto_request_interrupt): Turn into ...
53 (nto_process_target::request_interrupt): ... this.
54 * nto-low.h (class nto_process_target): Update.
55 * win32-low.cc (win32_target_ops): Update.
56 (win32_request_interrupt): Turn into ...
57 (win32_process_target::request_interrupt): ... this.
58 * win32-low.h (class win32_process_target): Update.
59
2a31c7aa
TBA
602020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
61
62 Turn process_stratum_target's look_up_symbols op into a method of
63 process_target.
64
65 * target.h (struct process_stratum_target): Remove the target op.
66 (class process_target): Add the target op.
67 * target.cc (process_target::look_up_symbols): Define.
68
69 Update the derived classes and callers below.
70
71 * server.cc (handle_query): Update.
72 * linux-low.cc (linux_target_ops): Update.
73 (linux_look_up_symbols): Turn into ...
74 (linux_process_target::look_up_symbols): ... this.
75 * linux-low.h (class linux_process_target): Update.
76 * lynx-low.cc (lynx_target_ops): Update.
77 * nto-low.cc (nto_target_ops): Update.
78 * win32-low.cc (win32_target_ops): Update.
79
e2558df3
TBA
802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
81
82 Turn process_stratum_target's read_memory and write_memory
83 ops into methods of process_target.
84
85 * target.h (struct process_stratum_target): Remove the target ops.
86 (class process_target): Add the target ops.
87
88 Update the derived classes and callers below.
89
90 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
91 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
92 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
93 (arm_get_syscall_trapinfo): Update.
94 * linux-cris-low.cc (cris_breakpoint_at): Update.
95 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
96 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
97 * linux-mips-low.cc (mips_breakpoint_at): Update.
98 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
99 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
100 * linux-sh-low.cc (sh_breakpoint_at): Update.
101 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
102 (sparc_store_gregset_from_stack): Update.
103 (sparc_breakpoint_at): Update.
104 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
105 * linux-tile-low.cc (tile_breakpoint_at): Update.
106 * linux-x86-low.cc (x86_breakpoint_at): Update.
107 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
108 * mem-brea.cc (insert_memory_breakpoint): Update.
109 (validate_inserted_breakpoint): Update.
110 * target.cc (read_inferior_memory): Update.
111 (target_write_memory): Update.
112 * linux-low.cc (linux_target_ops): Update.
113 (linux_read_memory): Make a wrapper around the read_memory target
114 op call.
115 (linux_process_target::read_memory): Rename from linux_read_memory.
116 (linux_write_memory): Turn into ...
117 (linux_process_target::write_memory): ... this.
118 * linux-low.h (class linux_process_target): Update.
119 * lynx-low.cc (lynx_target_ops): Update.
120 (lynx_read_memory): Turn into ...
121 (lynx_process_target::read_memory): ... this.
122 (lynx_write_memory): Turn into ...
123 (lynx_process_target::write_memory): ... this.
124 * lynx-low.h (class lynx_process_target): Update.
125 * nto-low.cc (nto_target_ops): Update.
126 (nto_read_memory): Turn into ...
127 (nto_process_target::read_memory): ... this.
128 (nto_write_memory): Turn into ...
129 (nto_process_target::write_memory): ... this.
130 * nto-low.h (class nto_process_target): Update.
131 * win32-low.cc (win32_target_ops): Update.
132 (win32_read_inferior_memory): Turn into ...
133 (win32_process_target::read_memory): ... this.
134 (win32_write_inferior_memory): Turn into ...
135 (win32_process_target::write_memory): ... this.
136 * win32-low.h (class win32_process_target): Update.
137
79b44087
TBA
1382020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
139
140 Turn process_stratum_target's prepare_to_access_memory and
141 done_accessing_memory ops into methods of process_target.
142
143 * target.h (struct process_stratum_target): Remove the target ops.
144 (class process_target): Add the target ops.
145 * target.cc (process_target::prepare_to_access_memory): Define.
146 (process_target::done_accessing_memory): Define.
147 (prepare_to_access_memory): Update.
148 (done_accessing_memory): Update.
149
150 Update the derived classes and callers below.
151
152 * linux-low.cc (linux_target_ops): Update.
153 (linux_prepare_to_access_memory): Turn into ...
154 (linux_process_target::prepare_to_access_memory): ... this.
155 (linux_done_accessing_memory): Turn into ...
156 (linux_process_target::done_accessing_memory): ... this.
157 * linux-low.h (class linux_process_target): Update.
158 * lynx-low.cc (lynx_target_ops): Update.
159 * nto-low.cc (nto_target_ops): Update.
160 * win32-low.cc (win32_target_ops): Update.
161
a5a4d4cd
TBA
1622020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
163
164 Turn process_stratum_target's fetch_registers and store_registers
165 ops into methods of process_target.
166
167 * target.h (struct process_stratum_target): Remove the target ops.
168 (class process_target): Add the target ops.
169 (fetch_inferior_registers): Update the macro.
170 (store_inferior_registers): Update the macro.
171
172 Update the derived classes and callers below.
173
174 * linux-low.cc (linux_target_ops): Update.
175 (linux_fetch_registers): Turn into ...
176 (linux_process_target::fetch_registers): ... this.
177 (linux_store_registers): Turn into ...
178 (linux_process_target::store_registers): ... this.
179 * linux-low.h (class linux_process_target): Update.
180 * lynx-low.cc (lynx_target_ops): Update.
181 (lynx_fetch_registers): Turn into ...
182 (lynx_process_target::fetch_registers): ... this.
183 (lynx_store_registers): Turn into ...
184 (lynx_process_target::store_registers): ... this.
185 * lynx-low.h (class lynx_process_target): Update.
186 * nto-low.cc (nto_target_ops): Update.
187 (nto_fetch_registers): Turn into ...
188 (nto_process_target::fetch_registers): ... this.
189 (nto_store_registers): Turn into ...
190 (nto_process_target::store_registers): ... this.
191 * nto-low.h (class nto_process_target): Update.
192 * win32-low.cc (win32_target_ops): Update.
193 (win32_fetch_inferior_registers): Turn into ...
194 (win32_process_target::fetch_registers): ... this.
195 (win32_store_inferior_registers): Turn into ...
196 (win32_process_target::store_registers): ... this.
197 * win32-low.h (class win32_process_target): Update.
198
6532e7e3
TBA
1992020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
200
201 Turn process_stratum_target's wait op into a method of
202 process_target.
203
204 * target.h (struct process_stratum_target): Remove the target op.
205 (class process_target): Add the target op.
206
207 Update the derived classes and callers below.
208
209 * target.cc (target_wait): Update.
210 * linux-low.cc (linux_target_ops): Update.
211 (linux_wait): Turn into ...
212 (linux_process_target::wait): ... this.
213 * linux-low.h (class linux_process_target): Update.
214 * lynx-low.cc (lynx_target_ops): Update.
215 (lynx_wait): Turn into ...
216 (lynx_process_target::wait): ... this.
217 * lynx-low.h (class lynx_process_target): Update.
218 * nto-low.cc (nto_target_ops): Update.
219 (nto_wait): Turn into ...
220 (nto_process_target::wait): ... this.
221 * nto-low.h (class nto_process_target): Update.
222 * win32-low.cc (win32_target_ops): Update.
223 (win32_wait): Turn into ...
224 (win32_process_target::wait): ... this.
225 (do_initial_child_stuff): Update.
226 * win32-low.h (class win32_process_target): Update.
227
0e4d7e35
TBA
2282020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
229
230 Turn process_stratum_target's resume op into a method of
231 process_target.
232
233 * target.h (struct process_stratum_target): Remove the target op.
234 (class process_target): Add the target op.
235
236 Update the derived classes and callers below.
237
238 * server.cc (resume): Update.
239 * target.cc (target_stop_and_wait): Update.
240 (target_continue_no_signal): Update.
241 (target_continue): Update.
242 * linux-low.cc (linux_target_ops): Update.
243 (linux_resume): Turn into ...
244 (linux_process_target::resume): ... this.
245 * linux-low.h (class linux_process_target): Update.
246 * lynx-low.cc (lynx_target_ops): Update.
247 (lynx_resume): Turn into ...
248 (lynx_process_target::resume): ... this.
249 * lynx-low.h (class lynx_process_target): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 (nto_resume): Turn into ...
252 (nto_process_target::resume): ... this.
253 * nto-low.h (class nto_process_target): Update.
254 * win32-low.cc (win32_target_ops): Update.
255 (win32_resume): Turn into ...
256 (win32_process_target::resume): ... this.
257 (win32_process_target::detach): Update.
258 (do_initial_child_stuff): Update.
259 * win32-low.h (class win32_process_target): Update.
260
13d3d99b
TBA
2612020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
262
263 Turn process_stratum_target's thread_alive op into a method of
264 process_target.
265
266 * target.h (struct process_stratum_target): Remove the target op.
267 (class process_target): Add the target op.
268 (mythread_alive): Update the macro.
269
270 Update the derived classes and callers below.
271
272 * linux-low.cc (linux_target_ops): Update.
273 (linux_thread_alive): Turn into ...
274 (linux_process_target::thread_alive): ... this.
275 (wait_for_sigstop): Update.
276 * linux-low.h (class linux_process_target): Update.
277 * lynx-low.cc (lynx_target_ops): Update.
278 (lynx_thread_alive): Turn into ...
279 (lynx_process_target::thread_alive): ... this.
280 * lynx-low.h (class lynx_process_target): Update.
281 * nto-low.cc (nto_target_ops): Update.
282 (nto_thread_alive): Turn into ...
283 (nto_process_target::thread_alive): ... this.
284 * nto-low.h (class nto_process_target): Update.
285 * win32-low.cc (win32_target_ops): Update.
286 (win32_thread_alive): Turn into ...
287 (win32_process_target::thread_alive): ... this.
288 * win32-low.h (class win32_process_target): Update.
289
95a49a39
TBA
2902020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
291
292 Turn process_stratum_target's join op into a method of
293 process_target.
294
295 * target.h (struct process_stratum_target): Remove the target op.
296 (class process_target): Add the target op.
297 (join_inferior): Update the macro.
298
299 Update the derived classes and callers below.
300
301 * linux-low.cc (linux_target_ops): Update.
302 (linux_join): Turn into ...
303 (linux_process_target::join): ... this.
304 * linux-low.h (class linux_process_target): Update.
305 * lynx-low.cc (lynx_target_ops): Update.
306 (lynx_join): Turn into ...
307 (lynx_process_target::join): ... this.
308 * lynx-low.h (class lynx_process_target): Update.
309 * nto-low.cc (nto_target_ops): Update.
310 (nto_process_target::join): Define.
311 * nto-low.h (class nto_process_target): Update.
312 * win32-low.cc (win32_target_ops): Update.
313 (win32_join): Turn into ...
314 (win32_process_target::join): ... this.
315 * win32-low.h (class win32_process_target): Update.
316
8adb37b9
TBA
3172020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
318
319 Turn process_stratum_target's mourn op into a method of
320 process_target.
321
322 * target.h (struct process_stratum_target): Remove the target op.
323 (class process_target): Add the target op.
324
325 Update the derived classes and callers below.
326
327 * target.cc (target_mourn_inferior): Update.
328 * linux-low.cc (linux_target_ops): Update.
329 (linux_mourn): Turn into ...
330 (linux_process_target::mourn): ... this.
331 (handle_extended_wait): Update.
332 (linux_process_target::kill): Update.
333 (linux_process_target::detach): Update.
334 * linux-low.h (class linux_process_target): Update.
335 * lynx-low.cc (lynx_target_ops): Update.
336 (lynx_mourn): Turn into ...
337 (lynx_process_target::mourn): ... this.
338 * lynx-low.h (class lynx_process_target): Update.
339 * nto-low.cc (nto_target_ops): Update.
340 (nto_mourn): Turn into ...
341 (nto_process_target::mourn): ... this.
342 * nto-low.h (class nto_process_target): Update.
343 * win32-low.cc (win32_target_ops): Update.
344 (win32_mourn): Turn into ...
345 (win32_process_target::mourn): ... this.
346 * win32-low.h (class win32_process_target): Update.
347
9061c9cf
TBA
3482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349
350 Turn process_stratum_target's detach op into a method of
351 process_target.
352
353 * target.h (struct process_stratum_target): Remove the target op.
354 (class process_target): Add the target op.
355 (detach_inferior): Update the macro.
356
357 Update the derived classes and callers below.
358
359 * linux-low.cc (linux_target_ops): Update.
360 (linux_detach): Turn into ...
361 (linux_process_target::detach): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 (lynx_detach): Turn into ...
365 (lynx_process_target::detach): ... this.
366 * lynx-low.h (class lynx_process_target): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 (nto_detach): Turn into ...
369 (nto_process_target::detach): ... this.
370 * nto-low.h (class nto_process_target): Update.
371 * win32-low.cc (win32_target_ops): Update.
372 (win32_detach): Turn into ...
373 (win32_process_target::detach): ... this.
374 * win32-low.h (class win32_process_target): Update.
375
c6885a57
TBA
3762020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
377
378 Turn process_stratum_target's kill op into a method of
379 process_target.
380
381 * target.h (struct process_stratum_target): Remove the target op.
382 (class process_target): Add the target op.
383
384 Update the derived classes and callers below.
385
386 * target.cc (kill_inferior): Update.
387 * linux-low.cc (linux_target_ops): Update.
388 (linux_kill): Turn into ...
389 (linux_process_target::kill): ... this.
390 * linux-low.h (class linux_process_target): Update.
391 * lynx-low.cc (lynx_target_ops): Update.
392 (lynx_kill): Turn into ...
393 (lynx_process_target::kill): ... this.
394 * lynx-low.h (class lynx_process_target): Update.
395 * nto-low.cc (nto_target_ops): Update.
396 (nto_kill): Turn into ...
397 (nto_process_target::kill): ... this.
398 * nto-low.h (class nto_process_target): Update.
399 * win32-low.cc (win32_target_ops): Update.
400 (win32_kill): Turn into ...
401 (win32_process_target::kill): ... this.
402 * win32-low.h (class win32_process_target): Update.
403
ef03dad8
TBA
4042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
405
406 Turn process_stratum_target's attach op into a method of
407 process_target.
408
409 * target.h (struct process_stratum_target): Remove the target op.
410 (class process_target): Add the target op.
411 (myattach): Update the macro.
412
413 Update the derived classes and callers below.
414
415 * linux-low.cc (linux_target_ops): Update.
416 (linux_attach): Turn into ...
417 (linux_process_target::attach): ... this.
418 * linux-low.h (class linux_process_target): Update.
419 * lynx-low.cc (lynx_target_ops): Update.
420 (lynx_attach): Turn into ...
421 (lynx_process_target::attach): ... this.
422 * lynx-low.h (class lynx_process_target): Update.
423 * nto-low.cc (nto_target_ops): Update.
424 (nto_attach): Turn into ...
425 (nto_process_target::attach): ... this.
426 * nto-low.h (class nto_process_target): Update.
427 * win32-low.cc (win32_target_ops): Update.
428 (win32_attach): Turn into ...
429 (win32_process_target::attach): ... this.
430 * win32-low.h (class win32_process_target): Update.
431
6dee9afb
TBA
4322020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
433
434 Turn process_stratum_target's post_create_inferior op into a method
435 of process_target.
436
437 * target.h (struct process_stratum_target): Remove the target op.
438 (class process_target): Add the target op.
439 (target_post_create_inferior): Update the macro.
440 * target.cc (process_target::post_create_inferior): Define.
441
442 Update the derived classes and callers below.
443
444 * linux-low.cc (linux_target_ops): Update.
445 (linux_post_create_inferior): Turn into ...
446 (linux_process_target::post_create_inferior): ... this.
447 * linux-low.h (class linux_process_target): Update.
448 * lynx-low.cc (lynx_target_ops): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 * win32-low.cc (win32_target_ops): Update.
451
15295543
TBA
4522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
453
454 Turn process_stratum_target's create_inferior op into a method of
455 process_target.
456
457 * target.h (struct process_stratum_target): Remove the target op.
458 (class process_target): Add the target op.
459 (create_inferior): Rename the macro to ...
460 (target_create_inferior): ... this.
461
462 Update the derived classes and callers below.
463
464 * server.cc (handle_v_run): Update.
465 (captured_main): Update.
466 (process_serial_event): Update.
467 * linux-low.cc (linux_target_ops): Update.
468 (linux_create_inferior): Turn into ...
469 (linux_process_target::create_inferior): ... this.
470 * linux-low.h (class linux_process_target): Update.
471 * lynx-low.cc (lynx_target_ops): Update.
472 (lynx_create_inferior): Turn into ...
473 (lynx_process_target::create_inferior): ... this.
474 * lynx-low.h (class lynx_process_target): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 (nto_create_inferior): Turn into ...
477 (nto_process_target::create_inferior): ... this.
478 * nto-low.h (class nto_process_target): Update.
479 * win32-low.cc (win32_target_ops): Update.
480 (win32_create_inferior): Turn into ...
481 (win32_process_target::create_inferior): ... this.
482 * win32-low.h (class win32_process_target): Update.
483
5ef9273d
TBA
4842020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
485
486 * target.h (class process_target): New class definition.
487 (struct process_stratum_target) <pt>: New field with type
488 'process_target*'.
489 * linux-low.h (class linux_process_target): Define as a derived
490 class of 'process_target'.
491 * linux-low.cc (linux_target_ops): Add a linux_process_target*
492 as the 'pt' field.
493 * lynx-low.h (class lynx_process_target): Define as a derived
494 class of 'process_target'.
495 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
496 as the 'pt' field.
497 * nto-low.h (class nto_process_target): Define as a derived
498 class of 'process_target'.
499 * nto-low.cc (nto_target_ops): Add an nto_process_target*
500 as the 'pt' field.
501 * win32-low.h (class win32_process_target): Define as a derived
502 class of 'process_target'.
503 * win32-low.cc (win32_target_ops): Add a win32_process_target*
504 as the 'pt' field.
505
9f1528a1
AB
5062020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
507
508 * configure: Regenerate.
509
bf84f706
MR
5102020-02-19 Maciej W. Rozycki <macro@wdc.com>
511 Andrew Burgess <andrew.burgess@embecosm.com>
512
513 * linux-riscv-low.cc: New file.
514 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
515 and nat/riscv-linux-tdesc.c.
516 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
517 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
518 Define.
519
1a627e7e
TT
5202020-02-14 Tom Tromey <tom@tromey.com>
521
522 * acinclude.m4: Don't include acx_configure_dir.m4.
523 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
524 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
525 (all, install-only, uninstall, clean-info, clean)
526 (maintainer-clean): Don't recurse.
527 (subdir_do, all-lib): Remove.
528 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
529 (GNULIB_H): Remove.
530 (generated_files): Update.
531 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
532 * configure: Rebuild.
533 * configure.ac: Don't configure gnulib or libiberty.
534 (GNULIB): Update.
535
a9b34532
EZ
5362020-02-14 Eli Zaretskii <eliz@gnu.org>
537
538 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
539 preparing the command line for CreateProcess.
540 (win32_create_inferior): Reflect the program name in debugging
541 output that shows the process and its command line.
542
feacfcac
SM
5432020-02-13 Simon Marchi <simon.marchi@efficios.com>
544
545 * Makefile.in: Rename source files from .c to .cc.
546 * %.c: Rename to %.cc.
547 * configure.ac: Rename server.c to server.cc.
548 * configure: Re-generate.
549
06b3c5bd
SM
5502020-02-13 Simon Marchi <simon.marchi@efficios.com>
551
552 * Makefile.in: Rename gdbsupport source files from .c to .cc.
553
052793ad
HD
5542020-02-12 Hannes Domani <ssbssa@yahoo.de>
555
556 * win32-low.c (win32_create_inferior): Set signal_pid.
557
f20e3e82
MR
5582020-02-12 Maciej W. Rozycki <macro@wdc.com>
559 Pedro Alves <palves@redhat.com>
560
561 Skip building gdbserver in a cross-configuration.
562 * configure.srv: Set $gdbserver_host depending on whether $target
563 is $host. Use $gdbserver_host instead of $host.
564
8ddd8e0e
SM
5652020-02-11 Simon Marchi <simon.marchi@efficios.com>
566
567 * configure: Re-generate.
568
898e7f60
SM
5692020-02-11 Simon Marchi <simon.marchi@efficios.com>
570
571 * configure: Re-generate.
572
58df732b
SM
5732020-02-11 Simon Marchi <simon.marchi@efficios.com>
574
575 * acinclude.m4: Update warning.m4 path.
576
7928d571
HD
5772020-02-09 Hannes Domani <ssbssa@yahoo.de>
578
579 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
580 (handle_exception): Set siginfo_er.
581 (win32_xfer_siginfo): New function.
582
919adfe8
TT
5832020-02-07 Tom Tromey <tom@tromey.com>
584 Pedro Alves <palves@redhat.com>
585
586 * README: Update build documentation.
587 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
588 host, not target.
589 * configure.ac: Update paths.
590 * configure: Rebuild.
591 * acinclude.m4: Update paths.
592 * Makefile.in: Update include paths.
593 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
594 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
595 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
596 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
597 (%-generated.c): Update paths.
598 * Move entire directory from ../gdb/gdbserver.
599
287c844a
MR
6002020-01-29 Maciej W. Rozycki <macro@wdc.com>
601
602 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
603
548a204f
PFC
6042020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
605
606 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
607 assignment instead of srv_linux_obj.
608
a2236a08
HD
6092020-01-28 Hannes Domani <ssbssa@yahoo.de>
610
611 * server.c (handle_qxfer_libraries): Write segment-address with
612 paddress.
613
bdaed379
HD
6142020-01-24 Hannes Domani <ssbssa@yahoo.de>
615
616 * Makefile.in (install-strip): New target.
617 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
618 * aclocal.m4: Regenerate.
619 * configure: Regenerate.
620 * configure.ac: Add AM_PROG_INSTALL_STRIP.
621
42cd72aa
MR
6222020-01-24 Maciej W. Rozycki <macro@wdc.com>
623
624 * Makefile.in (SFILES): Adjust paths to point to real files.
625 (OBS): Move waitstatus.o to target/waitstatus.o.
626 (TAGS): Transform paths appropriately.
627 (%.o): Rename to...
628 (nat/%.o): ... this pattern rule.
629 (%.o): Rename to...
630 (target/%.o): ... this pattern rule.
631 * configure.srv: Adjust paths throughout to include nat/ prefix
632 with the revant files.
633 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
634 * configure: Regenerate.
635
42ba50ec
MR
6362020-01-24 Maciej W. Rozycki <macro@wdc.com>
637
638 * Makefile.in (TAGS): Remove config files from the recipe.
639
05ea2a05
TT
6402020-01-14 Tom Tromey <tom@tromey.com>
641
642 * configure: Rebuild.
643 * configure.ac: Remove any checks that were added to common.m4.
644 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
645 lib-link.m4.
646
01027315
TT
6472020-01-14 Tom Tromey <tom@tromey.com>
648
649 * server.h: Include config.h.
650 * gdbreplay.c: Include config.h.
651 * configure: Rebuild.
652 * configure.ac: Don't source common.host.
653 * acinclude.m4: Update path.
654 * Makefile.in (INCSUPPORT): New variable.
655 (INCLUDE_CFLAGS): Add INCSUPPORT.
656 (SFILES): Update paths.
657 (version-generated.c): Update path to create-version.sh.
658 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
659
b2ceabe8
TT
6602020-01-14 Tom Tromey <tom@tromey.com>
661
662 * configure.ac (LIBS): Use WIN32APILIBS.
663 (USE_WIN32API): Don't define.
664 * configure: Rebuild.
665
25c51f71
TT
6662020-01-14 Tom Tromey <tom@tromey.com>
667
668 * configure: Rebuild.
669
c0bd321d
SM
6702020-01-13 Simon Marchi <simon.marchi@efficios.com>
671
672 * Makefile.in (%-generated.c): Remove rule for files from
673 regformats/i386.
674
bb564c58
SM
6752020-01-13 Simon Marchi <simon.marchi@efficios.com>
676
677 * configure: Re-generate.
678
6e37c371
SM
6792020-01-13 Simon Marchi <simon.marchi@efficios.com>
680
681 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
682 Define to static.
683 * tracepoint.c (stop_tracing, flush_trace_buffer,
684 about_to_request_buffer_space, get_trace_state_variable_value,
685 set_trace_state_variable_value, gdb_collect): Add declaration.
686
df4a0200
SM
6872020-01-13 Simon Marchi <simon.marchi@efficios.com>
688
689 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
690 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
691 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
692 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
693 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
694 static.
695
89e94ec9
SM
6962020-01-13 Simon Marchi <simon.marchi@efficios.com>
697
698 * inferiors.c: Include gdbsupport/common-inferior.h.
699
2552728a
SM
7002020-01-13 Simon Marchi <simon.marchi@efficios.com>
701
702 * hostio-errno.c: Include hostio.h.
703
4025fa09
SM
7042020-01-13 Simon Marchi <simon.marchi@efficios.com>
705
706 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
707 prerequisite.
708
c0b0a142
SM
7092020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
710
711 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
712 * linux-arm-tdesc.h: Include arch/arm.h.
713
bb1183e2
SM
7142020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
717
f5df0b5f
SM
7182020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
721 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
722
5b6d1e4f
PA
7232020-01-10 Pedro Alves <palves@redhat.com>
724
725 * fork-child.c (post_fork_inferior): Pass target down to
726 startup_inferior.
727 * inferiors.c (switch_to_thread): Add process_stratum_target
728 parameter.
729 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
730 * nto-low.c (nto_target_ops): Now a process_stratum_target.
731 * linux-low.c (linux_target_ops): Now a process_stratum_target.
732 * remote-utils.c (prepare_resume_reply): Pass the target to
733 switch_to_thread.
734 * target.c (the_target): Now a process_stratum_target.
735 (done_accessing_memory): Pass the target to switch_to_thread.
736 (set_target_ops): Ajust to use process_stratum_target.
737 * target.h (struct target_ops): Rename to ...
738 (struct process_stratum_target): ... this.
739 (the_target, set_target_ops): Adjust.
740 (prepare_to_access_memory): Adjust comment.
741 * win32-low.c (child_xfer_memory): Adjust to use
742 process_stratum_target.
743 (win32_target_ops): Now a process_stratum_target.
744
559e7e50
EZ
7452020-01-06 Eli Zaretskii <eliz@gnu.org>
746 Pedro Alves <palves@redhat.com>
747
748 * win32-low.c (get_child_debug_event): Extract the fatal exception
749 from the exit status and convert to the equivalent Posix signal
750 number.
751 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
752 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
753
48189bec
HD
7542020-01-01 Hannes Domani <ssbssa@yahoo.de>
755
756 * Makefile.in: Use INSTALL_PROGRAM_ENV.
757
5dd8bf88
JB
7582020-01-01 Joel Brobecker <brobecker@adacore.com>
759
760 * server.c (gdbserver_version): Change copyright year to 2020.
761 * gdbreplay.c (gdbreplay_version): Likewise.
762
0ad6b8ee
CB
7632019-12-19 Christian Biesinger <cbiesinger@google.com>
764
765 * configure: Regenerate.
766 * configure.ac: Quote variable arguments of test.
767
1ee7b812
BE
7682019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
769
770 * Makefile.in: Fix build with GNU Make 3.81
771
d9fa87f4
TT
7722019-12-16 Tom Tromey <tromey@adacore.com>
773
774 * server.c (get_exec_file): Constify result.
775
ab7d13f0
CB
7762019-12-10 Christian Biesinger <cbiesinger@google.com>
777
778 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
779 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
780 * config.in: Regenerate.
781 * configure: Regenerate.
782 * configure.ac: Don't check for strerror.
783 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
784 Call safe_strerror instead of strerror.
785 * server.h (strerror): Remove this now-unnecessary declaration.
786 * tracepoint.c (init_named_socket): Call safe_strerror instead of
787 strerror.
788 (gdb_agent_helper_thread): Likewise.
789 * utils.c (perror_with_name): Likewise.
790
4da8c3a8
TT
7912019-11-26 Tom Tromey <tom@tromey.com>
792
793 * configure, config.in: Rebuild.
794
21987b9c
TT
7952019-11-26 Tom Tromey <tom@tromey.com>
796
797 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
798 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
799 gdb_sigmask.
800 * configure, config.in: Rebuild.
801
5e030278
TT
8022019-11-26 Tom Tromey <tom@tromey.com>
803
804 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
805 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
806 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
807 * acinclude.m4: Include ax_pthread.m4.
808 * config.in, configure: Rebuild.
809
6d91ce9a
CB
8102019-11-26 Christian Biesinger <cbiesinger@google.com>
811
812 * debug.c (debug_set_output): Call safe_strerror instead of
813 strerror.
814 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
815 (linux_kill_one_lwp): Likewise.
816 (linux_detach_one_lwp): Likewise.
817 (linux_wait_for_event_filtered): Likewise.
818 (store_register): Likewise.
819 * lynx-low.c (lynx_attach): Likewise.
820 * mem-break.c (insert_memory_breakpoint): Likewise.
821 (remove_memory_breakpoint): Likewise.
822 (delete_fast_tracepoint_jump): Likewise.
823 (set_fast_tracepoint_jump): Likewise.
824 (uninsert_fast_tracepoint_jumps_at): Likewise.
825 (reinsert_fast_tracepoint_jumps_at): Likewise.
826 * nto-low.c (nto_xfer_memory): Likewise.
827 (nto_resume): Likewise.
828
6cdd651f
LM
8292019-11-20 Luis Machado <luis.machado@linaro.org>
830
831 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
832 instead of register count.
833 * tdesc.c (tdesc_contains_feature): New function.
834 * tdesc.h (tdesc_contains_feature): New prototype.
835
cd850b40
CB
8362019-11-15 Christian Biesinger <cbiesinger@google.com>
837
838 * Makefile.in: Add safe-strerror.c.
839 * configure: Regenerate.
840 * configure.ac: Don't source common.host.
841
5abebf3c
CB
8422019-11-15 Christian Biesinger <cbiesinger@google.com>
843
844 * config.in: Regenerate.
845 * configure: Regenerate.
846
e06f3d6e
AB
8472019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
848
849 * ax.c (ax_printf): Handle size_t_arg.
850
ca3a04f6
CB
8512019-11-06 Christian Biesinger <cbiesinger@google.com>
852
853 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
854 * mi/mi-main.c (output_cores): Likewise.
855 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
856 (linux_xfer_osdata_modules): Likewise.
857 * remote.c (register_remote_support_xml): Likewise.
858 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
859 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
860
e48f6033
CB
8612019-11-01 Christian Biesinger <cbiesinger@google.com>
862
863 * configure: Regenerate.
864 * configure.ac: Remove check for strerror_r.
865
e7e97a2e
CB
8662019-10-31 Christian Biesinger <cbiesinger@google.com>
867
868 * config.in: Regenerate.
869 * configure: Regenerate.
870 * configure.ac: Also check for strerror_r.
871
75cafaa6
CB
8722019-10-31 Christian Biesinger <cbiesinger@google.com>
873
874 * ax.h (debug_agent): Remove duplicate declaration.
875
30baf67b
TV
8762019-10-26 Tom de Vries <tdevries@suse.de>
877
878 * linux-aarch64-low.c: Fix typos in comments.
879 * linux-arm-low.c: Same.
880 * linux-low.c: Same.
881 * linux-ppc-low.c: Same.
882 * proc-service.c: Same.
883 * regcache.h: Same.
884 * server.c: Same.
885 * tracepoint.c: Same.
886 * win32-low.c: Same.
887
52c64cf7
TT
8882019-10-25 Tom Tromey <tromey@adacore.com>
889
890 * utils.c (xstrdup): Remove.
891
c12d372d
TT
8922019-10-23 Tom Tromey <tom@tromey.com>
893
894 * configure, config.in: Rebuild.
895
4d0b984b
TT
8962019-10-23 Tom Tromey <tom@tromey.com>
897
898 * configure: Rebuild.
899 * acinclude.m4: Use m4_include, not sinclude.
900
c5adaa19
TT
9012019-10-17 Tom Tromey <tromey@adacore.com>
902
903 * configure: Rebuild.
904 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
905 in AC_CONFIG_FILES invocation.
906 * Makefile.in (stamp-h, Makefile): Use new-style config.status
907 invocation.
908
fec4e896
CB
9092019-10-16 Christian Biesinger <cbiesinger@google.com>
910
911 * server.c: Include xml-builtin.h.
912 (get_xml_features): Don't declare xml_builtins here.
913
00975ff6
AB
9142019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
915
916 * Makefile.in: Remove references to vec-ipa.o.
917
0dc32745
AB
9182019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
919
920 * Makefile.in: Remove references to vec.c.
921
3e6ec53a
CB
9222019-10-02 Christian Biesinger <cbiesinger@google.com>
923
924 * server.c (server_waiting): Change to bool.
925 (extended_protocol): Likewise.
926 (response_needed): Likewise.
927 (exit_requested): Likewise.
928 (run_once): Likewise.
929 (report_no_resumed): Likewise.
930 (non_stop): Likewise.
931 (disable_packet_vCont): Likewise.
932 (disable_packet_Tthread): Likewise.
933 (disable_packet_qC): Likewise.
934 (disable_packet_qfThreadInfo): Likewise.
935 (handle_general_set): Update.
936 (handle_detach): Update.
937 (handle_monitor_command): Update.
938 (handle_query): Update.
939 (captured_main): Update.
940 (process_serial_event): Update.
941 * server.h (server_waiting): Change to bool.
942 (disable_packet_vCont): Likewise.
943 (disable_packet_Tthread): Likewise.
944 (disable_packet_qC): Likewise.
945 (disable_packet_qfThreadInfo): Likewise.
946 (run_once): Likewise.
947 (non_stop): Likewise.
948 * target.c (target_stop_and_wait): Update.
949
80fd2826
TT
9502019-10-02 Tom Tromey <tromey@adacore.com>
951
952 * Makefile.in (SFILES): Add common-inferior.c.
953 (OBS): Add common-inferior.o.
954 * server.c (startup_with_shell): Don't define.
955
46f29a9a
AB
9562019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
957
958 * linux-low.c (linux_low_read_btrace): Update for change to
959 std::vector.
960
f9d949fb
CB
9612019-09-20 Christian Biesinger <cbiesinger@google.com>
962
963 * debug.c (debug_threads): Remove comment in favor of the header.
964 * debug.h (using_threads): Add declaration.
965 (debug_threads): Add comment.
966 * linux-aarch64-low.c: Include debug.h and remove declaration of
967 debug_threads.
968 * nto-low.c: Likewise.
969 * remote-utils.c: Likewise.
970 * thread-db.c: Likewise.
971
abf516c6
UW
9722019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
973
974 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
975 and powerpc-cell64l-ipa.o.
976 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
977 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
978 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
979 (spu*-*-*): Remove.
980
981 * spu-low.c: Remove file.
982
983 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
984 (parse_spufs_run): Remove.
985 (ppc_get_pc): Remove Cell/B.E. support.
986 (ppc_set_pc): Likewise.
987 (ppc_breakpoint_at): Likewise.
988 (ppc_arch_setup): Likewise.
989 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
990 tdesc_powerpc_cell32l.
991 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
992 or init_registers_powerpc_cell32l.
993 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
994 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
995 or init_registers_powerpc_cell32l.
996 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
997 (init_registers_powerpc_cell32l): Remove prototype.
998 (init_registers_powerpc_cell64l): Likewise.
999
1000 * target.h (struct target_ops): Remove qxfer_spu member.
1001 * server.c (handle_qxfer_spu): Remove.
1002 (qxfer_packets): Remove entry for "spu".
1003 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1004 * linux-low.c (SPUFS_MAGIC): Remove.
1005 (spu_enumerate_spu_ids): Remove.
1006 (linux_qxfer_spu): Remove.
1007 (linux_target_ops): Remove qxfer_spu member.
1008 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1009 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1010 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1011
2d41fa11
SDJ
10122019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1013
1014 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1015 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1016 * config.in: Regenerate.
1017 * configure: Regenerate.
1018
d59b55f0
TT
10192019-08-15 Tom Tromey <tromey@adacore.com>
1020
1021 * target.c (target_write_memory): Use gdb::byte_vector.
1022
4196ab2a
TT
10232019-08-15 Tom Tromey <tromey@adacore.com>
1024
1025 * tracepoint.c (write_inferior_data_pointer)
1026 (write_inferior_integer, write_inferior_int8)
1027 (write_inferior_uinteger, m_tracepoint_action_download)
1028 (r_tracepoint_action_download, x_tracepoint_action_download)
1029 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1030 (download_agent_expr, download_tracepoint_1)
1031 (download_trace_state_variables, upload_fast_traceframes): Update.
1032 * server.c (gdb_write_memory): Update.
1033 * remote-utils.c (relocate_instruction): Update.
1034 * proc-service.c (ps_pdwrite): Update.
1035 * mem-break.c (remove_memory_breakpoint)
1036 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1037 (uninsert_fast_tracepoint_jumps_at)
1038 (reinsert_fast_tracepoint_jumps_at): Update.
1039 * linux-x86-low.c (append_insns)
1040 (i386_install_fast_tracepoint_jump_pad)
1041 (amd64_write_goto_address, i386_write_goto_address): Update.
1042 * linux-s390-low.c (append_insns, s390_write_goto_address):
1043 Update.
1044 * linux-ppc-low.c (ppc_relocate_instruction)
1045 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1046 (ppc_write_goto_address): Update.
1047 * linux-aarch64-low.c (append_insns): Update.
1048 * target.h (struct target_ops): Update.
1049 (write_inferior_memory): Don't declare.
1050 * target.c (target_write_memory): Rename from
1051 write_inferior_memory. Remove old target_write_memory.
1052
c6778d00
TT
10532019-08-15 Tom Tromey <tromey@adacore.com>
1054
1055 * target.c (write_inferior_memory): Use std::vector.
1056
404f2902
FCE
10572019-08-06 Frank Ch. Eigler <fche@redhat.com>
1058
1059 PR build/24886
1060 * configure.ac: Drop enable-libmcheck support.
1061 * configure, config.in: Rebuild.
1062 * acinclude.m4: Don't include it.
1063
4c5aa8e0
AH
10642019-07-19 Alan Hayward <alan.hayward@arm.com>
1065
1066 * configure.srv: Remove Arm xml files.
1067
7cc17433
AH
10682019-07-19 Alan Hayward <alan.hayward@arm.com>
1069
1070 * configure.srv: Add new files. Remove xml generated files.
1071 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1072 registers.
1073 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1074 * linux-aarch32-tdesc.c: New file.
1075 * linux-aarch32-tdesc.h: New file.
1076 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1077 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1078 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1079 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1080 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1081 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1082 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1083 (arm_read_description): Call arm_linux_read_description.
1084 (initialize_low_arch): Don't init registers.
1085 * linux-arm-tdesc.c: New file.
1086 * linux-arm-tdesc.h: New file.
1087
166a82be
AH
10882019-07-10 Alan Hayward <alan.hayward@arm.com>
1089
1090 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1091 Move counter inside for.
1092 (arm_read_description): Check ptrace earlier.
1093 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1094
268a13a5
TT
10952019-07-09 Tom Tromey <tom@tromey.com>
1096
1097 * configure: Rebuild.
1098 * configure.ac: Change common to gdbsupport.
1099 * acinclude.m4: Change common to gdbsupport.
1100 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1101 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1102 common to gdbsupport.
1103 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1104 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1105 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1106 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1107 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1108 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1109 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1110 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1111 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1112 common to gdbsupport.
1113
350fab54
AH
11142019-07-04 Alan Hayward <alan.hayward@arm.com>
1115
1116 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1117 defines.
1118 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1119
2b40fda7
AH
11202019-07-04 Alan Hayward <alan.hayward@arm.com>
1121
1122 * configure.srv: Remove legacy xml.
1123 * linux-aarch64-low.c (initialize_low_arch): Remove
1124 initialize_low_tdesc call.
1125 * linux-aarch64-tdesc-selftest.c: Remove file.
1126 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1127 * linux-x86-low.c (initialize_low_arch): Remove
1128 initialize_low_tdesc call.
1129 * linux-x86-tdesc-selftest.c: Remove file.
1130 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1131
7d10623d
TV
11322019-06-20 Tom de Vries <tdevries@suse.de>
1133
1134 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1135 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1136
8d6a48df
TV
11372019-06-19 Tom de Vries <tdevries@suse.de>
1138
1139 * debug.h (debug_write): Change return type to ssize_t.
1140 * debug.c (debug_write): Same.
1141
73cc7272
TT
11422019-06-14 Tom Tromey <tom@tromey.com>
1143
1144 * configure.ac: Use new path to gnulib.
1145 * configure: Rebuild.
1146 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1147 to gnulib.
1148
08f10e02
TT
11492019-06-11 Tom Tromey <tom@tromey.com>
1150
1151 * Makefile.in (SFILES): Add alloc.c.
1152 (OBS): Add alloc.o.
1153 (IPA_OBJS): Add alloc-ipa.o.
1154 (alloc-ipa.o): New target.
1155 (%.o: ../%.c): New pattern rule.
1156
422186a9
TT
11572019-06-10 Tom Tromey <tromey@adacore.com>
1158
1159 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1160 end warning with a newline.
1161 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1162 newline.
1163 * thread-db.c (attach_thread): Don't end warning with a newline.
1164 (thread_db_notice_clone): Likewise.
1165 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1166 newline.
1167 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1168 end warning with a newline.
1169
b02f78f9
PA
11702019-06-04 Pedro Alves <palves@redhat.com>
1171
1172 * server.c (captured_main): Use make_unique_xstrdup.
1173
88ed7edb
TT
11742019-06-02 Tom Tromey <tom@tromey.com>
1175
1176 * gdbreplay.c (fromhex): Remove.
1177 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1178
33a6bc35
TT
11792019-05-29 Tom Tromey <tromey@adacore.com>
1180
1181 * configure: Rebuild.
1182
e90a813d
KB
11832019-05-06 Kevin Buettner <kevinb@redhat.com>
1184
1185 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1186 sign extension code on 32-bit builds.
1187
353ea2d1
EZ
11882019-05-03 Eli Zaretskii <eliz@gnu.org>
1189
1190 * remote-utils.c:
1191 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1192
b494cdff
TT
11932019-04-19 Tom Tromey <tom@tromey.com>
1194
1195 * server.c (struct vstop_notif): Derive from notif_event.
1196 <base>: Remove.
1197 (queue_stop_reply): Update.
1198 (remove_all_on_match_ptid): Change type. Rewrite.
1199 (discard_queued_stop_replies): Rewrite.
1200 (in_queued_stop_replies_ptid): Change type.
1201 (in_queued_stop_replies): Rewrite.
1202 (notif_stop): Update.
1203 (queue_stop_reply_callback): Update.
1204 (captured_main): Don't call initialize_notif.
1205 (push_stop_notification): Update.
1206 * notif.c (notif_write_event, handle_notif_ack)
1207 (notif_event_enque, notif_push): Update.
1208 (notif_event_xfree, initialize_notif): Remove.
1209 * notif.h (struct notif_event): Include <list>, not
1210 "common/queue.h".
1211 (struct notif_server) <queue>: Now a std::list.
1212 (notif_event_p): Remove typedef.
1213 (initialize_notif): Don't declare.
1214 (struct notif_event): Add virtual destructor.
1215
a7e559cc
AH
12162019-04-17 Alan Hayward <alan.hayward@arm.com>
1217
1218 * ax.c (ax_vdebug): Call debug_printf.
1219 * debug.c (debug_write): New function.
1220 * debug.h (debug_write): New declaration.
1221 * linux-low.c (sigchld_handler): Call debug_write.
1222
aeb2e706
AH
12232019-04-17 Alan Hayward <alan.hayward@arm.com>
1224
1225 * debug.c (debug_set_output): New function.
1226 (debug_vprintf): Send output to debug_file.
1227 (debug_flush): Likewise.
1228 * debug.h (debug_set_output): New declaration.
1229 * server.c (handle_monitor_command): Add debug-file option.
1230 (captured_main): Likewise.
1231
c1bc0935
AH
12322019-04-17 Alan Hayward <alan.hayward@arm.com>
1233
1234 * debug.c (remote_debug): Add definition.
1235 * debug.h (remote_debug): Add declaration.
1236 * hostio.c (remote_debug): Remove declaration.
1237 * remote-utils.c (struct ui_file): Likewise.
1238 (remote_debug): Likewise.
1239 * remote-utils.h (remote_debug): Likewise,
1240 * server.c (remote_debug): Remove definition.
1241
3f52fdbc
KB
12422019-04-10 Kevin Buettner <kevinb@redhat.com>
1243
1244 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1245 when using a 64-bit gdbserver.
1246
b0319eaa
TT
12472019-04-09 Tom Tromey <tromey@adacore.com>
1248
1249 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1250
eedc3f4f
TT
12512019-04-08 Tom Tromey <tom@tromey.com>
1252
1253 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1254 throw.
1255 (linux_resume_one_lwp): Likewise.
1256
230d2906
TT
12572019-04-08 Tom Tromey <tom@tromey.com>
1258
1259 * gdbreplay.c: Update.
1260 * linux-low.c: Update.
1261 * server.c: Update.
1262
a70b8144
TT
12632019-04-08 Tom Tromey <tom@tromey.com>
1264
1265 * server.c: Use C++ exception handling.
1266 * linux-low.c: Use C++ exception handling.
1267 * gdbreplay.c: Use C++ exception handling.
1268
3d6e9d23
TT
12692019-04-08 Tom Tromey <tom@tromey.com>
1270
1271 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1272 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1273 (captured_main, main): Update.
1274 * gdbreplay.c (main): Update.
1275
0570503d
PFC
12762019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1277
1278 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1279 value in argument pointer, return 1 if the entry is found and 0
1280 otherwise. Move comment.
1281 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1282 * linux-low.h (linux_get_auxv): Declare.
1283 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1284
227a9e65
TT
12852019-04-05 Tom Tromey <tromey@adacore.com>
1286
1287 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1288 variables.
1289
69f4c9cc
AH
12902019-03-28 Alan Hayward <alan.hayward@arm.com>
1291
1292 * linux-low.c (AT_HWCAP2): Add define if not already included.
1293
974c89e0
AH
12942019-03-26 Alan Hayward <alan.hayward@arm.com>
1295
1296 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1297 (aarch64_arch_setup): Call linux_get_hwcap.
1298 * linux-arm-low.c (arm_get_hwcap): Remove function.
1299 (arm_read_description): Call linux_get_hwcap.
1300 * linux-low.c (linux_get_auxv): New function.
1301 (linux_get_hwcap): Likewise.
1302 (linux_get_hwcap2): Likewise.
1303 * linux-low.h (linux_get_hwcap): New declaration.
1304 (linux_get_hwcap2): Likewise.
1305 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1306 (ppc_arch_setup): Call linux_get_hwcap.
1307 * linux-s390-low.c (s390_get_hwcap): Remove function.
1308 (s390_arch_setup): Call linux_get_hwcap.
1309
1ef53e6b
AH
13102019-03-22 Alan Hayward <alan.hayward@arm.com>
1311 Jiong Wang <jiong.wang@arm.com>
1312
1313 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1314 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1315 to fail.
1316 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1317
ee4fbcfa
AH
13182019-03-22 Alan Hayward <alan.hayward@arm.com>
1319 Jiong Wang <jiong.wang@arm.com>
1320
1321 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1322 (aarch64_get_hwcap): New function.
1323 (aarch64_arch_setup): Read APIA hwcap.
1324
6dc0ebde
AH
13252019-03-22 Alan Hayward <alan.hayward@arm.com>
1326 Jiong Wang <jiong.wang@arm.com>
1327
1328 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1329 (initialize_low_tracepoint): Likewise.
1330 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1331 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1332 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1333 (aarch64_linux_read_description): Likewise.
1334 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1335
1163a4b7
JB
13362019-03-12 John Baldwin <jhb@FreeBSD.org>
1337
1338 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1339 i386_create_target_description for 'segments' parameter.
1340 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1341 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1342 * win32-i386-low.c (i386_arch_setup): Likewise.
1343
d3a70e03
TT
13442019-03-12 Tom Tromey <tromey@adacore.com>
1345
1346 * linux-low.c (iterate_over_lwps): Update.
1347
37991b4f
TT
13482019-03-06 Tom Tromey <tom@tromey.com>
1349
1350 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1351 (captured_main): Use SCOPE_EXIT.
1352
45950eb6
SDJ
13532019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1354
1355 * configure.srv: Use '$enable_unittest' instead of '$development'
1356 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1357 case.
1358
43ac54fc
TT
13592019-02-27 Tom Tromey <tromey@adacore.com>
1360
1361 * gdbreplay.c (logchar): Handle \r\n.
1362
df0da8a2
AH
13632019-02-07 Alan Hayward <alan.hayward@arm.com>
1364
1365 * linux-low.c (linux_attach): Add process before lwp.
1366 * server.c (attach_inferior): Check if already attached.
1367
1a5c2598
TT
13682019-02-07 Tom Tromey <tom@tromey.com>
1369
1370 * x86-tdesc.h: Rename include guard.
1371 * x86-low.h: Add include guard.
1372 * wincecompat.h: Rename include guard.
1373 * win32-low.h: Add include guard.
1374 * utils.h: Rename include guard.
1375 * tracepoint.h: Rename include guard.
1376 * tdesc.h: Rename include guard.
1377 * target.h: Rename include guard.
1378 * server.h: Rename include guard.
1379 * remote-utils.h: Rename include guard.
1380 * regcache.h: Rename include guard.
1381 * nto-low.h: Rename include guard.
1382 * notif.h: Add include guard.
1383 * mem-break.h: Rename include guard.
1384 * lynx-low.h: Add include guard.
1385 * linux-x86-tdesc.h: Add include guard.
1386 * linux-s390-tdesc.h: Add include guard.
1387 * linux-ppc-tdesc-init.h: Add include guard.
1388 * linux-low.h: Add include guard.
1389 * linux-aarch64-tdesc.h: Add include guard.
1390 * linux-aarch32-low.h: Add include guard.
1391 * inferiors.h: Rename include guard.
1392 * i387-fp.h: Rename include guard.
1393 * hostio.h: Rename include guard.
1394 * gdbthread.h: Rename include guard.
1395 * gdb_proc_service.h: Rename include guard.
1396 * event-loop.h: Rename include guard.
1397 * dll.h: Rename include guard.
1398 * debug.h: Rename include guard.
1399 * ax.h: Rename include guard.
1400
956cc47c
SN
14012018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1402
1403 PR gdb/23985
1404 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1405 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1406
a0707f3c
TT
14072019-01-25 Tom Tromey <tom@tromey.com>
1408
1409 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1410
0747795c
TT
14112019-01-25 Tom Tromey <tom@tromey.com>
1412
1413 * win32-low.c: Fix common/ includes.
1414 * win32-i386-low.c: Fix common/ includes.
1415 * tracepoint.c: Fix common/ includes.
1416 * thread-db.c: Fix common/ includes.
1417 * target.h: Fix common/ includes.
1418 * symbol.c: Fix common/ includes.
1419 * spu-low.c: Fix common/ includes.
1420 * server.h: Fix common/ includes.
1421 * server.c: Fix common/ includes.
1422 * remote-utils.c: Fix common/ includes.
1423 * regcache.h: Fix common/ includes.
1424 * regcache.c: Fix common/ includes.
1425 * nto-x86-low.c: Fix common/ includes.
1426 * notif.h: Fix common/ includes.
1427 * mem-break.h: Fix common/ includes.
1428 * lynx-low.c: Fix common/ includes.
1429 * lynx-i386-low.c: Fix common/ includes.
1430 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1431 * linux-x86-low.c: Fix common/ includes.
1432 * linux-low.c: Fix common/ includes.
1433 * inferiors.h: Fix common/ includes.
1434 * i387-fp.c: Fix common/ includes.
1435 * hostio.c: Fix common/ includes.
1436 * hostio-errno.c: Fix common/ includes.
1437 * gdbthread.h: Fix common/ includes.
1438 * gdbreplay.c: Fix common/ includes.
1439 * fork-child.c: Fix common/ includes.
1440 * event-loop.c: Fix common/ includes.
1441 * ax.c:
1442 (enum gdb_agent_op): Fix common/ includes.
1443
be6d4f74
TT
14442019-01-21 Tom Tromey <tom@tromey.com>
1445
1446 * tracepoint.c: Fix includes.
1447 * remote-utils.c: Fix includes.
1448 * linux-x86-low.c: Fix includes.
1449
66d91b39
JB
14502019-01-01 Joel Brobecker <brobecker@adacore.com>
1451
1452 * gdbreplay.c (gdbreplay_version): Update copyright year in
1453 version message.
1454 * server.c (gdbserver_version): Likewise.
1455
754e3168
AH
14562018-12-05 Alan Hayward <alan.hayward@arm.com>
1457
1458 * linux-low.c (add_lwp): Switch ordering.
1459
d105de22
TT
14602018-11-29 Tom Tromey <tom@tromey.com>
1461
1462 * win32-low.c (win32_join): Take pid, not process.
1463 * target.h (struct target_ops) <join>: Change argument type.
1464 (join_inferior): Change argument name.
1465 * spu-low.c (spu_join): Take pid, not process.
1466 * server.c (handle_detach): Preserve pid before destroying
1467 process.
1468 * lynx-low.c (lynx_join): Take pid, not process.
1469 * linux-low.c (linux_join): Take pid, not process.
1470
50138245
AH
14712018-11-23 Alan Hayward <alan.hayward@arm.com>
1472
1473 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1474 (aarch64_cannot_fetch_register): Likewise.
1475 (struct linux_target_ops): Update references.
1476
64f57f3d
PFC
14772018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1478
1479 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1480
8d619c01
EBM
14812018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1482
1483 * configure.srv (ipa_ppc_linux_regobj): Add
1484 powerpc-isa207-htm-vsx32l-ipa.o and
1485 powerpc-isa207-htm-vsx64l-ipa.o.
1486 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1487 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1488 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1489 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1490 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1491 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1492 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1493 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1494 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1495 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1496 (init_registers_powerpc_isa207_htm_vsx32l)
1497 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1498 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1499 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1500 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1501 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1502 (ppc_store_tm_ctarregset): New functions.
1503 (ppc_regsets): Add entries for HTM regsets.
1504 (ppc_arch_setup): Set htm in features struct when needed. Set
1505 sizes for the HTM regsets.
1506 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1507 (initialize_low_arch): Call
1508 init_registers_powerpc_isa207_htm_vsx32l and
1509 init_registers_powerpc_isa207_htm_vsx64l.
1510 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1511 PPC_TDESC_ISA207_HTM_VSX.
1512 (initialize_low_tracepoint): Call
1513 init_registers_powerpc_isa207_htm_vsx32l and
1514 init_registers_powerpc_isa207_htm_vsx64l.
1515
232bfb86
EBM
15162018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1517
1518 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1519 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1520 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1521 (ppc_store_pmuregset): New functions.
1522 (ppc_regsets): Add entries for ebb and pmu regsets.
1523 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1524 pmu regsets are available. Set sizes for these regsets.
1525
f2cf6173
EBM
15262018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1527
1528 * configure.srv (ipa_ppc_linux_regobj): Add
1529 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1530 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1531 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1532 rs6000/powerpc-isa207-vsx32l.xml, and
1533 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1534 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1535 <PPC_TDESC_ISA207_VSX>: New enum value.
1536 (init_registers_powerpc_isa207_vsx32l): Declare.
1537 (init_registers_powerpc_isa207_vsx64l): Declare.
1538 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1539 (ppc_store_tarregset): New function.
1540 (ppc_regsets): Add entry for the TAR regset.
1541 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1542 size for the TAR regsets.
1543 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1544 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1545 and init_registers_powerpc_isa207_vsx64l.
1546 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1547 (initialize_low_tracepoint): Call
1548 init_registers_powerpc_isa207_vsx32l and
1549 init_registers_powerpc_isa207_vsx64l.
1550
7ca18ed6
EBM
15512018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1552 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1553
1554 * configure.srv (ipa_ppc_linux_regobj): Add
1555 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1556 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1557 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1558 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1559 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1560 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1561 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1562 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1563 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1564 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1565 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1566 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1567 (ppc_hwcap): Add comment.
1568 (ppc_hwcap2): New global.
1569 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1570 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1571 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1572 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1573 when needed. Set sizes for the the DSCR and PPR regsets.
1574 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1575 (initialize_low_arch): Call
1576 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1577 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1578 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1579 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1580 (initialize_low_tracepoint): Call
1581 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1582 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1583
5c849b22
PFC
15842018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1585
1586 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1587
8ecfd7bd
SDJ
15882018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1589 Simon Marchi <simark@simark.ca>
1590
1591 * acinclude.m4: Include "../selftest.m4".
1592 * configure: Regenerate.
1593 * configure.ac: Use "GDB_AC_SELFTEST".
1594 * configure.srv: Use "$enable_unittests" instead of
1595 "$development" when checking whether unit tests have been
1596 enabled.
1597 * server.c (captured_main): Update message informing that
1598 selftests have been disabled.
1599
96643e35
TT
16002018-10-04 Tom Tromey <tom@tromey.com>
1601
1602 * configure: Rebuild.
1603
da4ae14a
TT
16042018-10-04 Tom Tromey <tom@tromey.com>
1605
1606 * server.c (handle_status): Rename inner "thread".
1607 (process_serial_event): Declare "res" in 'm' case.
1608 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1609 (iterate_over_lwps): Rename inner "thread".
1610 (linux_qxfer_libraries_svr4): Rename inner "len".
1611 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1612
7c619dbd
GB
16132018-10-01 Gary Benson <gbenson@redhat.com>
1614
1615 * gdb_proc_service.h: Moved common code to
1616 common/gdb_proc_service.h.
1617
3795e814
GB
16182018-10-01 Gary Benson <gbenson@redhat.com>
1619
1620 * gdb_proc_service.h: Synchronize comments and whitespace with
1621 GDB's version of this file.
1622
49b036f1
TT
16232018-09-25 Tom Tromey <tom@tromey.com>
1624
1625 * configure: Rebuild.
1626 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1627
8ff03f0b
SM
16282018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1631 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1632 ($(IPA_LIB)): Sort IPA_OBJS.
1633
a1cd91dc
SM
16342018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1635
1636 * Makefile.in: Remove references to $(ADD_DEPS).
1637
752312ba
TT
16382018-09-16 Tom Tromey <tom@tromey.com>
1639
1640 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1641 variables.
1642 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1643 variables.
1644
f1628857
TT
16452018-09-05 Tom Tromey <tom@tromey.com>
1646
1647 * configure: Rebuild.
1648
ad202fcc
SM
16492018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 PR build/23399
1652 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1653
d3d8724a
TT
16542018-08-27 Tom Tromey <tom@tromey.com>
1655
1656 PR build/23087:
1657 * configure: Rebuild.
1658
b4f183d2
TT
16592018-08-27 Tom Tromey <tom@tromey.com>
1660
1661 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1662 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1663 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1664 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1665 (s390x_emit_stack_adjust): Add casts to unsigned char.
1666
4e2aa472
SM
16672018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1668
1669 PR gdb/23374
1670 PR gdb/23375
1671 * server.h (struct client_state) <disable_randomization>:
1672 Initialize to 1.
1673
cf4088a9
SM
16742018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1675
1676 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1677 variable.
1678 (mips_supply_ptrace_register): Likewise.
1679
a0de763e
TT
16802018-07-22 Tom Tromey <tom@tromey.com>
1681
1682 * configure: Rebuild.
1683
b0a7723d
TT
16842018-07-22 Tom Tromey <tom@tromey.com>
1685
1686 * win32-low.c (win32_create_inferior): Remove unused variables.
1687 * gdbreplay.c (remote_open): Remove unused variable.
1688 * remote-utils.c (remote_prepare): Remove unused variable.
1689 * x86-tdesc.h (X86_TDESC_H): Define.
1690 (amd64_expedite_regs): Define conditionally.
1691 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1692 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1693 * remote-utils.c (readchar): Remove unused variable.
1694
a780ef4f
PA
16952018-07-13 Pedro Alves <palves@redhat.com>
1696
1697 * linux-low.c (linux_kill): Change parameter to process_info
1698 pointer instead of pid. Adjust.
1699 * lynx-low.c (lynx_kill): Likewise.
1700 * nto-low.c (nto_kill): Likewise.
1701 * spu-low.c (spu_kill): Likewise.
1702 * win32-low.c (win32_kill): Likewise.
1703 * server.c (handle_v_kill, kill_inferior_callback)
1704 (detach_or_kill_for_exit): Adjust.
1705 * target.c (kill_inferior): Change parameter to process_info
1706 pointer instead of pid. Adjust.
1707 * target.h (struct target_ops) <kill>: Change parameter to
1708 process_info pointer instead of pid. Adjust all implementations
1709 and callers.
1710 (kill_inferior): Likewise.
1711
ef2ddb33
PA
17122018-07-13 Pedro Alves <palves@redhat.com>
1713
1714 * linux-low.c (linux_detach, linux_join): Change parameter to
1715 process_info pointer instead of pid. Adjust.
1716 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1717 * nto-low.c (nto_detach): Likewise.
1718 * spu-low.c (spu_detach, spu_join): Likewise.
1719 * win32-low.c (win32_detach, win32_join): Likewise.
1720 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1721 * target.h (struct target_ops) <detach, join>: Change parameter to
1722 process_info pointer instead of pid. Adjust all implementations
1723 and callers.
1724 (detach_inferior, join_inferior): Rename 'pid' parameter to
1725 'proc'.
1726
c7ab0aef
SDJ
17272018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1728 Jan Kratochvil <jan.kratochvil@redhat.com>
1729 Paul Fertser <fercerpav@gmail.com>
1730 Tsutomu Seki <sekiriki@gmail.com>
1731
1732 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1733 (OBS): Add 'common/netstuff.o'.
1734 (GDBREPLAY_OBS): Likewise.
1735 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1736 (remote_open): Implement support for IPv6
1737 connections.
1738 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1739 and 'wspiapi.h'.
1740 (handle_accept_event): Accept connections from IPv6 sources.
1741 (remote_prepare): Handle IPv6-style hostnames; implement
1742 support for IPv6 connections.
1743 (remote_open): Implement support for printing connections from
1744 IPv6 sources.
1745
31445d10
PA
17462018-07-11 Pedro Alves <palves@redhat.com>
1747
1748 PR gdb/23377
1749 * mem-break.c (any_persistent_commands): Add process_info
1750 parameter and use it instead of relying on the current process.
1751 Change return type to bool.
1752 * mem-break.h (any_persistent_commands): Add process_info
1753 parameter and change return type to bool.
1754 * server.c (handle_detach): Remove require_running_or_return call.
1755 Look up the process_info for the process we're about to detach.
1756 If not found, return back error to GDB. Adjust
1757 any_persistent_commands call to pass down a process pointer.
1758
cb197132
PA
17592018-07-11 Pedro Alves <palves@redhat.com>
1760
1761 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1762 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1763 instead of collect_register_by_name.
1764 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1765 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1766
1b919490
VB
17672018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1768 Pedro Alves <palves@redhat.com>
1769
1770 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1771
d7e15655
TT
17722018-07-03 Tom Tromey <tom@tromey.com>
1773
1774 * linux-low.c: Update.
1775 * lynx-low.c: Update.
1776 * mem-break.c: Update.
1777 * nto-low.c: Update.
1778 * remote-utils.c: Update.
1779 * server.c: Update.
1780 * spu-low.c: Update.
1781 * target.c: Update.
1782 * win32-low.c: Update.
1783
26a57c92
TT
17842018-07-03 Tom Tromey <tom@tromey.com>
1785
1786 * server.c: Update.
1787
0e998d96
TT
17882018-07-03 Tom Tromey <tom@tromey.com>
1789
1790 * linux-low.c: Update.
1791
cc6bcb54
TT
17922018-07-03 Tom Tromey <tom@tromey.com>
1793
1794 * target.c: Update.
1795
e38504b3
TT
17962018-07-03 Tom Tromey <tom@tromey.com>
1797
1798 * linux-low.c: Update.
1799 * linux-mips-low.c: Update.
1800 * lynx-low.c: Update.
1801 * nto-low.c: Update.
1802 * remote-utils.c: Update.
1803 * server.c: Update.
1804 * spu-low.c: Update.
1805 * target.c: Update.
1806 * thread-db.c: Update.
1807
e99b03dc
TT
18082018-07-03 Tom Tromey <tom@tromey.com>
1809
1810 * linux-low.c: Update.
1811 * linux-mips-low.c: Update.
1812 * lynx-low.c: Update.
1813 * mem-break.c: Update.
1814 * nto-low.c: Update.
1815 * remote-utils.c: Update.
1816 * server.c: Update.
1817 * spu-low.c: Update.
1818 * target.c: Update.
1819 * tracepoint.c: Update.
1820
f2907e49
TT
18212018-07-03 Tom Tromey <tom@tromey.com>
1822
1823 * linux-low.c: Update.
1824 * linux-ppc-low.c: Update.
1825 * linux-x86-low.c: Update.
1826 * proc-service.c: Update.
1827 * server.c: Update.
1828 * spu-low.c: Update.
1829 * thread-db.c: Update.
1830 * win32-low.c: Update.
1831
fd79271b
TT
18322018-07-03 Tom Tromey <tom@tromey.com>
1833
1834 * linux-low.c: Update.
1835 * lynx-low.c: Update.
1836 * nto-low.c: Update.
1837 * remote-utils.c: Update.
1838 * spu-low.c: Update.
1839 * thread-db.c: Update.
1840 * win32-low.c: Update.
1841
c0867626
SDJ
18422018-06-29 Joel Brobecker <brobecker@adacore.com>
1843
1844 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1845 parameter in call to 'amd64_create_target_description'.
1846
2512d7ef
JK
18472018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1848
1849 * x86-tdesc.h: Remove executable permission flag.
1850
d0ac1c44
SM
18512018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1852
1853 * configure.ac: Remove AC_PREREQ, add missing quoting.
1854 * configure: Re-generate.
1855 * config.in: Re-generate.
1856 * aclocal.m4: Re-generate.
1857
c4eb05ff
SM
18582018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1859
1860 * tracepoint.h (current_traceframe): Remove declaration.
1861
02895270
AH
18622018-06-18 Alan Hayward <alan.hayward@arm.com>
1863
1864 * linux-aarch64-low.c (is_sve_tdesc): New function.
1865 (aarch64_sve_regs_copy_to_regcache): Likewise.
1866 (aarch64_sve_regs_copy_from_regcache): Likewise.
1867 (aarch64_regs_info): Add SVE checks.
1868 (initialize_low_arch): Initialize SVE.
1869
e9902bfc
AH
18702018-06-18 Alan Hayward <alan.hayward@arm.com>
1871
1872 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1873
fefa175e
AH
18742018-06-11 Alan Hayward <alan.hayward@arm.com>
1875
1876 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1877 (initialize_low_tracepoint): Likewise
1878 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1879 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1880 param.
1881 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1882 checks.
1883 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1884
b91ad3ff
AH
18852018-06-11 Alan Hayward <alan.hayward@arm.com>
1886
1887 * server.h (PBUFSIZ): Increase size
1888
f868386e
AH
18892018-06-11 Alan Hayward <alan.hayward@arm.com>
1890
1891 * regcache.c (regcache::raw_compare): New function.
1892 * regcache.h (regcache::raw_compare): New declaration.
1893
9c861883
AH
18942018-06-11 Alan Hayward <alan.hayward@arm.com>
1895
1896 * regcache.c (new_register_cache): Use new.
1897 (free_register_cache): Use delete.
1898 (register_data): Use const.
1899 (supply_register): Move body inside regcache.
1900 (regcache::raw_supply): New override function.
1901 (collect_register): Move body inside regcache.
1902 (regcache::raw_collect): New override function.
1903 (regcache::get_register_status): New override function.
1904 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1905
40591844
TT
19062018-06-09 Tom Tromey <tom@tromey.com>
1907
1908 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1909 declare queue.
1910 (event_queue): Use std::queue.
1911 (gdb_event_xfree): Remove.
1912 (initialize_event_loop, process_event, wait_for_event): Update.
1913
6341380d
SC
19142018-06-08 Stan Cox <scox@redhat.com>
1915
1916 * win32-low.c (win32_create_inferior): last_ptid and last_status
1917 moved to client_state.
1918
03349c93
PA
19192018-06-08 Pedro Alves <palves@redhat.com>
1920
1921 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1922 common/common-exceptions.o, common/common-utils.o,
1923 common/errors.o, common/print-utils.o and utils.o.
1924 * gdbreplay.c: Include "common-defs.h" instead of the two
1925 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1926 string.h or alloca.h.
1927 (perror_with_name): Delete.
1928 (remote_open): Use xstrdup instead of strdup.
1929 (main): Rename to ...
1930 (captured_main): ... this.
1931 (main): New.
1932
8dcc53b3
TT
19332018-06-08 Tom Tromey <tom@tromey.com>
1934
1935 * linux-low.c (linux_low_read_btrace): Update.
1936
c12a5089
SC
19372018-06-04 Stan Cox <scox@redhat.com>
1938
1939 * server.h (struct client_state): New.
1940 * server.c (cont_thread, general_thread, multi_process)
1941 (report_fork_events, report_vfork_events, report_exec_events)
1942 (report_thread_events, swbreak_feature, hwbreak_feature)
1943 (vCont_supported, disable_randomization, pass_signals)
1944 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1945 Moved to client_state.
1946 * remote-utils.c (remote_debug, noack_mode)
1947 (transport_is_reliable): Moved to client_state.
1948 * tracepoint.c (current_traceframe): Moved to client_state.
1949
1950 Update all callers.
1951 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1952 linux-low.c, remote-utils.h, target.c: Use client_state.
1953
122394f1
AH
19542018-05-31 Alan Hayward <alan.hayward@arm.com>
1955
1956 * configure.srv: Add new c/h file.
1957
95228a0d
AH
19582018-05-31 Alan Hayward <alan.hayward@arm.com>
1959
1960 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1961 null VQ.
1962
d8dab6c3
MR
19632018-05-25 Maciej W. Rozycki <macro@mips.com>
1964
1965 * gdb.arch/mips-fpregset-core.exp: New test.
1966 * gdb.arch/mips-fpregset-core.c: New test source.
1967
81e25b7c
EK
19682018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1969
1970 PR server/23198
1971 * hostio.c (require_int): Do not report overflow for integers
1972 between 0xfffffff and 0x7fffffff.
1973
7e947ad3
MR
19742018-05-22 Maciej W. Rozycki <macro@mips.com>
1975
1976 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1977 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1978 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1979 functions.
1980 (the_low_target): Wire them.
1981
1d75a658
PFC
19822018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1983
1984 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1985 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1986 mode. Call collect_register_by_name with vscr using
1987 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1988 (ppc_store_vrregset): Add and set vscr_offset variable as in
1989 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1990 vscr_offset.
1991
d078308a
PFC
19922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1993
1994 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1995 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1996 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1997
7273b5fc
PFC
19982018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1999
2000 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2001 (ppc_store_vsxregset): Likewise.
2002 (ppc_fill_vrregset): Likewise.
2003 (ppc_store_vrregset): Likewise.
2004 (ppc_fill_evrregset): Likewise.
2005 (ppc_store_evrregset): Likewise.
2006 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2007 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2008 needed.
2009
2e077f5e
PFC
20102018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2011
2012 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2013 wordsize of the inferior. Call ppc_linux_target_wordsize.
2014
bd64614e
PFC
20152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2016
2017 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2018 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2019 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2020 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2021 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2022 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2023 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2024 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2025 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2026 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2027 (tdesc_powerpc_e500l): Remove.
2028 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2029 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2030 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2031 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2032 linux-ppc-tdesc.h.
2033 (ppc_arch_setup): Remove target description matching code. Fill a
2034 ppc_linux_features struct and call ppc_linux_match_description
2035 with it.
2036
75d74cca
MR
20372018-05-22 Maciej W. Rozycki <macro@mips.com>
2038
2039 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2040 width of the requested register exceeds the width of the
2041 `ptrace' data type.
2042 (mips_cannot_store_register): Likewise.
2043
e4439e43
MR
20442018-05-21 Maciej W. Rozycki <macro@mips.com>
2045
2046 * linux-mips-low.c (mips_fetch_register): New function. Update
2047 preceding comment.
2048 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2049 (the_low_target): Wire `mips_fetch_register'.
2050
55271bf9
JB
20512018-05-10 Joel Brobecker <brobecker@adacore.com>
2052
2053 * lynx-i386-low.c (LYNXOS_178): New macro.
2054 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2055 the layout on LynxOS-178.
2056 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2057 handle floating point registers that are not supported by
2058 LynxOS-178.
2059
1a34f210
TT
20602018-05-10 Tom Tromey <tom@tromey.com>
2061
2062 * configure: Rebuild.
2063
190852c8
JB
20642018-05-10 Joel Brobecker <brobecker@adacore.com>
2065
2066 PR server/23158:
2067 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2068 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2069 Use it to set the expedite_regs field in the given tdesc.
2070 * x86-tdesc.h: New file.
2071 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2072 Adjust following the addition of the new expedite_regs parameter
2073 to init_target_desc.
2074 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2075 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2076 (i386_linux_read_description, amd64_linux_read_description):
2077 Adjust following the addition of the new expedite_regs parameter
2078 to init_target_desc.
2079 * lynx-i386-low.c: #include "x86-tdesc.h".
2080 (lynx_i386_arch_setup): Adjust following the addition of the new
2081 expedite_regs parameter to init_target_desc.
2082 * nto-x86-low.c: #include "x86-tdesc.h".
2083 (nto_x86_arch_setup): Adjust following the addition of the new
2084 expedite_regs parameter to init_target_desc.
2085 * win32-i386-low.c: #include "x86-tdesc.h".
2086 (i386_arch_setup): Adjust following the addition of the new
2087 expedite_regs parameter to init_target_desc.
2088
7dbac825
JB
20892018-05-10 Joel Brobecker <brobecker@adacore.com>
2090
2091 PR server/23158:
2092 * win32-low.c (win32_create_inferior): Add call to my_wait
2093 setting last_status global.
2094
906994d9
JB
20952018-05-10 Joel Brobecker <brobecker@adacore.com>
2096
2097 PR server/23158:
2098 * win32-low.c (create_process): Only call gdb_tilde_expand if
2099 inferior_cwd is not NULL.
2100
8ee22052
AB
21012018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2102
2103 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2104 registers to the cache if their values have changed.
2105 (i387_xsave_to_cache): Provide default values for x87 control
2106 registers when these features are available, but disabled.
2107 * regcache.c (supply_register_by_name_zeroed): New function.
2108 * regcache.h (supply_register_by_name_zeroed): Declare new
2109 function.
2110
aff689d3
TT
21112018-05-07 Tom Tromey <tom@tromey.com>
2112
2113 * configure: Rebuild.
2114
85e26832
TT
21152018-05-04 Tom Tromey <tom@tromey.com>
2116
2117 * configure: Rebuild.
2118
a3b60e45
JK
21192018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2120 Pedro Alves <palves@redhat.com>
2121
2122 * linux-aarch64-low.c (aarch64_stopped_data_address):
2123 Likewise.
2124
632e107b
TT
21252018-04-27 Tom Tromey <tom@tromey.com>
2126
2127 * configure: Rebuild.
2128
458412c3
TT
21292018-04-23 Tom Tromey <tom@tromey.com>
2130
2131 * configure: Rebuild.
2132
f31c089e
SM
21332018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2134
2135 * Makefile.in (depcomp): Add "..".
2136 (all_deps_files): New and use it.
2137
b319b098
AH
21382018-04-18 Alan Hayward <alan.hayward@arm.com>
2139
2140 * configure.srv (aarch64*-*-linux*): Don't include xml.
2141 (i[34567]86-*-cygwin*): Likewise.
2142 (i[34567]86-*-linux*): Likewise.
2143 (i[34567]86-*-lynxos*): Likewise.
2144 (i[34567]86-*-mingw32ce*): Likewise.
2145 (i[34567]86-*-mingw*): Likewise.
2146 (i[34567]86-*-nto*): Likewise.
2147 (tic6x-*-uclinux): Likewise.
2148 (x86_64-*-linux*): Likewise.
2149 (x86_64-*-mingw*): Likewise.
2150 (x86_64-*-cygwin*): Likewise.
2151
3b74854b
AH
21522018-04-18 Alan Hayward <alan.hayward@arm.com>
2153
2154 * tdesc.c: Remove xml parameter.
2155
e98577a9
AH
21562018-04-18 Alan Hayward <alan.hayward@arm.com>
2157
2158 * server.c (get_features_xml): Remove cast.
2159 * tdesc.c (void target_desc::accept): Fill in function.
2160 (tdesc_get_features_xml): Remove old xml creation.
2161 (print_xml_feature::visit_pre): Add xml vistor.
2162 * tdesc.h (struct target_desc): Make xmltarget mutable.
2163 (tdesc_get_features_xml): Remove declaration.
2164
d278f585
AH
21652018-04-18 Alan Hayward <alan.hayward@arm.com>
2166
2167 * tdesc.c (tdesc_architecture_name): Add new function.
2168 (tdesc_osabi_name): Likewise.
2169 (tdesc_get_features_xml): Use new functions.
2170
eee8a18d
AH
21712018-04-18 Alan Hayward <alan.hayward@arm.com>
2172
2173 * tdesc.c (tdesc_create_flags): Remove.
2174 (tdesc_add_flag): Likewise.
2175 (tdesc_named_type): Likewise.
2176 (tdesc_create_union): Likewise.
2177 (tdesc_create_struct): Likewise.
2178 (tdesc_create_vector): Likewise.
2179 (tdesc_add_bitfield): Likewise.
2180 (tdesc_add_field): Likewise.
2181 (tdesc_set_struct_size): Likewise.
2182
82ec9bc7
AH
21832018-04-18 Alan Hayward <alan.hayward@arm.com>
2184
2185 * tdesc.c (~target_desc): Remove implictly deleted items.
2186 (init_target_desc): Iterate all features.
2187 (tdesc_get_features_xml): Use vector.
2188 (tdesc_create_feature): Create feature.
2189 * tdesc.h (tdesc_feature) Remove
2190 (target_desc): Add features.
2191
ea3e7d71
AH
21922018-04-18 Alan Hayward <alan.hayward@arm.com>
2193
2194 * Makefile.in: Add common/tdesc.c
2195 * tdesc.c (init_target_desc): init all reg_defs from register
2196 vector.
2197 (tdesc_create_reg): Create tdesc_reg.
2198 * tdesc.h (tdesc_feature): Add register vector.
2199
17d08cd4
SM
22002018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2201
2202 * tdesc.h (struct target_desc) <features>: Change type to
2203 std::vector<std::string>.
2204 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2205 changes.
2206 (tdesc_get_features_xml): Likewise.
2207 (tdesc_create_feature): Likewise.
2208
5cd3e386
AH
22092018-03-26 Alan Hayward <alan.hayward@arm.com>
2210
2211 * regcache.c (find_register_by_number): Return a ref.
2212 (find_regno): Use references.
2213 (register_size): Likewise.
2214 (register_data): Likewise.
2215 * tdesc.c (target_desc::~target_desc): Remove free calls.
2216 (target_desc::operator==): Use std::vector compare.
2217 (init_target_desc): Use reference.
2218 (tdesc_create_reg): Use reg constructors.
2219 * tdesc.h (struct target_desc): Replace pointer with object.
2220
dff7492c
AH
22212018-03-23 Alan Hayward <alan.hayward@arm.com>
2222
2223 * regcache.c (find_register_by_number): Make static.
2224 (find_regno): Use find_register_by_number
2225 * regcache.h (struct reg): Remove declaration.
2226
d80e5242
AH
22272018-03-23 Alan Hayward <alan.hayward@arm.com>
2228
2229 * tdesc.c (target_desc::~target_desc): Move to here.
2230 (target_desc::operator==): Likewise.
2231 * tdesc.h (target_desc::~target_desc): Move from here.
2232 (target_desc::operator==): Likewise.
2233
f69c5afb
AA
22342018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2235
2236 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2237
ce29f843
AA
22382018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2239
2240 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2241 S390_TDESC_GS.
2242 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2243 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2244 and init_registers_s390_gs_linux64.
2245
c49bd90b
AA
22462018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2247
2248 * linux-s390-low.c (s390_fill_gs): Remove function.
2249 (s390_fill_gsbc): Remove function.
2250 (s390_regsets): Set fill functions for the guarded storage regsets
2251 to NULL.
2252
7edb9bd3
AA
22532018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2254
2255 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2256 the word size. Add comment.
2257 (s390_get_wordsize): New function.
2258 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2259 pswm with it. Instead, use s390_get_wordsize to determine the
2260 word size first and derive the correct tdesc from that directly.
2261
39be3c7e
SM
22622018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2263
2264 * Makefile.in: Include silent-rules.mk.
2265 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2266 (COMPILE): Add ECHO_CXX.
2267 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2268 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2269 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2270 (version-generated.c): Add ECHO_GEN.
2271 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2272 (IPAGENT_COMPILE): Add ECHO_CXX.
2273 (%-generated.c): Add ECHO_REGDAT.
2274
3ae9ce5d
TT
22752018-03-14 Tom Tromey <tom@tromey.com>
2276
2277 PR cli/14977:
2278 * ax.c (ax_printf): Special case for NULL.
2279
e6a58aa8
SM
22802018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2281
2282 * linux-low.c (linux_qxfer_libraries_svr4): Use
2283 xml_escape_text_append.
2284
f6e8a41e
SM
22852018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2286
2287 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2288
b9671caf
SM
22892018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2290
2291 * server.c (handle_general_set): Remove unnecessary xstrdup.
2292
e80aaf61
SM
22932018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2294
2295 * server.c (parse_debug_format_options): Adjust to
2296 delim_string_to_char_ptr_vec changes.
2297 * thread-db.c (thread_db_load_search): Adjust to
2298 dirnames_to_char_ptr_vec changes.
2299
b1223e78
MM
23002018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2301
2302 * target.h (target_enable_btrace, target_disable_btrace)
2303 (target_read_btrace, target_read_btrace_conf): Turn macro into
2304 inline function. Throw error if target method is not defined.
2305 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2306 check for btrace target method. Be prepared to handle exceptions
2307 from btrace target methods.
2308
81561546
SDJ
23092018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2310
2311 * server.c (captured_main): Change order of error message printed
2312 when the current working directory cannot be found.
2313
25e3c82c
SDJ
23142018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2315
2316 * server.c: Include "filenames.h" and "pathstuff.h".
2317 (program_name): Delete variable.
2318 (program_path): New anonymous class.
2319 (get_exec_wrapper): Use "program_path" instead of
2320 "program_name".
2321 (handle_v_run): Likewise.
2322 (captured_main): Likewise.
2323 (process_serial_event): Likewise.
2324
b4987c95
SDJ
23252018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2326
2327 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2328 (OBJS): Add "pathstuff.o".
2329 * server.c (current_directory): New global variable.
2330 (captured_main): Initialize "current_directory".
2331
f46cd62a
AH
23322018-02-26 Alan Hayward <alan.hayward@arm.com>
2333
2334 * tdesc.c: Use common/tdesc.h.
2335 * tdesc.h: Likewise.
2336
a543c5ca
AH
23372018-02-20 Alan Hayward <alan.hayward@arm.com>
2338 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * Makefile.in: Switch order of make rules.
2341
b5884fa7
AH
23422018-02-19 Alan Hayward <alan.hayward@arm.com>
2343
2344 * Makefile.in: Add common directory in build.
2345 * configure.ac: Add common reference.
2346 * configure: Regenerate.
2347
de6242d3
MM
23482018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2349
2350 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2351 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2352 * spu-low.c (spu_target_ops): Likewise.
2353 * win32-low.c (win32_target_ops): Likewise.
2354 * server.c (supported_btrace_packets): Report packets unconditionally.
2355 * target.h (target_ops) <supports_btrace>: Remove.
2356 (target_supports_btrace): Remove.
2357
9ee23a85
MM
23582018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2359
2360 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2361 (handle_btrace_disable): Change return type to void. Use exceptions
2362 to report errors.
2363 (handle_btrace_general_set): Catch exception and copy message to
2364 return message.
2365
8ce47547
TT
23662018-02-08 Tom Tromey <tom@tromey.com>
2367
2368 * linux-low.c (install_software_single_step_breakpoints): Use
2369 make_scoped_restore.
2370 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2371 (do_restore_current_thread_cleanup): Remove.
2372 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2373 declare.
2374
45dd3607
TT
23752018-02-08 Tom Tromey <tom@tromey.com>
2376
2377 * mem-break.c (set_raw_breakpoint_at): Use
2378 gdb::unique_xmalloc_ptr.
2379
e671cd59
PA
23802018-01-30 Pedro Alves <palves@redhat.com>
2381
2382 PR gdb/13211
2383 * target.c (target_terminal::terminal_state): Rename to ...
2384 (target_terminal::m_terminal_state): ... this.
2385
a0aad537
JC
23862018-01-19 James Clarke <jrtc27@jrtc27.com>
2387
2388 * linux-low.c (handle_extended_wait): Surround call to
2389 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2390
4d9b86e1
SM
23912018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2392
2393 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2394 linux_ptrace_attach_fail_reason_string now returning an
2395 std::string.
2396 (linux_attach): Likewise.
2397 * thread-db.c (attach_thread): Likewise.
2398
f517c180
EA
23992018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2400
2401 PR gdb/21559
2402 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2403 checking for fs_base/gs_base fields in struct user_regs_struct.
2404 * configure: Regenerate.
2405
9a70f35c
YQ
24062018-01-16 Yao Qi <yao.qi@linaro.org>
2407
2408 PR gdb/18749
2409 * linux-low.c (fetch_register): Call supply_register instead of
2410 error.
2411
605fd3c6
YQ
24122018-01-08 Yao Qi <yao.qi@linaro.org>
2413 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * Makefile.in (OBS): Remove selftest.o.
2416 * configure.ac: Set srv_selftest_objs if $development is true.
2417 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2418 * configure: Re-generated.
2419 * server.c (captured_main): Wrap variable selftest_filter with
2420 GDB_SELF_TEST.
2421
2cc05030
SM
24222018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * server.c (parse_debug_format_options): Return std::string.
2425 (handle_monitor_command, captured_main): Adjust.
2426
e379cee6
PA
24272018-01-05 Pedro Alves <palves@redhat.com>
2428
2429 PR gdb/18653
2430 * server.c (captured_main): Pass quiet=false to
2431 save_original_signals_state.
2432
82e1e79a
JB
24332018-01-01 Joel Brobecker <brobecker@adacore.com>
2434
2435 * gdbreplay.c (gdbreplay_version): Update copyright year in
2436 version message.
2437 * server.c (gdbserver_version): Likewise.
2438
8e481c3b
TT
24392017-12-08 Tom Tromey <tom@tromey.com>
2440
2441 * ax.c (ax_printf): Update.
2442
a8806230
YQ
24432017-12-07 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2446 aarch64_linux_read_description.
2447 * linux-amd64-ipa.c (idx2mask): New array.
2448 (get_ipa_tdesc): Move idx2mask out.
2449 (initialize_low_tracepoint): Initialize target descriptions.
2450 * linux-i386-ipa.c (idx2mask): New array.
2451 (get_ipa_tdesc): Move idx2mask out.
2452 (initialize_low_tracepoint): Initialize target descriptions.
2453
d4a0e8b5
SM
24542017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2455
2456 * tdesc.c (struct tdesc_type): Change return type.
2457 (tdesc_add_flag): Change parameter type.
2458 (tdesc_add_bitfield): Likewise.
2459 (tdesc_add_field): Likewise.
2460 (tdesc_set_struct_size): Likewise.
2461
798a7429
SM
24622017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2463
2464 * regcache.c (registers_to_string): Remove unused variable.
2465
c0e15c9b
SM
24662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2467
2468 * inferiors.c (for_each_inferior_with_data): Remove.
2469 * inferiors.h (for_each_inferior_with_data): Remove.
2470 * server.c (handle_qxfer_threads_worker): Change parameter type.
2471 (handle_qxfer_threads_proper): Use for_each_thread.
2472
f0045347
SM
24732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2474
2475 * inferiors.c (for_each_inferior): Remove.
2476 (clear_inferiors): Use for_each_thread.
2477 * inferiors.h (for_each_inferior): Remove.
2478 * linux-low.c (linux_wait_for_event_filtered): Use
2479 for_each_thread.
2480 (linux_stabilize_threads): Likewise.
2481 * regcache.c (regcache_release): Likewise.
2482 * server.c (gdb_wants_all_threads_stopped): Likewise.
2483 (clear_pending_status_callback): Remove.
2484 (handle_status): Use for_each_thread.
2485 (captured_main): Likewise.
2486 * win32-low.c (child_init_thread_list): Likewise.
2487 (win32_clear_inferiors): Likewise.
2488 (fake_breakpoint_event): Likewise.
2489
9521758b
SM
24902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2491
2492 * inferiors.h (find_inferior): Remove.
2493 * inferiors.c (find_inferior): Remove.
2494
8f86d7aa
SM
24952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2496
2497 * linux-low.c (resume_status_pending_p): Update comment.
2498 (need_step_over_p): Update comment.
2499
e2b44075
SM
25002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2501
2502 * linux-low.c (proceed_one_lwp): Return void, change parameter
2503 type.
2504 (unsuspend_and_proceed_one_lwp): Likewise.
2505 (proceed_all_lwps): Use for_each_thread.
2506 (unstop_all_lwps): Likewise.
2507
c80825ff
SM
25082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2509
2510 * linux-low.c (linux_resume_one_thread): Return void, take
2511 parameter directly.
2512 (linux_resume): Use for_each_thread.
2513
df3e4dbe
SM
25142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2515
2516 * linux-low.c (send_sigstop_callback): Return void, change
2517 parameter type. Rename to...
2518 (send_sigstop): ... this.
2519 (suspend_and_send_sigstop_callback): Return void, change parameter
2520 type. Rename to...
2521 (suspend_and_send_sigstop): ... this.
2522 (stop_all_lwps): Use for_each_thread.
2523
5a6b0a41
SM
25242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2525
2526 * linux-low.c (lwp_running): Return bool, remove unused
2527 argument.
2528 (linux_stabilize_threads): Use find_thread.
2529
39a64da5
SM
25302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2531
2532 * linux-low.c (select_singlestep_lwp_callback): Remove.
2533 (count_events_callback): Remove.
2534 (select_event_lwp_callback): Remove.
2535 (select_event_lwp): Use find_thread/for_each_thread.
2536
a1385b7b
SM
25372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * linux-low.c (not_stopped_callback): Return bool, take filter
2540 argument directly.
2541 (linux_wait_for_event_filtered): Use find_thread.
2542 (linux_wait_1): Likewise.
2543
454296a2
SM
25442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2545
2546 * linux-low.c (same_lwp): Remove.
2547 (find_lwp_pid): Use find_thread.
2548
6b2a85da
SM
25492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * linux-low.c (delete_lwp_callback): Remove.
2552 (linux_mourn): Use for_each_thread.
2553
798a38e8
SM
25542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2555
2556 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2557 args parameter, don't check for pid.
2558 (linux_detach): Use for_each_thread.
2559
e4eb0dec
SM
25602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2561
2562 * linux-low.c (struct counter): Remove.
2563 (second_thread_of_pid_p): Remove.
2564 (last_thread_of_process_p): Use find_thread.
2565
83e1b6c1
SM
25662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2567
2568 * inferiors.c (find_inferior_in_random): Remove.
2569 * inferiors.h (find_inferior_in_random): Remove.
2570 * linux-low.c (status_pending_p_callback): Return bool, accept
2571 parameter ptid directly.
2572 (linux_wait_for_event_filtered): Use find_thread_in_random.
2573 (linux_wait_1): Likewise.
2574
8dc7b443
SM
25752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2576
2577 * inferiors.c (find_inferior_id): Remove.
2578 (find_thread_ptid): Move implemention from find_inferior_id to
2579 here.
2580 * inferiors.h (find_inferior_id): Remove.
2581 * server.c (handle_status): Use find_thread_ptid.
2582 (process_serial_event): Likewise.
2583 * thread-db.c (find_one_thread): Likewise.
2584 (thread_db_thread_handle): Likewise.
2585 * win32-low.c (thread_rec): Likewise.
2586 (child_delete_thread): Likewise.
2587 (win32_thread_alive): Likewise.
2588 (get_child_debug_event): Likewise.
2589
da25033c
SM
25902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2591
2592 * linux-mips-low.c (update_watch_registers_callback): Return
2593 void, remove pid_p parameter, don't check for pid.
2594 (mips_insert_point, mips_remove_point): Use for_each_thread.
2595
c91bb56b
SM
25962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2597
2598 * lynx.low (lynx_delete_thread_callback): Remove.
2599 (lynx_mourn): Use for_each_thread.
2600
634a3254
SM
26012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2602
2603 * regcache.c (regcache_invalidate_one): Remove.
2604 (regcache_invalidate_pid): use for_each_thread.
2605
41272101
TT
26062017-11-26 Tom Tromey <tom@tromey.com>
2607
2608 * linux-low.c (linux_create_inferior): Update.
2609
f5291a6f
UW
26102017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2611
2612 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2613
6654d750
AH
26142017-11-24 Alan Hayward <alan.hayward@arm.com>
2615
2616 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2617 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2618 * linux-aarch64-tdesc-selftest.c: New file.
2619 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2620
26212017-11-24 Alan Hayward <alan.hayward@arm.com>
2622
2623 * configure.srv: Add new file.
2624 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2625 * linux-aarch64-tdesc-selftest.c: New file.
2626 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2627
49bdb7ee
AH
26282017-11-24 Alan Hayward <alan.hayward@arm.com>
2629
2630 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2631 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2632 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2633
d6d7ce56
AH
26342017-11-24 Alan Hayward <alan.hayward@arm.com>
2635
2636 * configure.srv: Add new files.
2637 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2638 aarch64_linux_read_description.
2639 * linux-aarch64-low.c (aarch64_linux_read_description):
2640 Merge with aarch64_arch_setup.
2641 (aarch64_arch_setup): Call aarch64_linux_read_description.
2642 * linux-aarch64-tdesc.c: New file.
2643 * linux-aarch64-tdesc.h: New file.
2644
506fe5f4
YQ
26452017-11-24 Yao Qi <yao.qi@linaro.org>
2646
2647 * configure.srv: Set $srv_regobj for tic6x-linux.
2648 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2649 (tic6x_read_description): Move some code to tic6x_arch_setup.
2650 (tic6x_tdesc_test): New function.
2651 (initialize_low_arch): Call selftests::register_test.
2652
29f9a567
YQ
26532017-11-22 Yao Qi <yao.qi@linaro.org>
2654
2655 * remote-utils.c (prepare_resume_reply): Use memcpy.
2656
578290ec
SM
26572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 * linux-low.c (kill_one_lwp_callback): Return void, take
2660 argument directly, don't filter on pid.
2661 (linux_kill): Use for_each_thread.
2662
eca55aec
SM
26632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2664
2665 * linux-low.c (need_step_over_p): Return bool, remove dummy
2666 argument.
2667 (linux_resume, proceed_all_lwps): Use find_thread.
2668
25c28b4d
SM
26692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2670
2671 * linux-low.c (resume_status_pending_p): Return bool, remove
2672 flag_p argument.
2673 (linux_resume): Use find_thread.
2674
5fdda392
SM
26752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2676
2677 * linux-low.c (struct thread_resume_array): Remove.
2678 (linux_set_resume_request): Return void, take arguments
2679 directly.
2680 (linux_resume): Use for_each_thread.
2681
fcb056a5
SM
26822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2683
2684 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2685 return bool, remove data argument.
2686 (linux_stabilize_threads): Use find_thread.
2687
139720c5
SM
26882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2689
2690 * linux-low.c (unsuspend_one_lwp): Remove.
2691 (unsuspend_all_lwps): Use for_each_thread, inline code from
2692 unsuspend_one_lwp.
2693
6d1e5673
SM
26942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2695
2696 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2697 * linux-low.c (struct iterate_over_lwps_args): Remove.
2698 (iterate_over_lwps_filter): Remove.
2699 (iterate_over_lwps): Use find_thread.
2700
bbf550d5
SM
27012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2702
2703 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2704 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2705 code from reset_lwp_ptrace_options_callback.
2706
00192f77
SM
27072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2708
2709 * linux-arm-low.c (struct update_registers_data): Remove.
2710 (update_registers_callback): Return void, take arguments
2711 directly, don't check thread's pid.
2712 (arm_insert_point, arm_remove_point): Use for_each_thread.
2713
2bee2b6c
SM
27142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2715
2716 * win32-low.c (continue_one_thread): Return void, take argument
2717 directly.
2718 (child_continue): Use for_each_thread.
2719
0b360f19
SM
27202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2721
2722 * win32-i386-low.c (update_debug_registers_callback): Rename
2723 to ...
2724 (update_debug_registers): ... this, return void, remove pid_p arg.
2725 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2726
f27866ba
SM
27272017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2728
2729 * inferiors.h (struct process_info): Add constructor, initialize
2730 fields..
2731 <syscalls_to_catch>: Change type to std::vector<int>.
2732 * inferiors.c (add_process): Allocate process_info with new.
2733 (remove_process): Free process_info with delete.
2734 * linux-low.c (handle_extended_wait): Adjust.
2735 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2736 * server.c (handle_general_set): Adjust.
2737
e849ea89
PA
27382017-11-16 Pedro Alves <palves@redhat.com>
2739
2740 * remote-utils.c (remote_close): Block SIGIO signals instead of
2741 uninstalling the SIGIO handler.
2742
1d0aa65c
AH
27432017-11-16 Alan Hayward <alan.hayward@arm.com>
2744
2745 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2746
3491a34c
YQ
27472017-11-16 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2750 (tic6x_store_gregset): Likewise.
2751 (tic6x_usrregs_info): Move it up.
2752
a602f924
AH
27532017-11-15 Alan Hayward <alan.hayward@arm.com>
2754
2755 * Makefile.in: Update arch rules.
2756 * configure.srv: Explicitly mark arch/ files.
2757
5616b6c3
AS
27582017-11-13 Andreas Schwab <schwab@suse.de>
2759
2760 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2761 function.
2762 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2763
d1928160
PA
27642017-11-06 Pedro Alves <palves@redhat.com>
2765
2766 * config.in, configure: Regenerate.
2767
bac608e7
SM
27682017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * target.c (struct thread_search): Remove.
2771 (thread_search_callback): Remove.
2772 (prepare_to_access_memory): Use for_each_thread instead of
2773 find_inferior. Inline code from thread_search_callback.
2774
eaddb425
SM
27752017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2776
2777 * server.c (struct visit_actioned_threads_data): Remove.
2778 (visit_actioned_threads): Change prototype to take arguments
2779 directly.
2780 (resume): Use find_thread instead of find_inferior.
2781
99078d34
SM
27822017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2783
2784 * server.c (queue_stop_reply_callback): Change prototype, return
2785 void.
2786 (find_status_pending_thread_callback): Remove.
2787 (handle_status): Replace find_inferior with find_thread and
2788 for_each_thread.
2789
cc628f3d
AH
27902017-10-25 Alan Hayward <alan.hayward@arm.com>
2791
2792 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2793 with REGNO.
2794 (aarch64_store_gregset): Likewise.
2795 (aarch64_fill_fpregset): Likewise.
2796 (aarch64_store_fpregset): Likewise.
2797
4d3bb80e
SM
27982017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2799
2800 * gdbthread.h (find_thread, for_each_thread): New functions.
2801 * inferiors.c (thread_of_pid): Remove.
2802 (find_any_thread_of_pid): Use find_thread.
2803 * linux-low.c (num_lwps): Use for_each_thread.
2804
7a7cdfa0
YQ
28052017-10-17 Yao Qi <yao.qi@linaro.org>
2806
2807 * Makefile.in: Remove one rule.
2808 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2809
e675d170
YQ
28102017-10-17 Yao Qi <yao.qi@linaro.org>
2811
2812 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2813 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2814
7eb4e0f9
YQ
28152017-10-17 Yao Qi <yao.qi@linaro.org>
2816
2817 * configure.srv: Rename arm.o with arch/arm.o.
2818
60d6cfc9
YQ
28192017-10-17 Yao Qi <yao.qi@linaro.org>
2820
2821 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2822 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2823 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2824 (arch-i386.o, arch-amd64.o): Remove rules.
2825 (arch/%.o): New rule.
2826 Update POSTCOMPILE and COMPILE.pre.
2827 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2828 * configure: Re-generated.
2829 * configure.srv: Replace arch-i386.o with arch/i386.o.
2830 Replace arch-amd64.o with arch/amd64.o.
2831
5bfda255
YQ
28322017-10-16 Yao Qi <yao.qi@linaro.org>
2833
2834 * configure: Regenerated.
2835
9c80ecd6
SM
28362017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * inferiors.h: (struct inferior_list): Remove.
2839 (struct inferior_list_entry); Remove.
2840 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2841 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2842 get_first_inferior): Remove.
2843 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2844 find_inferior_id, find_inferior_in_random): Change signature.
2845 * inferiors.c (all_threads): Change type to
2846 std::list<thread_info *>.
2847 (get_thread): Remove macro.
2848 (find_inferior, find_inferior_id): Change signature, implement
2849 using find_thread.
2850 (find_inferior_in_random): Change signature, implement using
2851 find_thread_in_random.
2852 (for_each_inferior, for_each_inferior_with_data): Change
2853 signature, implement using for_each_thread.
2854 (add_inferior_to_list, remove_inferior): Remove.
2855 (add_thread, get_first_thread, thread_of_pid,
2856 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2857 (get_first_inferior, one_inferior_p, clear_inferior_list):
2858 Remove.
2859 (clear_inferiors, get_thread_process): Update.
2860 * gdbthread.h: Include <list>.
2861 (struct thread_info) <entry>: Remove field.
2862 <id>: New field.
2863 (all_threads): Change type to std::list<thread_info *>.
2864 (get_first_inferior): Add doc.
2865 (find_thread, for_each_thread, find_thread_in_random): New
2866 functions.
2867 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2868 * linux-arm-low.c (update_registers_callback): Update.
2869 * linux-low.c (second_thread_of_pid_p): Update.
2870 (kill_one_lwp_callback, linux_detach_lwp_callback,
2871 delete_lwp_callback, status_pending_p_callback, same_lwp,
2872 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2873 iterate_over_lwps, not_stopped_callback,
2874 resume_stopped_resumed_lwps, count_events_callback,
2875 select_singlestep_lwp_callback, select_event_lwp_callback,
2876 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2877 suspend_and_send_sigstop_callback, wait_for_sigstop,
2878 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2879 lwp_running, linux_set_resume_request, resume_status_pending_p,
2880 need_step_over_p, start_step_over, linux_resume_one_thread,
2881 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2882 reset_lwp_ptrace_options_callback): Update.
2883 * linux-mips-low.c (update_watch_registers_callback): Update.
2884 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2885 Update.
2886 (free_register_cache_thread_one): Remove.
2887 (regcache_release): Update.
2888 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2889 handle_qxfer_threads_worker): Update.
2890 (handle_query): Update, use list iterator.
2891 (visit_actioned_threads, handle_pending_status,
2892 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2893 clear_pending_status_callback, set_pending_status_callback,
2894 find_status_pending_thread_callback, handle_status,
2895 process_serial_event): Update.
2896 * target.c (thread_search_callback): Update.
2897 * thread-db.c (thread_db_get_tls_address): Update.
2898 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2899 Update.
2900 * win32-i386-low.c (update_debug_registers_callback): Update.
2901 * win32-low.c (delete_thread_info, child_delete_thread,
2902 continue_one_thread, suspend_one_thread,
2903 get_child_debug_event): Adjust.
2904
9179355e
SM
29052017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2906
2907 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2908 * inferiors.h: Include <list>.
2909 (struct process_info) <entry>: Remove field.
2910 <pid>: New field.
2911 (pid_of): Change macro to function.
2912 (ptid_of, lwpid_of): Remove macro.
2913 (all_processes): Change type to std::list<process_info *>.
2914 (ALL_PROCESSES): Remove macro.
2915 (for_each_process, find_process): New function.
2916 * inferiors.c (all_processes): Change type to
2917 std::list<process_info *>.
2918 (find_thread_process): Adjust.
2919 (add_process): Likewise.
2920 (remove_process): Likewise.
2921 (find_process_pid): Likewise.
2922 (get_first_process): Likewise.
2923 (started_inferior_callback): Remove.
2924 (have_started_inferiors_p): Adjust.
2925 (attached_inferior_callback): Remove.
2926 (have_attached_inferiors_p): Adjust.
2927 * linux-low.c (check_zombie_leaders): Likewise.
2928 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2929 (x86_linux_update_xmltarget): Adjust.
2930 * server.c (handle_query): Likewise.
2931 (gdb_reattached_process): Remove.
2932 (handle_status): Adjust.
2933 (kill_inferior_callback): Likewise.
2934 (detach_or_kill_inferior): Remove.
2935 (print_started_pid): Likewise.
2936 (print_attached_pid): Likewise.
2937 (detach_or_kill_for_exit): Update.
2938 (process_serial_event): Likewise.
2939 * linux-arm-low.c (arm_new_fork): Likewise.
2940
c9cb8905
SM
29412017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * dll.h: Include <list>.
2944 (struct dll_info): Add constructor.
2945 <entry>: Remove field.
2946 (all_dlls): Change type to std::list<dll_info>.
2947 * dll.c: Include <algorithm>.
2948 (get_dll): Remove macro.
2949 (all_dlls): Change type to std::list<dll_info *>.
2950 (free_one_dll): Remove.
2951 (match_dll): Likewise.
2952 (loaded_dll): Adjust.
2953 (unloaded_dll): Adjust to all_dlls type change, use
2954 std::find_if. Inline code from match_dll.
2955 (clear_dlls): Adjust to all_dlls type change.
2956 * server.c (emit_dll_description): Remove.
2957 (handle_qxfer_libraries): Adjust to all_dlls type change,
2958 integrate emit_dll_description's functionality.
2959
04ec7890
SM
29602017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2961
2962 * linux-low.h (struct linux_target_ops) <delete_process>: New
2963 field.
2964 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2965 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2966 (struct linux_target_ops): Add delete_process callback.
2967 * linux-arm-low.c (arm_delete_process): New.
2968 (struct linux_target_ops): Add delete_process callback.
2969 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2970 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2971 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2972 * linux-mips-low.c (mips_linux_delete_process): New.
2973 (struct linux_target_ops): Add delete_process callback.
2974 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2975 * linux-s390-low.c (struct linux_target_ops): Likewise.
2976 * linux-sh-low.c (struct linux_target_ops): Likewise.
2977 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2978 * linux-tile-low.c (struct linux_target_ops): Likewise.
2979 * linux-x86-low.c (x86_linux_delete_process): New.
2980 (struct linux_target_ops): Add delete_process callback.
2981 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2982
466eecee
SM
29832017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2984
2985 * linux-aarch64-low.c (the_low_target): Add thread delete
2986 callback.
2987 * linux-arm-low.c (arm_delete_thread): New function.
2988 (the_low_target): Add thread delete callback.
2989 * linux-bfin-low.c (the_low_target): Likewise.
2990 * linux-crisv32-low.c (the_low_target): Likewise.
2991 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2992 set.
2993 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2994 field.
2995 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2996 * linux-mips-low.c (mips_linux_delete_thread): New function.
2997 (the_low_target): Add thread delete callback.
2998 * linux-ppc-low.c (the_low_target): Likewise.
2999 * linux-s390-low.c (the_low_target): Likewise.
3000 * linux-sh-low.c (the_low_target): Likewise.
3001 * linux-tic6x-low.c (the_low_target): Likewise.
3002 * linux-tile-low.c (the_low_target): Likewise.
3003 * linux-x86-low.c (the_low_target): Likewise.
3004 * linux-xtensa-low.c (the_low_target): Likewise.
3005
b79f7801
YZ
30062017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3007
3008 * win32-low.c: Include "common-inferior.h".
3009
bc3b087d
SDJ
30102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3011
3012 * inferiors.c (set_inferior_cwd): New function.
3013 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3014 (handle_query): Inform that QSetWorkingDir is supported.
3015 * win32-low.c (create_process): Pass the inferior's cwd to
3016 CreateProcess.
3017
d092c5a2
SDJ
30182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3019
3020 * inferiors.c (current_inferior_cwd): New global variable.
3021 (get_inferior_cwd): New function.
3022 * inferiors.h (struct process_info) <cwd>: New field.
3023
7da0a886
SDJ
30242017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3025
3026 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3027 (OBS): Add gdb_tilde_expand.o.
3028
289a6840
SM
30292017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3030
3031 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3032 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3033
256642e8
PA
30342017-09-29 Pedro Alves <palves@redhat.com>
3035
3036 * ax.c (gdb_parse_agent_expr): Constify.
3037 * ax.h (gdb_parse_agent_expr): Constify.
3038 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3039 Constify.
3040 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3041 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3042 * remote-utils.h (read_ptid): Constify.
3043 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3044 (process_point_options, process_serial_event): Constify.
3045 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3046 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3047 (cmd_qtbuffer): Constify.
3048
5b9ca4d4
PA
30492017-09-29 Pedro Alves <palves@redhat.com>
3050
3051 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3052 fails.
3053
94c207e0
PA
30542017-09-29 Pedro Alves <palves@redhat.com>
3055
3056 * linux-low.c (handle_extended_wait): Pass parent thread instead
3057 of process to thread_db_notice_clone.
3058 * linux-low.h (thread_db_notice_clone): Replace parent process
3059 parameter with parent thread parameter.
3060 * thread-db.c (find_one_thread): Add comment.
3061 (thread_db_notice_clone): Replace parent process parameter with
3062 parent thread parameter. Temporarily switch to the parent thread.
3063
75352e28
SDJ
30642017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3065
3066 * gdbthread.h: Include "common-gdbthread.h".
3067 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3068 "if" when validating the ptid.
3069 * remote-utils.c: Include "gdbthread.h".
3070 (prepare_resume_reply): Use "switch_to_thread".
3071 * target.c (done_accessing_memory): Likewise.
3072
ad339634
AA
30732017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3074
3075 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3076 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3077 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3078 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3079 s390x-gs-linux64-ipa.o to ipa_obj.
3080 * linux-s390-low.c (HWCAP_S390_GS): New define.
3081 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3082 New functions.
3083 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3084 (s390_arch_setup): Check for guarded-storage support and choose
3085 appropriate tdesc.
3086 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3087 init_registers_s390x_gs_linux64.
3088 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3089 enum value.
3090 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3091 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3092
cc4d742f
SM
30932017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3094
3095 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3096
f6327dcb
KB
30972017-09-21 Kevin Buettner <kevinb@redhat.com>
3098
3099 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3100 (thread_db_thread_handle): Declare.
3101 * linux-low.c (linux_target_ops): Initialize thread_handle.
3102 * server.c (handle_qxfer_threads_worker): Add support for
3103 "handle" attribute.
3104 * target.h (struct target_ops): Add new function pointer,
3105 thread_handle.
3106 (target_thread_handle): Define.
3107 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3108 field in lwp.
3109 (thread_db_thread_handle): New function.
3110
86299109
KB
31112017-09-21 Kevin Buettner <kevinb@redhat.com>
3112
3113 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3114 * linux-low.h (thread_db_notice_clone): Declare.
3115 * thread-db.c (thread_db_notice_clone): New function.
3116
f557a88a
PA
31172017-09-21 Pedro Alves <palves@redhat.com>
3118
3119 * server.c (gdb_read_memory, handle_status, process_serial_event)
3120 (handle_serial_event, handle_target_event): Adjust to
3121 set_desired_thread prototype change.
3122 * target.c (set_desired_thread): Remove 'use_general' parameter
3123 and adjust.
3124 * target.h (set_desired_thread): Remove 'use_general' parameter.
3125
223ffa71
TT
31262017-09-20 Tom Tromey <tom@tromey.com>
3127
3128 * target.c (target_terminal::terminal_state): Define.
3129 (target_terminal::init): Rename from target_terminal_init.
3130 (target_terminal::inferior): Rename from
3131 target_terminal_inferior.
3132 (target_terminal::ours): Rename from target_terminal_ours.
3133 (target_terminal::ours_for_output, target_terminal::info): New.
3134
04fd3ba9
SM
31352017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3136
3137 * server.c (accumulate_file_name_length): Remove.
3138 (emit_dll_description): Adjust to std::string change.
3139 (handle_qxfer_libraries): Use std::string to hold document.
3140
5e187554
SM
31412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3142
3143 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3144 return type of xml_escape_text.
3145 * server.c (emit_dll_description): Likewise.
3146
1526853e
SM
31472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * server.c (captured_main): Accept argument for --selftest.
3150 Update run_tests call.
3151 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3152 when registering selftests.
3153
c4dfafab
SDJ
31542017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3155
3156 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3157 instead of "VEC" for "target_desc.reg_defs".
3158 (regcache_cpy): Likewise.
3159 (registers_to_string): Likewise.
3160 (registers_from_string): Likewise.
3161 (find_regno): Likewise.
3162 (supply_regblock): Likewise.
3163 (regcache_raw_read_unsigned): Likewise.
3164 * tdesc.c (init_target_desc): Likewise.
3165 (tdesc_create_reg): Likewise.
3166 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3167 (struct target_desc) <reg_defs>: Convert to "std::vector".
3168 (target_desc): Do not initialize "reg_defs".
3169 (~target_desc): Update code to use "std::vector" instead of "VEC"
3170 for "target_desc.reg_defs".
3171 (operator==): Likewise.
3172
124aceb4
SM
31732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * inferiors.h (thread_to_gdb_id): Remove.
3176 * inferiors.c (thread_to_gdb_id): Remove.
3177 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3178 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3179 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3180 Likewise.
3181 * nto-low.c (nto_fetch_registers, nto_store_registers,
3182 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3183
96cde54f
SM
31842017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3185
3186 * inferiors.h (gdb_id_to_thread_id): Remove.
3187 * inferiors.c (gdb_id_to_thread_id): Remove.
3188 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3189 removal. Move pid declaration closer to where it's used.
3190
e8ca139e
SM
31912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3192
3193 * server.c (handle_detach): New function.
3194 (process_serial_event): Move code out, call handle_detach.
3195
f8a4e119
SM
31962017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3197
3198 * server.c (require_running): Rename to ...
3199 (require_running_or_return): ... this ...
3200 (require_running_or_break): ... and this.
3201 (handle_query, process_serial_event): Adjust.
3202
0eb0a407
SM
32032017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3204
3205 * linux-low.c (linux_set_resume_request): Remove unused
3206 variables.
3207
785922a5
SM
32082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3209
3210 * server.c (first_thread_of): Remove.
3211 (process_serial_event): Replace usage of first_thread_of with
3212 find_any_thread_of_pid.
3213 * tracepoint.c (same_process_p): Remove.
3214 (gdb_agent_about_to_close): Replace usage of same_process_p with
3215 find_any_thread_of_pid.
3216 * linux-x86-low.c (same_process_callback): Remove.
3217 (x86_arch_setup_process_callback): Replace usage of
3218 same_process_callback with find_any_thread_of_pid.
3219 * thread-db.c (any_thread_of): Remove.
3220 (switch_to_process): Replace usage of any_thread_of with
3221 find_any_thread_of_pid.
3222 * inferiors.c (thread_pid_matches_callback): Remove.
3223 (find_thread_process): Adjust to use find_any_thread_of_pid.
3224
a059f00c
SDJ
32252017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3226
3227 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3228 with "!VEC_empty".
a059f00c 3229
cc397f3a
SDJ
32302017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3231
3232 * linux-low.c (handle_extended_wait): Use
3233 "allocate_target_description" instead of "XNEW".
3234 * linux-x86-low.c (initialize_low_arch): Likewise.
3235
22916b07
YQ
32362017-09-05 Yao Qi <yao.qi@linaro.org>
3237
3238 * configure.srv (srv_i386_regobj): Remove.
3239 (srv_amd64_regobj): Remove.
3240 (srv_regobj): Set it to "" for x86 non-linux targets.
3241 * linux-x86-tdesc.c (i386_linux_read_description):
3242 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3243 (init_registers_i386): Remove the declaration.
3244 (tdesc_i386): Remove the declaration.
3245 (lynx_i386_arch_setup): Call i386_create_target_description.
3246 * nto-x86-low.c: Likewise.
3247 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3248 [!__x86_64__]: include arch/i386.h.
3249 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3250
38602d55
YQ
32512017-09-05 Yao Qi <yao.qi@linaro.org>
3252
3253 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3254 i386/amd64-XXX-linux from it.
3255
44b886ff
YQ
32562017-09-05 Yao Qi <yao.qi@linaro.org>
3257
3258 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3259 false.
3260 (ipa_amd64_linux_regobj): Remove.
3261 (ipa_x32_linux_regobj): Remove.
3262
b4570e4b
YQ
32632017-09-05 Yao Qi <yao.qi@linaro.org>
3264
3265 * Makefile.in (arch-amd64.o): New rule.
3266 * configure.srv: Append arch-amd64.o.
3267 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3268 (get_ipa_tdesc): Call amd64_linux_read_description.
3269 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3270 and init_registers_amd64_XXX.
3271 * linux-x86-low.c (x86_linux_read_description): Call
3272 amd64_linux_read_description.
3273 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3274 (initialize_low_arch): Don't call init_registers_x32_XXX and
3275 init_registers_amd64_XXX.
3276 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3277 and tdesc_amd64_XXX.
3278 [__x86_64__] (amd64_tdesc_test): New function.
3279 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3280 and init_registers_amd64_XXX.
3281 * linux-x86-tdesc.c: Include arch/amd64.h.
3282 (xcr0_to_tdesc_idx): New function.
3283 (i386_linux_read_description): New function.
3284 (amd64_get_ipa_tdesc_idx): New function.
3285 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3286 (amd64_get_ipa_tdesc): Declare.
3287
d1f28ea2
YQ
32882017-09-05 Yao Qi <yao.qi@linaro.org>
3289
3290 * configure.srv (srv_i386_linux_xmlfiles): Remove
3291 i386/i386-XXX-linux.xml from it.
3292
25a93583
YQ
32932017-09-05 Yao Qi <yao.qi@linaro.org>
3294
3295 * configure.srv: Set srv_i386_linux_regobj empty if $development
3296 is false.
3297 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3298 initialize_low_tdesc.
3299 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3300 with #if initialize_low_tdesc.
3301 * linux-x86-tdesc-selftest.c: New file.
3302 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3303
5f035c07
YQ
33042017-09-05 Yao Qi <yao.qi@linaro.org>
3305
3306 * Makefile.in (arch-i386.o): New rule.
3307 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3308 (x86_64-*-linux*): Likewise.
3309 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3310 include arch/i386.h.
3311 (i386_linux_read_description): Remove code and call
3312 i386_create_target_description.
3313 * tdesc.c (allocate_target_description): New function.
3314 * tdesc.h (set_tdesc_architecture): Remove declaration.
3315 (set_tdesc_osabi): Likewise.
3316
0abe8a89
YQ
33172017-09-05 Yao Qi <yao.qi@linaro.org>
3318
3319 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3320 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3321 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3322 .xmltarget.
3323 * server.c (get_features_xml): Call tdesc_get_features_xml.
3324 * tdesc.c (set_tdesc_architecture): New function.
3325 (set_tdesc_osabi): New function.
3326 (tdesc_get_features_xml): New function.
3327 (tdesc_create_feature): Add an argument.
3328 * tdesc.h (struct target_desc) <features>: New field.
3329 <arch, osabi>: New field.
3330 (~target_desc): xfree features, arch, and osabi.
3331 (target_desc::oerator==): Don't compare .xmltarget.
3332 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3333 (set_tdesc_osabi): Likewise.
3334 (tdesc_get_features_xml): Likewise.
3335
0a188386
YQ
33362017-09-05 Yao Qi <yao.qi@linaro.org>
3337
3338 * linux-x86-tdesc.c: Include selftest.h.
3339 (i386_tdesc_test): New function.
3340 (initialize_low_tdesc): Call selftests::register_test.
3341 * tdesc.h: Include regdef.h.
3342 (target_desc): Override operator == and !=.
3343
f49ff000
YQ
33442017-09-05 Yao Qi <yao.qi@linaro.org>
3345
3346 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3347 (ipa_obj): Likewise.
3348 * linux-i386-ipa.c: Include common/x86-xstate.h
3349 (get_ipa_tdesc): Call i386_linux_read_description.
3350 (initialize_low_tracepoint): Don't call init_registers_XXX
3351 functions, call initialize_low_tdesc instead.
3352 * linux-x86-low.c (x86_linux_read_description): Call
3353 i386_linux_read_description.
3354 (initialize_low_arch): Don't call init_registers_i386_XXX
3355 functions, call initialize_low_tdesc.
3356 * linux-x86-tdesc.c: New file.
3357 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3358 (i386_get_ipa_tdesc_idx): Declare.
3359 (i386_get_ipa_tdesc): Declare.
3360 (initialize_low_tdesc): Declare.
3361
2b68ef2f
YQ
33622017-09-05 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3365 instead of 0.
3366
f7000548
YQ
33672017-09-05 Yao Qi <yao.qi@linaro.org>
3368
3369 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3370 * regcache.c (get_thread_regcache): Use VEC_length.
3371 (init_register_cache): Likewise.
3372 (regcache_cpy): Likewise.
3373 (registers_to_string): Iterate reg_defs via VEC_iterate.
3374 (find_regno): Likewise.
3375 (find_register_by_number): Use VEC_index.
3376 (register_size): Call find_register_by_number.
3377 (register_data): Call find_register_by_number.
3378 (supply_regblock): Use VEC_length.
3379 (regcache_raw_read_unsigned): Likewise.
3380 * tdesc.c (init_target_desc): Iterate reg_defs via
3381 VEC_iterate.
3382 (default_description): Update initializer.
3383 (copy_target_description): Don't update field num_registers.
3384 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3385 <num_registers>: Remove.
3386
50a421ac
SM
33872017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3388
3389 * Makefile.in (.SECONDARY): Define target.
3390
23fdd69e
SM
33912017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3392
3393 * linux-low.c (linux_wait_1): Adjust.
3394 * server.c (queue_stop_reply_callback): Adjust.
3395
0a2dde4a
SDJ
33962017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3397
3398 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3399 QEnvironmentUnset and QEnvironmentReset packets.
3400 (handle_query): Inform remote that QEnvironmentHexEncoded,
3401 QEnvironmentUnset and QEnvironmentReset are supported.
3402
6afd337d
SM
34032017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3404
3405 * inferiors.h (inferior_target_data): Rename to ...
3406 (thread_target_data): ... this.
3407 (inferior_regcache_data): Rename to ...
3408 (thread_regcache_data): ... this.
3409 (set_inferior_regcache_data): Rename to ...
3410 (set_thread_regcache_data): ... this.
3411 * inferiors.c (inferior_target_data): Rename to ...
3412 (thread_target_data): ... this.
3413 (inferior_regcache_data): Rename to ...
3414 (thread_regcache_data): ... this.
3415 (set_inferior_regcache_data): Rename to ...
3416 (set_thread_regcache_data): ... this.
3417 (free_one_thread): Update.
3418 * linux-low.h (get_thread_lwp): Update.
3419 * regcache.c (get_thread_regcache): Update.
3420 (regcache_invalidate_thread): Update.
3421 (free_register_cache_thread): Update.
3422 * win32-i386-low.c (update_debug_registers_callback): Update.
3423 (win32_get_current_dr): Update.
3424 * win32-low.c (thread_rec): Update.
3425 (delete_thread_info): Update.
3426 (continue_one_thread): Update.
3427 (suspend_one_thread): Update.
3428
a160cc46
SM
34292017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3430
3431 * inferiors.c (set_inferior_target_data): Remove.
3432 * inferiors.h (set_inferior_target_data): Remove.
3433
6d580b63
YQ
34342017-08-18 Yao Qi <yao.qi@linaro.org>
3435
3436 * Makefile.in (OBS): Add selftest.o.
3437 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3438 * configure, config.in: Re-generated.
3439 * server.c: Include common/sefltest.h.
3440 (captured_main): Handle option --selftest.
3441
f5a29eb0
YQ
34422017-08-09 Yao Qi <yao.qi@linaro.org>
3443
3444 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3445 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3446 i386-avx-mpx.o and i386-mmx.o.
3447 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3448 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3449 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3450 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3451 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3452 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3453 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3454 i386/amd64-avx-mpx.xml.
3455
57757c2f
YQ
34562017-08-09 Yao Qi <yao.qi@linaro.org>
3457
3458 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3459 and x32-avx-avx512.o.
3460 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3461 i386/x32-avx-avx512.xml.
3462
229d26fc
SM
34632017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3464
3465 * tracepoint.h (enum class fast_tpoint_collect_result): New
3466 enumeration.
3467 (fast_tracepoint_collecting): Change return type to
3468 fast_tpoint_collect_result.
3469 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3470 * linux-low.h: Include tracepoint.h.
3471 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3472 fast_tpoint_collect_result.
3473 * linux-low.c (handle_tracepoints): Adjust.
3474 (linux_fast_tracepoint_collecting): Change return type to
3475 fast_tpoint_collect_result.
3476 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3477 linux_wait_1, stuck_in_jump_pad_callback,
3478 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3479 proceed_one_lwp): Adjust to type change.
3480
2e1e43e1
YQ
34812017-07-10 Yao Qi <yao.qi@linaro.org>
3482
3483 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3484
adc764e7
YQ
34852017-06-29 Yao Qi <yao.qi@linaro.org>
3486
3487 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3488 Remove.
3489 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3490
a206891a
SM
34912017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3494
9a6c7d9c
SDJ
34952017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3496
3497 * linux-low.c (linux_create_inferior): Adjust code to access the
3498 environment information via 'gdb_environ' class.
3499 * lynx-low.c (lynx_create_inferior): Likewise.
3500 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3501 (get_environ): Return a pointer to 'our_environ'.
3502 (captured_main): Initialize 'our_environ'.
3503 * server.h (get_environ): Adjust prototype.
3504 * spu-low.c (spu_create_inferior): Adjust code to access the
3505 environment information via 'gdb_environ' class.
3506
ae3e2ccf
SM
35072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3508
3509 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3510 usage of "register" keyword.
3511
3e019bdc
SM
35122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3513
3514 * configure: Re-generate.
3515
8465943a
SM
35162017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3517
3518 * configure: Re-generate.
3519
cf0dd6f0
SM
35202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3521
3522 * Makefile.in (COMPILE.pre): Add "-x c++".
3523
9845682b
SDJ
35242017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3525
3526 * fork-child.c: Conditionally include <signal.h>.
3527
aefd8b33
SDJ
35282017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3529
3530 * server.c (handle_general_set): Handle new packet
3531 "QStartupWithShell".
3532 (handle_query): Add "QStartupWithShell" to the list of supported
3533 packets.
3534 (gdbserver_usage): Add help text explaining the
3535 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3536 options.
3537 (captured_main): Recognize and act upon the presence of the new
3538 CLI options.
3539
2090129c
SDJ
35402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3541 Pedro Alves <palves@redhat.com>
3542
3543 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3544 * configure: Regenerate.
3545 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3546 "fork-inferior.o".
3547 (i[34567]86-*-lynxos*): Likewise.
3548 (spu*-*-*): Likewise.
3549 * fork-child.c: New file.
3550 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3551 and "environ.h".
3552 (linux_ptrace_fun): New function.
3553 (linux_create_inferior): Adjust function prototype to reflect
3554 change on "target.h". Adjust function code to use
3555 "fork_inferior".
3556 (linux_request_interrupt): Delete "signal_pid".
3557 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3558 (lynx_ptrace_fun): New function.
3559 (lynx_create_inferior): Adjust function prototype to reflect
3560 change on "target.h". Adjust function code to use
3561 "fork_inferior".
3562 * nto-low.c (nto_create_inferior): Adjust function prototype and
3563 code to reflect change on "target.h". Update comments.
3564 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3565 "common-terminal.h" and "environ.h".
3566 (terminal_fd): Moved to fork-child.c.
3567 (old_foreground_pgrp): Likewise.
3568 (restore_old_foreground_pgrp): Likewise.
3569 (last_status): Make it global.
3570 (last_ptid): Likewise.
3571 (our_environ): New variable.
3572 (startup_with_shell): Likewise.
3573 (program_name): Likewise.
3574 (program_argv): Rename to...
3575 (program_args): ...this.
3576 (wrapper_argv): New variable.
3577 (start_inferior): Delete function.
3578 (get_exec_wrapper): New function.
3579 (get_exec_file): Likewise.
3580 (get_environ): Likewise.
3581 (prefork_hook): Likewise.
3582 (post_fork_inferior): Likewise.
3583 (postfork_hook): Likewise.
3584 (postfork_child_hook): Likewise.
3585 (handle_v_run): Update code to deal with arguments coming from the
3586 remote host. Update calls from "start_inferior" to
3587 "create_inferior".
3588 (captured_main): Likewise. Initialize environment variable. Call
3589 "have_job_control".
3590 * server.h (post_fork_inferior): New prototype.
3591 (get_environ): Likewise.
3592 (last_status): Declare.
3593 (last_ptid): Likewise.
3594 (signal_pid): Likewise.
3595 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3596 (spu_ptrace_fun): New function.
3597 (spu_create_inferior): Adjust function prototype to reflect change
3598 on "target.h". Adjust function code to use "fork_inferior".
3599 * target.c (target_terminal_init): New function.
3600 (target_terminal_inferior): Likewise.
3601 (target_terminal_ours): Likewise.
3602 * target.h: Include <vector>.
3603 (struct target_ops) <create_inferior>: Update prototype.
3604 (create_inferior): Update macro.
3605 * utils.c (gdb_flush_out_err): New function.
3606 * win32-low.c (win32_create_inferior): Adjust function prototype
3607 and code to reflect change on "target.h".
3608
043a4934
SDJ
36092017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3610
3611 * inferiors.c (switch_to_thread): New function.
3612
15652511
SDJ
36132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3614
3615 * Makefile.in (SFILE): Add "common/job-control.c".
3616 (OBS): Add "job-control.o".
3617
21ea5acd
SDJ
36182017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3619
3620 * Makefile: Remove "@host_makefile_frag@".
3621
e13cb306
PA
36222017-05-05 Pedro Alves <palves@redhat.com>
3623
3624 * configure: Regenerate.
3625
c94fee56
SDJ
36262017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3627
3628 * configure: Regenerate.
3629
a0ff9e1a
SM
36302017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3631
3632 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3633 software_single_step change of return type to
3634 std::vector<CORE_ADDR>.
3635 * linux-low.c (install_software_single_step_breakpoints):
3636 Likewise.
3637 * linux-low.h (install_software_single_step_breakpoints):
3638 Likewise.
3639
be628ab8
SDJ
36402017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3641
3642 * remote-utils.c: Include "gdb_termios.h" instead of
3643 "terminal.h".
3644 * terminal.h: Delete file.
3645
7c5ded6a
SDJ
36462017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3647
3648 * server.c: Include <vector>.
3649 <program_argv, wrapper_argv>: Convert to std::vector.
3650 (start_inferior): Rewrite function to use C++.
3651 (handle_v_run): Likewise. Update code that calculates the argv
3652 based on the vRun packet; use C++.
3653 (captured_main): Likewise.
3654
436252de
SM
36552017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * server.c (handle_v_cont): Initialize thread_resume::thread
3658 with null_ptid.
3659
9bf2a700
PA
36602017-04-05 Pedro Alves <palves@redhat.com>
3661
3662 * configure: Regenerate.
3663
a121b7c1
PA
36642017-04-05 Pedro Alves <palves@redhat.com>
3665
3666 * gdbreplay.c (sync_error): Constify.
3667 * linux-x86-low.c (push_opcode): Constify.
3668
21c8a587
PA
36692017-04-05 Pedro Alves <palves@redhat.com>
3670
3671 * win32-low.c (get_child_debug_event)
3672 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3673 Report TARGET_WAITKIND_SPURIOUS instead.
3674
fb32b4f7
PA
36752017-04-05 Pedro Alves <palves@redhat.com>
3676
e79be6e5
SM
3677 * remote-utils.c (remote_prepare, remote_open): Constify.
3678 * remote-utils.h (remote_prepare, remote_open): Constify.
3679 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3680
65dd1e59
SM
36812017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * Makefile.in (clean): Clear .deps.
3684
8fa5b777
SM
36852017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3686
3687 * .gitignore: Remove generated files, replace with wildcard.
3688 * (clean): Replace removal of generated files with wildcard.
3689 (version.c): Replace with...
3690 (version-generated.c): ...this.
3691 (xml-builtin.c): Replace with...
3692 (xml-builtin-generated.c): ...this.
3693 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3694 (%.c: *regformats*): Replace with...
3695 (%-generated.c: *regformats*): ...this.
3696
a12e714b
MF
36972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3698
3699 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3700 (xtensa_fill_gregset): Call collect_register_by_name for
3701 threadptr register.
3702 (xtensa_store_gregset): Call supply_register_by_name for
3703 threadptr register.
3704
1a09b50a
MF
37052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3706
3707 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3708 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3709 (xtensa_store_gregset): Call supply_register for all registers in
3710 a0_regnum..a0_regnum + C0_NREGS range.
3711
1a01e7c6
SM
37122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3713
3714 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3715 (ax-ipa.o: ax.c): Remove.
3716 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3717 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3718 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3719 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3720 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3721
36bc18a8
SM
37222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3723
3724 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3725 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3726 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3727 (errors-ipa.o: ../common/errors.c): Remove.
3728 (format-ipa.o: ../common/format.c): Remove.
3729 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3730
a8ebe3d5
SM
37312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3732
3733 * Makefile.in (%-ipa.o: %.c): New rule.
3734 (tracepoint-ipa.o: tracepoint.c): Remove.
3735 (utils-ipa.o: utils.c): Remove.
3736 (remote-utils-ipa.o: remote-utils.c): Remove.
3737 (regcache-ipa.o: regcache.c): Remove.
3738 (i386-linux-ipa.o: i386-linux.c): Remove.
3739 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3740 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3741 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3742 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3743 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3744 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3745 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3746 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3747 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3748 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3749 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3750 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3751 (aarch64-ipa.o: aarch64.c): Remove.
3752 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3753 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3754 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3755 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3756 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3757 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3758 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3759 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3760 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3761 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3762 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3763 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3764 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3765 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3766 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3767 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3768 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3769 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3770 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3771 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3772 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3773 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3774 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3775 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3776 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3777 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3778 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3779 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3780 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3781 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3782 (tdesc-ipa.o: tdesc.c): Remove.
3783 (x32-linux-ipa.o: x32-linux.c): Remove.
3784 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3785 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3786
50cfacb7
SM
37872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3788
3789 * Makefile.in (%.o: ../arch/%.c): New rule.
3790 (arm.o: ../arch/arm.c): Remove.
3791 (arm-linux.o: ../arch/arm-linux.c): Remove.
3792 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3793 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3794
c5a22423
SM
37952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3796
3797 * Makefile.in (%.o: ../nat/%.c): New rule.
3798 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3799 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3800 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3801 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3802 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3803 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3804 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3805 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3806 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3807 (linux-personality.o: ../nat/linux-personality.c): Remove.
3808 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3809 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3810 (x86-linux.o: ../nat/x86-linux.c): Remove.
3811 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3812 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3813
6bda016b
SM
38142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3815
3816 * Makefile.in (%.o: ../common/%.c): New rule.
3817 (signals.o: ../common/signals.c): Remove.
3818 (print-utils.o: ../common/print-utils.c): Remove.
3819 (rsp-low.o: ../common/rsp-low.c): Remove.
3820 (common-utils.o: ../common/common-utils.c): Remove.
3821 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3822 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3823 (vec.o: ../common/vec.c): Remove.
3824 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3825 (xml-utils.o: ../common/xml-utils.c): Remove.
3826 (ptid.o: ../common/ptid.c): Remove.
3827 (buffer.o: ../common/buffer.c): Remove.
3828 (format.o: ../common/format.c): Remove.
3829 (filestuff.o: ../common/filestuff.c): Remove.
3830 (agent.o: ../common/agent.c): Remove.
3831 (errors.o: ../common/errors.c): Remove.
3832 (environ.o: ../common/environ.c): Remove.
3833 (common-debug.o: ../common/common-debug.c): Remove.
3834 (cleanups.o: ../common/cleanups.c): Remove.
3835 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3836 (fileio.o: ../common/fileio.c): Remove.
3837 (common-regcache.o: ../common/common-regcache.c): Remove.
3838 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3839 (new-op.o: ../common/new-op.c): Remove.
3840 (btrace-common.o: ../common/btrace-common.c): Remove.
3841
21122961
SM
38422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3843
3844 * Makefile.in (%.o: ../target/%.c): New rule.
3845 (waitstatus.o: ../target/waitstatus.c): Remove.
3846
c362e621
SM
38472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3848
3849 * Makefile.in
3850 (%.c: ../regformats/%.dat,
3851 (%.c: ../regformats/arm/%.dat,
3852 (%.c: ../regformats/i386/%.dat,
3853 (%.c: ../regformats/rs6000/%.dat): New rules.
3854 (aarch64.c): Remove.
3855 (reg-arm.c): Remove.
3856 (arm-with-iwmmxt.c): Remove.
3857 (arm-with-vfpv2.c): Remove.
3858 (arm-with-vfpv3.c): Remove.
3859 (arm-with-neon.c): Remove.
3860 (reg-bfin.c): Remove.
3861 (reg-cris.c): Remove.
3862 (reg-crisv32.c): Remove.
3863 (i386.c): Remove.
3864 (i386-linux.c): Remove.
3865 (i386-avx.c): Remove.
3866 (i386-avx-linux.c): Remove.
3867 (i386-avx-avx512.c): Remove.
3868 (i386-avx-avx512-linux.c): Remove.
3869 (i386-mpx.c): Remove.
3870 (i386-mpx-linux.c): Remove.
3871 (i386-avx-mpx-avx512-pku.c): Remove.
3872 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3873 (i386-avx-mpx.c): Remove.
3874 (i386-avx-mpx-linux.c): Remove.
3875 (i386-mmx.c): Remove.
3876 (i386-mmx-linux.c): Remove.
3877 (reg-ia64.c): Remove.
3878 (reg-m32r.c): Remove.
3879 (reg-m68k.c): Remove.
3880 (reg-cf.c): Remove.
3881 (mips-linux.c): Remove.
3882 (mips-dsp-linux.c): Remove.
3883 (mips64-linux.c): Remove.
3884 (mips64-dsp-linux.c): Remove.
3885 (nios2-linux.c): Remove.
3886 (powerpc-32.c): Remove.
3887 (powerpc-32l.c): Remove.
3888 (powerpc-altivec32l.c): Remove.
3889 (powerpc-cell32l.c): Remove.
3890 (powerpc-vsx32l.c): Remove.
3891 (powerpc-isa205-32l.c): Remove.
3892 (powerpc-isa205-altivec32l.c): Remove.
3893 (powerpc-isa205-vsx32l.c): Remove.
3894 (powerpc-e500l.c): Remove.
3895 (powerpc-64l.c): Remove.
3896 (powerpc-altivec64l.c): Remove.
3897 (powerpc-cell64l.c): Remove.
3898 (powerpc-vsx64l.c): Remove.
3899 (powerpc-isa205-64l.c): Remove.
3900 (powerpc-isa205-altivec64l.c): Remove.
3901 (powerpc-isa205-vsx64l.c): Remove.
3902 (s390-linux32.c): Remove.
3903 (s390-linux32v1.c): Remove.
3904 (s390-linux32v2.c): Remove.
3905 (s390-linux64.c): Remove.
3906 (s390-linux64v1.c): Remove.
3907 (s390-linux64v2.c): Remove.
3908 (s390-te-linux64.c): Remove.
3909 (s390-vx-linux64.c): Remove.
3910 (s390-tevx-linux64.c): Remove.
3911 (s390x-linux64.c): Remove.
3912 (s390x-linux64v1.c): Remove.
3913 (s390x-linux64v2.c): Remove.
3914 (s390x-te-linux64.c): Remove.
3915 (s390x-vx-linux64.c): Remove.
3916 (s390x-tevx-linux64.c): Remove.
3917 (tic6x-c64xp-linux.c): Remove.
3918 (tic6x-c64x-linux.c): Remove.
3919 (tic6x-c62x-linux.c): Remove.
3920 (reg-sh.c): Remove.
3921 (reg-sparc64.c): Remove.
3922 (reg-spu.c): Remove.
3923 (amd64.c): Remove.
3924 (amd64-linux.c): Remove.
3925 (amd64-avx.c): Remove.
3926 (amd64-avx-linux.c): Remove.
3927 (amd64-avx-avx512.c): Remove.
3928 (amd64-avx-avx512-linux.c): Remove.
3929 (amd64-mpx.c): Remove.
3930 (amd64-mpx-linux.c): Remove.
3931 (amd64-avx-mpx-avx512-pku.c): Remove.
3932 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3933 (amd64-avx-mpx.c): Remove.
3934 (amd64-avx-mpx-linux.c): Remove.
3935 (x32.c): Remove.
3936 (x32-linux.c): Remove.
3937 (x32-avx.c): Remove.
3938 (x32-avx-linux.c): Remove.
3939 (x32-avx-avx512.c): Remove.
3940 (x32-avx-avx512-linux.c): Remove.
3941 (reg-xtensa.c): Remove.
3942 (reg-tilegx.c): Remove.
3943 (reg-tilegx32.c): Remove.
3944
1672e0d9
SDJ
39452017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3946
3947 * Makefile.in (SFILES): Add "common/environ.c".
3948 (OBJS): Add "common/environ.h".
3949
239b6d10
WT
39502017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3951
3952 * configure.ac: Check if the fs_base and gs_base members of
3953 `struct user_regs_struct' exist.
3954 * config.in: Regenerated.
3955 * configure: Likewise.
3956
694b382c
AT
39572017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3958
3959 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3960 target_read_memory.
3961 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3962 (get_next_pcs_syscall_next_pc): Likewise.
3963
7dc53023
LM
39642016-12-23 Luis Machado <lgustavo@codesourcery.com>
3965
3966 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3967 * nto-x86-low.c: Likewise.
3968
ad02e4fe
SM
39692016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3970
3971 * Makefile.in: Include disable-implicit-rules.mk.
3972
dcb07cfa
PA
39732016-11-23 Pedro Alves <palves@redhat.com>
3974
3975 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3976 (debug_vprintf): Use std::chrono::steady_clock instead of
3977 gettimeofday. Use '.' instead of ':'.
3978 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3979 (get_timestamp): Use std::chrono::steady_clock instead of
3980 gettimeofday.
3981
8629c02c
SM
39822016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3983
3984 * Makefile.in: Fix whitespace formatting.
3985
b593ecca
SM
39862016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3987
3988 * Makefile.in (SFILES, OBS): Flatten list and order
3989 alphabetically.
3990
9986ba08
PA
39912016-11-23 Pedro Alves <palves@redhat.com>
3992
3993 * event-loop.c (handle_file_event): Use warning.
3994 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3995 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3996 Use warning.
3997
4eefa7bc
PA
39982016-11-23 Pedro Alves <palves@redhat.com>
3999
4000 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4001 output.
4002 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4003 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4004 debug_printf and debug_flush for debug output.
4005 * server.c (handle_general_set): Likewise.
4006 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4007 output.
4008
5443506e
SM
40092016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4010
4011 * Makefile.in (.c.o): Replace rule with ...
4012 (%.o: %.c): ... this one.
4013
3b165252
SM
40142016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4015
4016 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4017 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4018 make.
4019 * configure.ac: Remove checks for the make program.
4020 * configure: Re-generate.
4021
0bcda685
PA
40222016-10-28 Pedro Alves <palves@redhat.com>
4023
4024 * Makefile.in (CXX_DIALECT): Get from configure.
4025 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4026 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4027 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4028 * config.in: Regenerate.
4029 * configure: Regenerate.
4030
c3805894
YQ
40312016-10-27 Yao Qi <yao.qi@linaro.org>
4032
4033 * linux-low.c (linux_supports_range_stepping): Return true if
4034 can_software_single_step return true.
4035
89342618
YQ
40362016-10-27 Yao Qi <yao.qi@linaro.org>
4037
4038 * inferiors.c (find_inferior_in_random): New function.
4039 * inferiors.h (find_inferior_in_random): Declare.
4040 * linux-low.c (linux_wait_for_event_filtered): Call
4041 find_inferior_in_random instead of find_inferior.
4042
e3652c84
YQ
40432016-10-27 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-low.c (linux_wait_1): If single-step breakpoints are
4046 inserted, remove them.
4047
5a04c4cf
PA
40482016-10-26 Pedro Alves <palves@redhat.com>
4049
4050 * linux-low.c (handle_extended_wait): Link parent/child fork
4051 threads.
4052 (linux_wait_1): Unlink them.
4053 (linux_set_resume_request): Ignore resume requests for
4054 already-resumed and unhandled fork child threads.
4055 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4056 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4057 New functions.
4058 (handle_v_requests) <vCont>: Don't call require_running.
4059 * server.h (in_queued_stop_replies): New declaration.
4060
cb93dc7f
YQ
40612016-10-24 Yao Qi <yao.qi@linaro.org>
4062
4063 PR server/20733
4064 * linux-aarch64-low.c (append_insns): Cast the return value to
4065 'uint32_t *'.
4066
a1078bea
YQ
40672016-10-10 Yao Qi <yao.qi@linaro.org>
4068
4069 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4070
1fb77080
SDJ
40712016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4072
4073 * target.c (target_supports_multi_process): New function, moved
4074 from...
4075 * target.h (target_supports_multi_process): ... here. Remove
4076 macro.
4077
39b5a3b9
TT
40782016-10-05 Tom Tromey <tom@tromey.com>
4079
4080 PR remote/20655:
4081 * tracepoint.c (handle_tracepoint_bkpts): Check
4082 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4083
c1d0b70a
YQ
40842016-10-05 Yao Qi <yao.qi@linaro.org>
4085
4086 * configure.srv: Update the path of arm-*.xml files.
4087
0a69eedb
YQ
40882016-10-05 Terry Guo <terry.guo@arm.com>
4089 Yao Qi <yao.qi@linaro.org>
4090
4091 * Makefile.in: Adjust the path of rules.
4092 * configure.srv: Update the path of xml files.
4093 * regformats/arm-with-iwmmxt.dat: Regenerated.
4094 * regformats/arm-with-neon.dat: Likewise.
4095 * regformats/arm-with-vfpv2.dat: Likewise.
4096 * regformats/arm-with-vfpv3.dat Likewise.
4097
17e16485
YQ
40982016-09-30 Yao Qi <yao.qi@linaro.org>
4099
4100 PR gdbserver/20627
4101 * target.c (target_stop_and_wait): Don't call
4102 target_continue_no_signal, use resume_stop instead.
4103
edeeb602
YQ
41042016-09-26 Yao Qi <yao.qi@linaro.org>
4105
4106 * linux-low.c (linux_wait_1): Call debug_exit.
4107
503b1c39
PA
41082016-09-23 Pedro Alves <palves@redhat.com>
4109
4110 * Makefile.in (SFILES): Add common/new-op.c.
4111 (OBS): Add common/new-op.o.
4112 (new-op.o): New rule.
4113
74172ecf
SM
41142016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4115
4116 * .gitinore: Ignore more files.
4117
fc6cda2e
YQ
41182016-09-21 Yao Qi <yao.qi@linaro.org>
4119
4120 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4121 23.
4122
bc1e6c81
SDJ
41232016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4124
4125 * server.c (start_inferior): Call target_mourn_inferior instead of
4126 mourn_inferior; pass ptid_t argument to it.
4127 (resume): Likewise.
4128 (handle_target_event): Likewise.
4129 * target.c (target_mourn_inferior): New function.
4130 * target.h (mourn_inferior): Delete macro.
4131
0e00e962
AA
41322016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4133
4134 * linux-low.c (lwp_is_stepping): New function.
4135
1d8cb77d
CL
41362016-09-06 Carl Love <cel@us.ibm.com>
4137
4138 * server.c (start_inferior): Fixed comment, requested comment change
4139 didn't get updated correctly. Removed reference to ptrace () call as
4140 it is only true on Linux systems.
4141
7313bced
CL
41422016-09-06 Carl Love <cel@us.ibm.com>
4143
4144 * server.c (start_inferior): Do not call
4145 function target_post_create_inferior () if the
4146 inferior process has already exited.
4147
cf6de44d
PA
41482016-09-05 Pedro Alves <palves@redhat.com>
4149
4150 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4151 (COMPILE.pre, CC_LD): Use CXX directly.
4152 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4153 * acinclude.m4: Don't include build-with-cxx.m4.
4154 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4155 * configure: Regenerate.
4156
c1da6748
AT
41572016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4158
4159 PR gdb/19495
4160 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4161 call writing data to own_buf.
4162
f2b9e3df
SDJ
41632016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4164
4165 * target.c (mywait): Call target_wait instead of
4166 the_target->wait.
4167 (target_wait): New function.
4168
049a8570
SDJ
41692016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4170
4171 * server.c (start_inferior): New variable 'ptid'. Replace calls
4172 to the_target->resume by target_continue{,_no_signal}, depending
4173 on the case.
4174 * target.c (target_stop_and_wait): Call target_continue_no_signal
4175 instead of the_target->resume.
4176 (target_continue): New function.
4177
3aa5cfa0
AT
41782016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4179
4180 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4181
754653a7
AZ
41822016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4183
4184 PR server/20491
4185 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4186 ps_prochandle.
4187 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4188 * linux-arm-low.c (ps_get_thread_area): Likewise.
4189 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4190 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4191 * linux-mips-low.c (ps_get_thread_area): Likewise.
4192 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4193 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4194 * linux-x86-low.c (ps_get_thread_area): Likewise.
4195 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4196
ed036b40
PA
41972016-08-19 Pedro Alves <palves@redhat.com>
4198
4199 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4200
c8ef42ee
PA
42012016-08-19 Pedro Alves <palves@redhat.com>
4202
4203 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4204 comment. Use memcpy instead of casting through unsigned long.
4205
9c235a72
PA
42062016-08-19 Pedro Alves <palves@redhat.com>
4207
4208 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4209 allocating around 0x80000000.
4210
201506da
PA
42112016-08-19 Pedro Alves <palves@redhat.com>
4212
4213 PR gdb/20415
4214 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4215 (x32-avx512-linux-ipa.o): New rules.
4216 * configure.ac (x86_64-*-linux*): New x32 check.
4217 * configure.srv (ipa_x32_linux_regobj): New.
4218 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4219 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4220 descriptions.
4221 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4222 descriptions.
4223 * configure: Regenerate.
4224
f348d89a
PA
42252016-08-09 Pedro Alves <palves@redhat.com>
4226
4227 PR gdb/18653
4228 * Makefile.in (OBS): Add signals-state-save-restore.o.
4229 (signals-state-save-restore.o): New rule.
4230 * config.in: Regenerate.
4231 * configure: Regenerate.
4232 * linux-low.c: Include "signals-state-save-restore.h".
4233 (linux_create_inferior): Call
4234 restore_original_signals_state.
4235 * server.c: Include "dispositions-save-restore.h".
4236 (captured_main): Call save_original_signals_state.
4237
1baf5149
PA
42382016-08-05 Pedro Alves <palves@redhat.com>
4239
4240 * configure: Regenerate.
4241
fcd4a73d
YQ
42422016-08-04 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-low.c (regsets_fetch_inferior_registers): Check
4245 errno is ESRCH or not.
4246
979659d0
YQ
42472016-08-02 Yao Qi <yao.qi@linaro.org>
4248
4249 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4250 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4251 (thread_db_load_search): Update.
4252 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4253 td_ta_set_event and td_ta_event_getmsg.
4254
6598661d
PA
42552016-07-26 Pedro Alves <palves@redhat.com>
4256
4257 PR server/20414
4258 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4259 of unsigned long for 64-bit registers and use uint32_t instead of
4260 unsigned int for 32-bit registers.
4261
9cf12d57
PA
42622016-07-26 Pedro Alves <palves@redhat.com>
4263
4264 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4265 to 'ptrace'.
4266
305450ed
TT
42672016-07-21 Tom Tromey <tom@tromey.com>
4268
4269 * configure: Rebuild.
4270
2583da7c
YQ
42712016-07-21 Yao Qi <yao.qi@linaro.org>
4272
4273 * mem-break.c (find_gdb_breakpoint): Cast bp to
4274 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4275
21536b36
YQ
42762016-07-21 Yao Qi <yao.qi@linaro.org>
4277
4278 * server.c (handle_v_requests): Support s and S actions
4279 if target_supports_software_single_step return true.
4280
8901d193
YQ
42812016-07-21 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4284 is resume_step, call maybe_hw_step.
4285 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4286 and unstop them.
4287 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4288 breakpoints or not.
4289 (proceed_one_lwp): If resume request is resume_step, install
4290 reinsert breakpoints and call maybe_hw_step.
4291
0e9a339e
YQ
42922016-07-21 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-low.c (proceed_one_lwp): Declare.
4295 (linux_resume_one_thread): Remove local variable 'step'.
4296 Lift code enqueue signal. Call proceed_one_lwp instead of
4297 linux_resume_one_lwp.
4298
4281b351
YQ
42992016-07-21 Yao Qi <yao.qi@linaro.org>
4300
4301 * linux-low.c (linux_resume_one_thread): Call
4302 enqueue_pending_signal.
4303
984a2c04
YQ
43042016-07-21 Yao Qi <yao.qi@linaro.org>
4305
4306 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4307 * inferiors.c (do_restore_current_thread_cleanup): New function.
4308 (make_cleanup_restore_current_thread): Likewise.
4309 * linux-low.c (install_software_single_step_breakpoints): Call
4310 make_cleanup_restore_current_thread. Switch current_thread to
4311 thread.
4312
bec903c9
YQ
43132016-07-21 Yao Qi <yao.qi@linaro.org>
4314
4315 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4316 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4317 (clone_one_breakpoint): Likewise.
4318 (delete_reinsert_breakpoints): Change parameter to thread.
4319 Callers updated.
4320 (has_reinsert_breakpoints): Likewise.
4321 (uninsert_reinsert_breakpoints): Likewise.
4322 (reinsert_reinsert_breakpoints): Likewise.
4323 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4324 (delete_reinsert_breakpoints): Likewise.
4325 (reinsert_reinsert_breakpoints): Likewise.
4326 (uninsert_reinsert_breakpoints): Likewise.
4327 (has_reinsert_breakpoints): Likewise.
4328
63c40ec7
YQ
43292016-07-21 Yao Qi <yao.qi@linaro.org>
4330
4331 * inferiors.c (get_thread_process): Make parameter const.
4332 * inferiors.h (get_thread_process): Update declaration.
4333 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4334 Add new parameters child_thread and parent_thread. Callers
4335 updated.
4336 * mem-break.h (clone_all_breakpoints): Update declaration.
4337
9aa76cd0
YQ
43382016-07-21 Yao Qi <yao.qi@linaro.org>
4339
4340 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4341 <command_list, handler>: Remove.
4342 (struct gdb_breakpoint): New.
4343 (struct other_breakpoint): New.
4344 (struct reinsert_breakpoint): New.
4345 (is_gdb_breakpoint): New function.
4346 (any_persistent_commands): Update command_list if
4347 is_gdb_breakpoint returns true.
4348 (set_breakpoint): Create breakpoints according to their types.
4349 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4350 (set_gdb_breakpoint_1): Likewise.
4351 (set_gdb_breakpoint): Likewise.
4352 (clear_breakpoint_conditions): Change parameter type to
4353 'struct gdb_breakpoint *'.
4354 (clear_breakpoint_commands): Likewise.
4355 (clear_breakpoint_conditions_and_commands): Likewise.
4356 (add_condition_to_breakpoint): Likewise.
4357 (add_breakpoint_condition): Likewise.
4358 (add_commands_to_breakpoint): Likewise.
4359 (check_breakpoints): Check other_breakpoint.
4360 (clone_one_breakpoint): Clone breakpopint according to its type.
4361 * mem-break.h (struct gdb_breakpoint): Declare.
4362 (set_gdb_breakpoint): Update declaration.
4363 (clear_breakpoint_conditions_and_commands): Likewise.
4364 (add_breakpoint_condition): Likewise.
4365 (add_breakpoint_commands): Likewise.
4366 * server.c (process_point_options): Change parameter type to
4367 'struct gdb_breakpoint *'.
4368
811f8301
YQ
43692016-07-21 Yao Qi <yao.qi@linaro.org>
4370
4371 * mem-break.c (set_breakpoint_at): Rename it to ...
4372 (set_breakpoint_type_at): ... it.
4373 (set_breakpoint_at): Call set_breakpoint_type_at.
4374 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4375 * mem-break.h (set_breakpoint_at): Update comments.
4376
b1c51e36
CLT
43772016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4378
4379 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4380 to buf parameter.
4381 (nios2_store_gregset): Likewise.
4382
ced2dffb
PA
43832016-07-01 Pedro Alves <palves@redhat.com>
4384 Antoine Tremblay <antoine.tremblay@ericsson.com>
4385
4386 * linux-low.c: Change interface to take the target lwp_info
4387 pointer directly and return void. Handle detaching from a zombie
4388 thread.
4389 (linux_detach_lwp_callback): New function.
4390 (linux_detach): Detach from the leader thread after detaching from
4391 the clone threads.
4392
2ac09a5b
YQ
43932016-06-28 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4396 for variable new_offset.
4397 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4398 (aarch64_ftrace_insn_reloc_cb): Likewise.
4399 (aarch64_ftrace_insn_reloc_tb): Likewise.
4400 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4401 PRIx64 instead of PRIx32.
4402
79e7fd4f
YQ
44032016-06-28 Yao Qi <yao.qi@linaro.org>
4404
4405 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4406 (the_low_target): Install arm_get_syscall_trapinfo.
4407
061fc021
YQ
44082016-06-28 Yao Qi <yao.qi@linaro.org>
4409
4410 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4411 function.
4412 (the_low_target): Install aarch64_get_syscall_trapinfo.
4413
4cc32bec
YQ
44142016-06-28 Yao Qi <yao.qi@linaro.org>
4415
4416 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4417 Callers updated.
4418 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4419 Remove parameter sysno.
4420 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4421 sysret.
4422
782c1122
AA
44232016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4424
4425 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4426 (s390_emit_ne_goto): Likewise.
4427 (s390_emit_lt_goto): Likewise.
4428 (s390_emit_le_goto): Likewise.
4429 (s390_emit_gt_goto): Likewise.
4430 (s390_emit_ge_goto): Likewise.
4431 (s390x_emit_eq_goto): Likewise.
4432 (s390x_emit_ne_goto): Likewise.
4433 (s390x_emit_lt_goto): Likewise.
4434 (s390x_emit_le_goto): Likewise.
4435 (s390x_emit_gt_goto): Likewise.
4436 (s390x_emit_ge_goto): Likewise.
4437 (s390_emit_ops_impl): Mark variable static.
4438 (s390x_emit_ops): Likewise.
4439
2e7b624b
YQ
44402016-06-17 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-low.c (handle_extended_wait): Call
4443 uninsert_reinsert_breakpoints for the parent process. Remove
4444 reinsert breakpoints from the child process. Reinsert them to
4445 the parent process when vfork is done.
4446 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4447 (reinsert_reinsert_breakpoints): New function.
4448 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4449 (reinsert_reinsert_breakpoints): Declare.
4450
8a81c5d7
YQ
44512016-06-17 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-low.c (handle_extended_wait): If the parent is doing
4454 step-over, remove the reinsert breakpoints from the forked child.
4455
f50bf8e5
YQ
44562016-06-17 Yao Qi <yao.qi@linaro.org>
4457
4458 * linux-low.c (unsuspend_all_lwps): Declare.
4459 (linux_low_filter_event): If thread exited, call finish_step_over.
4460 If step-over is finished, unsuspend other threads.
4461
8376a3cb
YQ
44622016-06-17 Yao Qi <yao.qi@linaro.org>
4463
4464 * linux-low.c (linux_resume_one_lwp_throw): Assert
4465 has_reinsert_breakpoints returns false.
4466 * mem-break.c (delete_disabled_breakpoints): Assert
4467 bp type isn't reinsert_breakpoint.
4468
f79b145d
YQ
44692016-06-17 Yao Qi <yao.qi@linaro.org>
4470
4471 * linux-low.c (maybe_hw_step): New function.
4472 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4473 (finish_step_over): Switch current_thread to lwp temporarily,
4474 and assert has_reinsert_breakpoints returns true.
4475 (proceed_one_lwp): Call maybe_hw_step.
4476 * mem-break.c (has_reinsert_breakpoints): New function.
4477 * mem-break.h (has_reinsert_breakpoints): Declare.
4478
0ae534d2
JT
44792016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4480
4481 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4482
fcdad592
YQ
44832016-05-17 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4486 instead of find_inferior.
4487
9e784964
YQ
44882016-05-05 Yao Qi <yao.qi@linaro.org>
4489
4490 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4491 Initialize res to zero.
4492
cf2ebb6e
YQ
44932016-05-05 Yao Qi <yao.qi@linaro.org>
4494
4495 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4496 to uint32_t.
4497
c1aebf87
UW
44982016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4499
4500 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4501 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4502 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4503
35fd2deb 45042016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4505 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4506
4507 * tracepoint.c (write_inferior_int8): New function.
4508 (cmd_qtenable_disable): Write enable flag using
4509 write_inferior_int8.
4510
484b3c32
YQ
45112016-04-25 Yao Qi <yao.qi@linaro.org>
4512
4513 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4514 (need_step_over_p): Return zero if the LWP has pending signals
4515 can be delivered on software single step target.
4516
85ba7d86
YQ
45172016-04-25 Yao Qi <yao.qi@linaro.org>
4518
4519 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4520 return instead of error.
4521
3539aa13
YQ
45222016-04-22 Yao Qi <yao.qi@linaro.org>
4523
4524 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4525 to 23.
4526
5b061e98
YQ
45272016-04-22 Yao Qi <yao.qi@linaro.org>
4528
4529 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4530 signal when stepping over breakpoint with software single
4531 step.
4532
3451269c
PA
45332016-04-21 Pedro Alves <palves@redhat.com>
4534
4535 * linux-s390-low.c (s390_collect_ptrace_register)
4536 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4537 add casts.
4538 (s390_check_regset): Use void * instead of gdb_byte *.
4539
a2358508
PA
45402016-04-20 Pedro Alves <palves@redhat.com>
4541
4542 * configure: Renegerate.
4543
6885166d
YQ
45442016-04-20 Yao Qi <yao.qi@linaro.org>
4545
4546 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4547 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4548 number 16.
4549 (arm_store_gregset): Likewise.
4550
2b863f51
WT
45512016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4552
4553 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4554 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4555 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4556 (amd64-avx-mpx-linux.c): New rules.
4557 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4558 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4559 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4560 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4561 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4562 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4563 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4564 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4565 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4566 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4567 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4568 * linux-x86-low.c (x86_linux_read_description): Add case for
4569 X86_XSTATE_AVX_MPX_MASK.
4570 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4571 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4572 init_registers_i386_avx_mpx_linux.
4573 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4574 (initialize_low_tracepoint): Call
4575 init_registers_i386_avx_mpx_linux.
4576 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4577 (initialize_low_tracepoint): Call
4578 init_registers_amd64_avx_mpx_linux.
4579 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4580 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4581 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4582 declarations.
4583
9b30624b
PA
45842016-04-18 Pedro Alves <palves@redhat.com>
4585
4586 * configure: Regenerate.
4587
45e3745e
AT
45882016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4589
4590 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4591 (aarch64_emit_sub): Likewise.
4592
2afc13ff
PA
45932016-04-12 Pedro Alves <palves@redhat.com>
4594
4595 * utils.c (prepare_to_throw_exception): Delete.
4596
6e774b13
SM
45972016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4598
4599 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4600
4dca19f8
MK
46012016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4602
4603 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4604
d0a9981f
MK
46052016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4606
4607 * linux-aarch64-ipa.c: Add <elf.h> include.
4608 * linux-ppc-ipa.c: Add <elf.h> include.
4609 * linux-s390-ipa.c: Add <elf.h> include.
4610
252db07e
MK
46112016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4612
4613 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4614 (get_raw_reg_ptr): Likewise.
4615 (get_trace_state_variable_value_ptr): Likewise.
4616 (set_trace_state_variable_value_ptr): Likewise.
4617 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4618 char *.
4619
14e2b6d9
MK
46202016-03-31 Wei-cheng Wang <cole945@gmail.com>
4621 Marcin Kościelnicki <koriakin@0x04.net>
4622
4623 PR/17221
4624 * linux-ppc-low.c (emit_insns): New function.
4625 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4626 (ppc_emit_prologue): New function.
4627 (ppc_emit_epilogue): New function.
4628 (ppc_emit_add): New function.
4629 (ppc_emit_sub): New function.
4630 (ppc_emit_mul): New function.
4631 (ppc_emit_lsh): New function.
4632 (ppc_emit_rsh_signed): New function.
4633 (ppc_emit_rsh_unsigned): New function.
4634 (ppc_emit_ext): New function.
4635 (ppc_emit_zero_ext): New function.
4636 (ppc_emit_log_not): New function.
4637 (ppc_emit_bit_and): New function.
4638 (ppc_emit_bit_or): New function.
4639 (ppc_emit_bit_xor): New function.
4640 (ppc_emit_bit_not): New function.
4641 (ppc_emit_equal): New function.
4642 (ppc_emit_less_signed): New function.
4643 (ppc_emit_less_unsigned): New function.
4644 (ppc_emit_ref): New function.
4645 (ppc_emit_const): New function.
4646 (ppc_emit_reg): New function.
4647 (ppc_emit_pop): New function.
4648 (ppc_emit_stack_flush): New function.
4649 (ppc_emit_swap): New function.
4650 (ppc_emit_stack_adjust): New function.
4651 (ppc_emit_call): New function.
4652 (ppc_emit_int_call_1): New function.
4653 (ppc_emit_void_call_2): New function.
4654 (ppc_emit_if_goto): New function.
4655 (ppc_emit_goto): New function.
4656 (ppc_emit_eq_goto): New function.
4657 (ppc_emit_ne_goto): New function.
4658 (ppc_emit_lt_goto): New function.
4659 (ppc_emit_le_goto): New function.
4660 (ppc_emit_gt_goto): New function.
4661 (ppc_emit_ge_goto): New function.
4662 (ppc_write_goto_address): New function.
4663 (ppc_emit_ops_impl): New static variable.
4664 (ppc64v1_emit_prologue): New function.
4665 (ppc64v2_emit_prologue): New function.
4666 (ppc64_emit_epilogue): New function.
4667 (ppc64_emit_add): New function.
4668 (ppc64_emit_sub): New function.
4669 (ppc64_emit_mul): New function.
4670 (ppc64_emit_lsh): New function.
4671 (ppc64_emit_rsh_signed): New function.
4672 (ppc64_emit_rsh_unsigned): New function.
4673 (ppc64_emit_ext): New function.
4674 (ppc64_emit_zero_ext): New function.
4675 (ppc64_emit_log_not): New function.
4676 (ppc64_emit_bit_and): New function.
4677 (ppc64_emit_bit_or): New function.
4678 (ppc64_emit_bit_xor): New function.
4679 (ppc64_emit_bit_not): New function.
4680 (ppc64_emit_equal): New function.
4681 (ppc64_emit_less_signed): New function.
4682 (ppc64_emit_less_unsigned): New function.
4683 (ppc64_emit_ref): New function.
4684 (ppc64_emit_const): New function.
4685 (ppc64v1_emit_reg): New function.
4686 (ppc64v2_emit_reg): New function.
4687 (ppc64_emit_pop): New function.
4688 (ppc64_emit_stack_flush): New function.
4689 (ppc64_emit_swap): New function.
4690 (ppc64v1_emit_call): New function.
4691 (ppc64v2_emit_call): New function.
4692 (ppc64v1_emit_int_call_1): New function.
4693 (ppc64v2_emit_int_call_1): New function.
4694 (ppc64v1_emit_void_call_2): New function.
4695 (ppc64v2_emit_void_call_2): New function.
4696 (ppc64_emit_if_goto): New function.
4697 (ppc64_emit_eq_goto): New function.
4698 (ppc64_emit_ne_goto): New function.
4699 (ppc64_emit_lt_goto): New function.
4700 (ppc64_emit_le_goto): New function.
4701 (ppc64_emit_gt_goto): New function.
4702 (ppc64_emit_ge_goto): New function.
4703 (ppc64v1_emit_ops_impl): New static variable.
4704 (ppc64v2_emit_ops_impl): New static variable.
4705 (ppc_emit_ops): New function.
4706 (linux_low_target): Wire in ppc_emit_ops.
4707
a2174ba4
MK
47082016-03-31 Wei-cheng Wang <cole945@gmail.com>
4709 Marcin Kościelnicki <koriakin@0x04.net>
4710
4711 PR/17221
4712 * Makefile.in: Add powerpc-*-ipa.o
4713 * configure.srv: Add ipa_obj for powerpc*-linux.
4714 * linux-ppc-ipa.c: New file.
4715 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4716 includes.
4717 (PPC_FIELD): New macro.
4718 (PPC_SEXT): New macro.
4719 (PPC_OP6): New macro.
4720 (PPC_BO): New macro.
4721 (PPC_LI): New macro.
4722 (PPC_BD): New macro.
4723 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4724 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4725 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4726 (ppc_get_thread_area): New function.
4727 (is_elfv2_inferior): New function.
4728 (gen_ds_form): New function.
4729 (GEN_STD): New macro.
4730 (GEN_STDU): New macro.
4731 (GEN_LD): New macro.
4732 (GEN_LDU): New macro.
4733 (gen_d_form): New function.
4734 (GEN_ADDI): New macro.
4735 (GEN_ADDIS): New macro.
4736 (GEN_LI): New macro.
4737 (GEN_LIS): New macro.
4738 (GEN_ORI): New macro.
4739 (GEN_ORIS): New macro.
4740 (GEN_LWZ): New macro.
4741 (GEN_STW): New macro.
4742 (GEN_STWU): New macro.
4743 (gen_xfx_form): New function.
4744 (GEN_MFSPR): New macro.
4745 (GEN_MTSPR): New macro.
4746 (GEN_MFCR): New macro.
4747 (GEN_MTCR): New macro.
4748 (GEN_SYNC): New macro.
4749 (GEN_LWSYNC): New macro.
4750 (gen_x_form): New function.
4751 (GEN_OR): New macro.
4752 (GEN_MR): New macro.
4753 (GEN_LWARX): New macro.
4754 (GEN_STWCX): New macro.
4755 (GEN_CMPW): New macro.
4756 (gen_md_form): New function.
4757 (GEN_RLDICL): New macro.
4758 (GEN_RLDICR): New macro.
4759 (gen_i_form): New function.
4760 (GEN_B): New macro.
4761 (GEN_BL): New macro.
4762 (gen_b_form): New function.
4763 (GEN_BNE): New macro.
4764 (GEN_LOAD): New macro.
4765 (GEN_STORE): New macro.
4766 (gen_limm): New function.
4767 (gen_atomic_xchg): New function.
4768 (gen_call): New function.
4769 (ppc_relocate_instruction): New function.
4770 (ppc_install_fast_tracepoint_jump_pad): New function.
4771 (ppc_get_min_fast_tracepoint_insn_len): New function.
4772 (ppc_get_ipa_tdesc_idx): New function.
4773 (the_low_target): Wire in the new functions.
4774 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4775 tdescs.
4776 * linux-ppc-tdesc.h: New file.
4777
a13c4696
MK
47782016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4779
4780 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4781 (alloc_jump_pad_buffer): New function.
4782 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4783 (alloc_jump_pad_buffer): New function.
4784 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4785 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4786 (alloc_jump_pad_buffer): New function.
4787 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4788 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4789 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4790 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4791
1cda1512
MK
47922016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4793
4794 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4795 * linux-amd64-ipa.c: Likewise.
4796 * linux-i386-ipa.c: Likewise.
4797 * linux-s390-ipa.c: Likewise.
4798 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4799 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4800 set_trace_state_variable_value_ptr.
4801 (struct ipa_sym_addresses): Likewise.
4802 (symbol_list): Likewise.
4803 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4804 accessing gdb_collect directly.
4805 (gdb_collect_ptr_type): New typedef.
4806 (get_raw_reg_ptr_type): New typedef.
4807 (get_trace_state_variable_value_ptr_type): New typedef.
4808 (set_trace_state_variable_value_ptr_type): New typedef.
4809 (gdb_collect_ptr): New global.
4810 (get_raw_reg_ptr): New global.
4811 (get_trace_state_variable_value_ptr): New global.
4812 (set_trace_state_variable_value_ptr): New global.
4813 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4814 accessing get_raw_reg directly.
4815 (get_get_tsv_func_addr): Likewise for
4816 get_trace_state_variable_value_ptr.
4817 (get_set_tsv_func_addr): Likewise for
4818 set_trace_state_variable_value_ptr.
4819 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4820
72fb5488
SM
48212016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4822
4823 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4824
28170b88
MK
48252016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4826
4827 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4828 packets.
4829 (relocate_instruction): Remove own_buf.
4830 * server.c (own_buf): Make global.
4831 (handle_v_requests): Make global.
4832 * server.h (own_buf): New declaration.
4833 (handle_v_requests): New prototype.
4834
f39e8743
MK
48352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4836
4837 PR 18377
4838 * linux-s390-low.c (add_insns): New function.
4839 (s390_emit_prologue): New function.
4840 (s390_emit_epilogue): New function.
4841 (s390_emit_add): New function.
4842 (s390_emit_sub): New function.
4843 (s390_emit_mul): New function.
4844 (s390_emit_lsh): New function.
4845 (s390_emit_rsh_signed): New function.
4846 (s390_emit_rsh_unsigned): New function.
4847 (s390_emit_ext): New function.
4848 (s390_emit_log_not): New function.
4849 (s390_emit_bit_and): New function.
4850 (s390_emit_bit_or): New function.
4851 (s390_emit_bit_xor): New function.
4852 (s390_emit_bit_not): New function.
4853 (s390_emit_equal): New function.
4854 (s390_emit_less_signed): New function.
4855 (s390_emit_less_unsigned): New function.
4856 (s390_emit_ref): New function.
4857 (s390_emit_if_goto): New function.
4858 (s390_emit_goto): New function.
4859 (s390_write_goto_address): New function.
4860 (s390_emit_litpool): New function.
4861 (s390_emit_const): New function.
4862 (s390_emit_call): New function.
4863 (s390_emit_reg): New function.
4864 (s390_emit_pop): New function.
4865 (s390_emit_stack_flush): New function.
4866 (s390_emit_zero_ext): New function.
4867 (s390_emit_swap): New function.
4868 (s390_emit_stack_adjust): New function.
4869 (s390_emit_set_r2): New function.
4870 (s390_emit_int_call_1): New function.
4871 (s390_emit_void_call_2): New function.
4872 (s390_emit_eq_goto): New function.
4873 (s390_emit_ne_goto): New function.
4874 (s390_emit_lt_goto): New function.
4875 (s390_emit_le_goto): New function.
4876 (s390_emit_gt_goto): New function.
4877 (s390_emit_ge_goto): New function.
4878 (s390x_emit_prologue): New function.
4879 (s390x_emit_epilogue): New function.
4880 (s390x_emit_add): New function.
4881 (s390x_emit_sub): New function.
4882 (s390x_emit_mul): New function.
4883 (s390x_emit_lsh): New function.
4884 (s390x_emit_rsh_signed): New function.
4885 (s390x_emit_rsh_unsigned): New function.
4886 (s390x_emit_ext): New function.
4887 (s390x_emit_log_not): New function.
4888 (s390x_emit_bit_and): New function.
4889 (s390x_emit_bit_or): New function.
4890 (s390x_emit_bit_xor): New function.
4891 (s390x_emit_bit_not): New function.
4892 (s390x_emit_equal): New function.
4893 (s390x_emit_less_signed): New function.
4894 (s390x_emit_less_unsigned): New function.
4895 (s390x_emit_ref): New function.
4896 (s390x_emit_if_goto): New function.
4897 (s390x_emit_const): New function.
4898 (s390x_emit_call): New function.
4899 (s390x_emit_reg): New function.
4900 (s390x_emit_pop): New function.
4901 (s390x_emit_stack_flush): New function.
4902 (s390x_emit_zero_ext): New function.
4903 (s390x_emit_swap): New function.
4904 (s390x_emit_stack_adjust): New function.
4905 (s390x_emit_int_call_1): New function.
4906 (s390x_emit_void_call_2): New function.
4907 (s390x_emit_eq_goto): New function.
4908 (s390x_emit_ne_goto): New function.
4909 (s390x_emit_lt_goto): New function.
4910 (s390x_emit_le_goto): New function.
4911 (s390x_emit_gt_goto): New function.
4912 (s390x_emit_ge_goto): New function.
4913 (s390_emit_ops): New function.
4914 (struct linux_target_ops): Fill in emit_ops hook.
4915
abd9baf9
MK
49162016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4917
4918 PR 18377
4919 * Makefile.in: Add s390 IPA files.
4920 * configure.srv: Build IPA for s390.
4921 * linux-s390-ipa.c: New file.
4922 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4923 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4924 (tdesc_s390_linux32): Likewise.
4925 (init_registers_s390_linux32v1): Likewise.
4926 (tdesc_s390_linux32v1): Likewise.
4927 (init_registers_s390_linux32v2): Likewise.
4928 (tdesc_s390_linux32v2): Likewise.
4929 (init_registers_s390_linux64): Likewise.
4930 (tdesc_s390_linux64): Likewise.
4931 (init_registers_s390_linux64v1): Likewise.
4932 (tdesc_s390_linux64v1): Likewise.
4933 (init_registers_s390_linux64v2): Likewise.
4934 (tdesc_s390_linux64v2): Likewise.
4935 (init_registers_s390_te_linux64): Likewise.
4936 (tdesc_s390_te_linux64): Likewise.
4937 (init_registers_s390_vx_linux64): Likewise.
4938 (tdesc_s390_vx_linux64): Likewise.
4939 (init_registers_s390_tevx_linux64): Likewise.
4940 (tdesc_s390_tevx_linux64): Likewise.
4941 (init_registers_s390x_linux64): Likewise.
4942 (tdesc_s390x_linux64): Likewise.
4943 (init_registers_s390x_linux64v1): Likewise.
4944 (tdesc_s390x_linux64v1): Likewise.
4945 (init_registers_s390x_linux64v2): Likewise.
4946 (tdesc_s390x_linux64v2): Likewise.
4947 (init_registers_s390x_te_linux64): Likewise.
4948 (tdesc_s390x_te_linux64): Likewise.
4949 (init_registers_s390x_vx_linux64): Likewise.
4950 (tdesc_s390x_vx_linux64): Likewise.
4951 (init_registers_s390x_tevx_linux64): Likewise.
4952 (tdesc_s390x_tevx_linux64): Likewise.
4953 (have_hwcap_s390_vx): New static variable.
4954 (s390_arch_setup): Fill have_hwcap_s390_vx.
4955 (s390_get_thread_area): New function.
4956 (s390_ft_entry_gpr_esa): New const.
4957 (s390_ft_entry_gpr_zarch): New const.
4958 (s390_ft_entry_misc): New const.
4959 (s390_ft_entry_fr): New const.
4960 (s390_ft_entry_vr): New const.
4961 (s390_ft_main_31): New const.
4962 (s390_ft_main_64): New const.
4963 (s390_ft_exit_fr): New const.
4964 (s390_ft_exit_vr): New const.
4965 (s390_ft_exit_misc): New const.
4966 (s390_ft_exit_gpr_esa): New const.
4967 (s390_ft_exit_gpr_zarch): New const.
4968 (append_insns): New function.
4969 (s390_relocate_instruction): New function.
4970 (s390_install_fast_tracepoint_jump_pad): New function.
4971 (s390_get_min_fast_tracepoint_insn_len): New function.
4972 (s390_get_ipa_tdesc_idx): New function.
4973 (struct linux_target_ops): Wire in the above functions.
4974 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4975 * linux-s390-tdesc.h: New file.
4976
a4105d04
MK
49772016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4978
4979 * linux-s390-low.c (s390_supports_tracepoints): New function.
4980 (struct linux_target_ops): Fill supports_tracepoints hook.
4981
35ac8b3e
YQ
49822016-03-18 Yao Qi <yao.qi@linaro.org>
4983
4984 * linux-low.c (lwp_signal_can_be_delivered): New function.
4985 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4986
94610ec4
YQ
49872016-03-18 Yao Qi <yao.qi@linaro.org>
4988
4989 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4990 0 if signal is enqueued. Remove 'signal' from one debugging
4991 message. Move one debugging message to some lines below.
4992 Remove code setting 'signal' to 0.
4993
80aea927
YQ
49942016-03-18 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-low.c (linux_low_filter_event): Remove redundant
4997 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4998
b04fd3be
MK
49992016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5000
5001 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5002 (struct linux_target_ops): Wire in the above.
5003
c40c8d4b
YQ
50042016-03-03 Yao Qi <yao.qi@linaro.org>
5005
5006 * linux-low.c: Update comments to start_step_over.
5007
0f8288ae
YQ
50082016-03-03 Yao Qi <yao.qi@linaro.org>
5009
5010 PR server/19736
5011 * linux-low.c (handle_extended_wait): Set child suspended
5012 if event_lwp->bp_reinsert isn't zero.
5013
fdbd04a8
YQ
50142016-03-02 Yao Qi <yao.qi@linaro.org>
5015
5016 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5017 enqueue_pending_signal.
5018
6896a8fa
MK
50192016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5020
5021 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5022 is actually loaded.
5023
ab503087
MK
50242016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5025
5026 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5027 (s390_regmap_3264) [!__s390x__]: New global.
5028 (s390_collect_ptrace_register): Skip map entries containing -1.
5029 (s390_supply_ptrace_register): Ditto.
5030 (s390_fill_gprs_high): New function.
5031 (s390_store_gprs_high): New function.
5032 (s390_regsets): Add NT_S390_HIGH_GPRS.
5033 (s390_get_hwcap): Enable on 31-bit.
5034 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5035 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5036 Detect NT_S390_HIGH_GPRS.
5037 (s390_usrregs_info_3264): Enable on 31-bit.
5038 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5039 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5040
ae91f625
MK
50412016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5042
5043 PR gdb/13808
5044 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5045 * configure.srv: Ditto.
5046 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5047 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5048 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5049 (init_registers_amd64_linux): Remove prototype.
5050 (tdesc_amd64_linux): Remove declaration.
5051 (get_ipa_tdesc): New function.
5052 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5053 initialize remaining tdescs.
5054 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5055 (init_registers_i386_linux): Remove prototype.
5056 (tdesc_i386_linux): Remove declaration.
5057 (get_ipa_tdesc): New function.
5058 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5059 initialize remaining tdescs.
5060 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5061 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5062 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5063 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5064 (x86_get_ipa_tdesc_idx): New function.
5065 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5066 * linux-x86-tdesc.h: New file.
5067 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5068 (target_get_ipa_tdesc_idx): New macro.
5069 * tracepoint.c (ipa_tdesc_idx): New macro.
5070 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5071 (symbol_list): Add ipa_tdesc_idx.
5072 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5073 (ipa_tdesc): Remove.
5074 (ipa_tdesc_idx): New variable.
5075 (get_context_regcache): Use get_ipa_tdesc.
5076 (gdb_collect): Ditto.
5077 (gdb_probe): Ditto.
5078 * tracepoint.h (get_ipa_tdesc): New prototype.
5079 (ipa_tdesc): Remove.
5080
e7ad2f14
PA
50812016-02-24 Pedro Alves <palves@redhat.com>
5082
5083 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5084 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5085 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5086 Factor out common code between the USE_SIGTRAP_SIGINFO and
5087 !USE_SIGTRAP_SIGINFO blocks.
5088 (linux_low_filter_event): Call save_stop_reason instead of
5089 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5090 Update comments.
5091 (linux_wait_1): Update comments.
5092
657f9cde
WW
50932016-02-24 Wei-cheng Wang <cole945@gmail.com>
5094
5095 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5096 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5097 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5098 ppc_insert_point, ppc_remove_point.
5099
b00b61e1
MK
51002016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5101
5102 * linux-s390-low.c (s390_supports_z_point_type): New function.
5103 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5104
553cb527
YQ
51052016-02-16 Yao Qi <yao.qi@linaro.org>
5106
5107 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5108 PC. Get pc from regcache_read_pc.
5109
a5652c21
YQ
51102016-02-12 Yao Qi <yao.qi@linaro.org>
5111
5112 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5113 or linux_get_pc_32bit.
5114 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5115
ed443b61
YQ
51162016-02-12 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5119 arm_linux_get_next_pcs_fixup.
5120
020ecd38
MK
51212016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5122
5123 * tracepoint.c (x_tracepoint_action_download): Change
5124 write_inferior_data_ptr to write_inferior_data_pointer.
5125 (cmd_qtstart): Likewise.
5126 (write_inferior_data_ptr): Remove.
5127 (download_agent_expr): Change write_inferior_data_ptr to
5128 write_inferior_data_pointer.
5129 (download_tracepoint_1): Likewise.
5130 (download_tracepoint): Likewise.
5131 (download_trace_state_variables): Likewise.
5132
7cae9051
WW
51332016-02-11 Wei-cheng Wang <cole945@gmail.com>
5134 Marcin Kościelnicki <koriakin@0x04.net>
5135
5136 * tracepoint.c (struct tracepoint_action_ops): Remove.
5137 (struct tracepoint_action): Remove ops.
5138 (m_tracepoint_action_download, r_tracepoint_action_download)
5139 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5140 size and offset accordingly.
5141 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5142 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5143 (tracepoint_action_send, tracepoint_action_download): New functions.
5144 Helpers for trace action handlers.
5145 (add_tracepoint_action): Remove setup actions ops.
5146 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5147
9f6a71b4
YQ
51482016-02-10 Yao Qi <yao.qi@linaro.org>
5149
5150 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5151
1e94266c
SM
51522016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5153
5154 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5155 to AC_OUTPUT.
5156 * configure: Regenerate.
5157
8adce034
SM
51582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5161 void * to gdb_byte *.
5162 * linux-low.c (siginfo_fixup): Likewise.
5163 (linux_xfer_siginfo): Likewise.
5164 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5165 Likewise.
5166 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5167
93813b37
WT
51682016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5169
5170 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5171 to srv_tgtobj.
5172 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5173 to srv_tgtobj.
5174 * linux-x86-low.c [__x86_64__]: Include
5175 "nat/amd64-linux-siginfo.h".
5176 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5177 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5178 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5179 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5180 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5181 (cpt_si_fd, si_timerid, si_overrun): Move from
5182 nat/amd64-linux-siginfo.c.
5183 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5184
8424cc97
SM
51852016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5186
5187 * server.c (skip_to_semicolon): Remove.
5188 (process_point_options): Use strchrnul instead of
5189 skip_to_semicolon.
5190
4d18591b
YQ
51912016-01-26 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5194 * linux-low.c (install_software_single_step_breakpoints): Don't
5195 call regcache_read_pc.
5196 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5197 argument pc.
5198
d8020970
YQ
51992016-01-26 Yao Qi <yao.qi@linaro.org>
5200
5201 * linux-low.c (install_software_single_step_breakpoints): Call
5202 regcache_read_pc instead of get_pc.
5203
8b207339
YQ
52042016-01-26 Yao Qi <yao.qi@linaro.org>
5205
5206 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5207 (unblock_async_io): Rename to ...
5208 (block_unblock_async_io): ... it. New function.
5209 (enable_async_io): Don't install SIGIO handler. Unblock it
5210 instead.
5211 (disable_async_io): Don't ignore SIGIO. Block it instead.
5212 (initialize_async_io): Install SIGIO handler. Don't call
5213 unblock_async_io.
5214
18879fef
YQ
52152016-01-26 Yao Qi <yao.qi@linaro.org>
5216
5217 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5218 first character is '\003', call *the_target->request_interrupt.
5219
a0f8e08a
YQ
52202016-01-25 Yao Qi <yao.qi@linaro.org>
5221
5222 * remote-utils.c (new_thread_notify): Remove.
5223 (dead_thread_notify): Likewise.
5224 * remote-utils.h (new_thread_notify): Remove declaration.
5225 (dead_thread_notify): Likewise.
5226
cc5fd9ab
MK
52272016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5228
5229 * gdb.trace/pending.exp: Fix expected message on continue.
5230
99e8eb11
MK
52312016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5232
5233 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5234 it works properly on big-endian machines where sizeof (CORE_ADDR)
5235 != sizeof (void *).
5236
a994041d
PA
52372016-01-21 Pedro Alves <palves@redhat.com>
5238
5239 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5240 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5241 * configure: Regenerate.
5242
f7a6a40d
YQ
52432016-01-21 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5246 is_thumb and set it according to CPSR saved on the stack.
5247 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5248 arm_sigreturn_next_pc.
5249
6f69e520
YQ
52502016-01-18 Yao Qi <yao.qi@linaro.org>
5251
5252 * linux-low.c (linux_set_pc_64bit): New function.
5253 (linux_get_pc_64bit): New function.
5254 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5255 Declare.
5256 * linux-sparc-low.c (debug_threads): Remove declaration.
5257 (sparc_get_pc): Remove.
5258 (the_low_target): Use linux_get_pc_64bit instead of
5259 sparc_get_pc.
5260 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5261 (the_low_target): Use linux_get_pc_64bit and
5262 linux_set_pc_64bit.
5263
276d4552
YQ
52642016-01-18 Yao Qi <yao.qi@linaro.org>
5265
5266 * linux-arm-low.c (debug_threads): Remove declaration.
5267 (arm_get_pc, arm_set_pc): Remove.
5268 (the_low_target): Use linux_get_pc_32bit and
5269 linux_set_pc_32bit.
5270 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5271 (the_low_target): Use linux_get_pc_32bit and
5272 linux_set_pc_32bit.
5273 * linux-cris-low.c (debug_threads): Remove declaration.
5274 (cris_get_pc, cris_set_pc,): Remove.
5275 (the_low_target): Use linux_get_pc_32bit and
5276 linux_set_pc_32bit.
5277 * linux-crisv32-low.c (debug_threads): Remove declaration.
5278 (cris_get_pc, cris_set_pc): Remove.
5279 (the_low_target): Use linux_get_pc_32bit and
5280 linux_set_pc_32bit.
5281 * linux-low.c: Include inttypes.h.
5282 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5283 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5284 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5285 (the_low_target): Use linux_get_pc_32bit and
5286 linux_set_pc_32bit.
5287 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5288 (the_low_target): Use linux_get_pc_32bit and
5289 linux_set_pc_32bit.
5290 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5291 (the_low_target): Use linux_get_pc_32bit and
5292 linux_set_pc_32bit.
5293 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5294 (the_low_target): Use linux_get_pc_32bit and
5295 linux_set_pc_32bit.
5296 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5297 (the_low_target): Use linux_get_pc_32bit and
5298 linux_set_pc_32bit.
5299
eb0edac8
GB
53002016-01-18 Gary Benson <gbenson@redhat.com>
5301
5302 * configure.ac (AC_FUNC_FORK): New check.
5303 * config.in: Regenerate.
5304 * configure: Likewise.
5305
1b451dda
YQ
53062016-01-14 Yao Qi <yao.qi@linaro.org>
5307
5308 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5309 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5310 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5311 arm_get_next_pcs_ctor.
5312
82075af2
JS
53132016-01-12 Josh Stone <jistone@redhat.com>
5314 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5315
5316 * inferiors.h: Include "gdb_vecs.h".
5317 (struct process_info): Add syscalls_to_catch.
5318 * inferiors.c (remove_process): Free syscalls_to_catch.
5319 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5320 syscall_return stops.
5321 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5322 * server.c (handle_general_set): Handle QCatchSyscalls.
5323 (handle_query): Report support for QCatchSyscalls.
5324 * target.h (struct target_ops): Add supports_catch_syscall.
5325 (target_supports_catch_syscall): New macro.
5326 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5327 (struct lwp_info): Add syscall_state.
5328 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5329 Maintain syscall_state and syscalls_to_catch across exec.
5330 (get_syscall_trapinfo): New function, proxy to the_low_target.
5331 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5332 (linux_low_filter_event): Toggle syscall_state entry/return for
5333 syscall traps, and set it ignored for all others.
5334 (gdb_catching_syscalls_p): New function.
5335 (gdb_catch_this_syscall_p): New function.
5336 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5337 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5338 (linux_supports_catch_syscall): New function.
5339 (linux_target_ops): Install it.
5340 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5341 (the_low_target): Install it.
5342
8f13a3ce
MF
53432016-01-12 Mike Frysinger <vapier@gentoo.org>
5344
5345 * acinclude.m4: Include new ../warning.m4 file.
5346 * configure: Regenerated.
5347 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5348
5b3da067
MF
53492016-01-12 Mike Frysinger <vapier@gentoo.org>
5350
5351 * ax.c (is_goto_target): Mark static.
5352 * linux-low.c (register_addr): Likewise.
5353 (linux_fetch_registers, linux_store_registers): Likewise.
5354 * mem-break.c (any_persistent_commands): Fix old prototype.
5355 (add_commands_to_breakpoint): Mark static.
5356 * regcache.c (find_register_by_name): Delete unused func.
5357 * remote-utils.c (hex_or_minus_one): Mark static.
5358 * server.c (monitor_show_help): Mark static.
5359 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5360 handle_v_requests): Likewise.
5361
bc504a31
PA
53622016-01-12 Pedro Alves <palves@redhat.com>
5363
5364 Remove use of the registered trademark symbol throughout.
5365
5a0dd67a
YQ
53662016-01-08 Yao Qi <yao.qi@linaro.org>
5367
5368 * remote-utils.c (getpkt): If c is '\003', call target hook
5369 request_interrupt.
5370
b2ca446f
YQ
53712016-01-06 Yao Qi <yao.qi@linaro.org>
5372
5373 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5374 linux-aarch32-low.c.
5375 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5376 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5377 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5378 (thumb2_breakpoint): Declare.
5379 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5380 linux-aarch32-low.h.
5381 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5382 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5383 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5384
edd88788
JB
53852016-01-01 Joel Brobecker <brobecker@adacore.com>
5386
5387 * gdbreplay.c (gdbreplay_version): Change copyright year in
5388 version message.
5389 * server.c (gdbserver_version): Likewise.
5390
65da7f14
PP
53912015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5392
5393 * server.c (crc32_table): Delete.
5394 (crc32): Use libiberty's xcrc32 function.
5395
4abd5ed2
JB
53962015-12-22 Joel Brobecker <brobecker@adacore.com>
5397
5398 * lynx-low.c (lynx_delete_thread_callback): New function.
5399 (lynx_mourn): Properly delete our process and all of its
5400 threads. Remove call to clear_inferiors.
5401
0e50fe5c
JB
54022015-12-22 Joel Brobecker <brobecker@adacore.com>
5403
5404 * target.c (thread_search_callback): Add check that
5405 the thread_stopped target callback is not NULL before
5406 calling it.
5407
35adc03f
YQ
54082015-12-21 Yao Qi <yao.qi@linaro.org>
5409
5410 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5411 arm breakpoint.
5412
bd2b2909
AT
54132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5414
5415 * server.c (handle_query): Call target_supports_software_single_step.
5416
7fe5e27e
AT
54172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5418
5419 * linux-low.c (single_step): New function.
5420 (linux_resume_one_lwp_throw): Call single_step.
5421 (start_step_over): Likewise.
5422
d9311bfa
AT
54232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5424
5425 * Makefile.in (SFILES): Append arch/arm-linux.c,
5426 arch/arm-get-next-pcs.c.
5427 (arm-linux.o): New rule.
5428 (arm-get-next-pcs.o): New rule.
5429 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5430 arm-linux.o.
5431 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5432 to linux-aarch32-low.c.
5433 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5434 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5435 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5436 (thumb2_breakpoint_len): Likewise.
5437 (arm_is_thumb_mode): Make non-static.
5438 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5439 from linux-aarch32-low.c.
5440 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5441 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5442 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5443 (thumb2_breakpoint_len): Likewise.
5444 (arm_is_thumb_mode): New declaration.
5445 * linux-arm-low.c: Include arch/arm-linux.h
5446 aarch/arm-get-next-pcs.h, sys/syscall.h.
5447 (get_next_pcs_ops): New struct.
5448 (get_next_pcs_addr_bits_remove): New function.
5449 (get_next_pcs_is_thumb): New function.
5450 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5451 (arm_sigreturn_next_pc): Likewise.
5452 (get_next_pcs_syscall_next_pc): Likewise.
5453 (arm_gdbserver_get_next_pcs): Likewise.
5454 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5455 Initialize.
5456 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5457 * server.h: Include gdb_vecs.h.
5458
68ce2059
AT
54592015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5460
5461 * Makefile.in (SFILES): Append common/common-regcache.c.
5462 (OBS): Append common-regcache.o.
5463 (common-regcache.o): New rule.
5464 * regcache.c (init_register_cache): Initialize cache to
5465 REG_UNAVAILABLE.
5466 (regcache_raw_read_unsigned): New function.
5467 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5468 register_status enum.
5469
fa5308bd
AT
54702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5471
5472 * linux-aarch64-low.c (the_low_targets): Rename
5473 breakpoint_reinsert_addr to get_next_pcs.
5474 * linux-arm-low.c (the_low_targets): Likewise.
5475 * linux-bfin-low.c (the_low_targets): Likewise.
5476 * linux-cris-low.c (the_low_targets): Likewise.
5477 * linux-crisv32-low.c (the_low_targets): Likewise.
5478 * linux-low.c (can_software_single_step): Likewise.
5479 (install_software_single_step_breakpoints): New function.
5480 (start_step_over): Use install_software_single_step_breakpoints.
5481 * linux-low.h: New CORE_ADDR vector.
5482 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5483 get_next_pcs.
5484 * linux-mips-low.c (the_low_targets): Likewise.
5485 * linux-nios2-low.c (the_low_targets): Likewise.
5486 * linux-sparc-low.c (the_low_targets): Likewise.
5487
4a6ed09b
PA
54882015-12-17 Pedro Alves <palves@redhat.com>
5489
5490 * linux-low.c (linux_kill_one_lwp): Remove references to
5491 LinuxThreads.
5492 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5493 to 'kill'.
5494 (linux_init_signals): Delete.
5495 (initialize_low): Adjust.
5496 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5497
7544db95
PA
54982015-12-16 Pedro Alves <palves@redhat.com>
5499
5500 * configure.ac (compiler warning flags): When testing a
5501 -Wno-foo option, check whether -Wfoo works instead.
5502 * configure: Regenerate.
5503
8020350c
DB
55042015-12-11 Don Breazeal <donb@codesourcery.com>
5505
5506 * server.c (process_serial_event): Don't exit from gdbserver
5507 in remote mode if there are still active inferiors.
5508
db91f502
YQ
55092015-12-11 Yao Qi <yao.qi@linaro.org>
5510
5511 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5512 arm_breakpoint_at if the process is 32-bit.
5513
b37a6290
YQ
55142015-12-11 Yao Qi <yao.qi@linaro.org>
5515
5516 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5517 arm breakpoint.
5518
17b1509a
YQ
55192015-12-07 Yao Qi <yao.qi@linaro.org>
5520
5521 * configure.srv: Append arm.o to srv_tgtobj for
5522 aarch64*-*-linux* target.
5523 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5524 from linux-arm-low.c.
5525 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5526 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5527 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5528 (thumb2_breakpoint_len): Likewise.
5529 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5530 (arm_breakpoint_kinds): Likewise.
5531 (arm_breakpoint_kind_from_pc): Likewise.
5532 (arm_sw_breakpoint_from_kind): Likewise.
5533 (arm_breakpoint_kind_from_current_state): Likewise.
5534 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5535 (arm_sw_breakpoint_from_kind): Declare.
5536 (arm_breakpoint_kind_from_current_state): Declare.
5537 (arm_breakpoint_at): Declare.
5538 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5539 arm_sw_breakpoint_from_kind if process is 32-bit.
5540 (aarch64_breakpoint_kind_from_pc): New function.
5541 (aarch64_breakpoint_kind_from_current_state): New function.
5542 (the_low_target): Initialize fields breakpoint_kind_from_pc
5543 and breakpoint_kind_from_current_state.
5544 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5545 linux-aarch32-low.c.
5546 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5547 (arm_breakpoint, arm_breakpoint_len): Likewise.
5548 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5549 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5550 (arm_is_thumb_mode): Likewise.
5551 (arm_breakpoint_at): Likewise.
5552 (arm_breakpoint_kind_from_pc): Likewise.
5553 (arm_sw_breakpoint_from_kind): Likewise.
5554 (arm_breakpoint_kind_from_current_state): Likewise.
5555
5556 Revert:
5557 2015-08-04 Yao Qi <yao.qi@linaro.org>
5558
5559 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5560 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5561 * server.c (extended_protocol): Remove "static".
5562 * server.h (extended_protocol): Declare it.
5563
ece66d65
JS
55642015-12-04 Josh Stone <jistone@redhat.com>
5565
5566 * target.h (struct target_ops) <arch_setup>: Rename to ...
5567 (struct target_ops) <post_create_inferior>: ... this.
5568 (target_arch_setup): Rename to ...
5569 (target_post_create_inferior): ... this, calling post_create_inferior.
5570 * server.c (start_inferior): Update target_arch_setup calls to
5571 target_post_create_inferior.
5572 * linux-low.c (linux_low_ptrace_options): Forward declare.
5573 (linux_arch_setup): Update its comment for general use.
5574 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5575 (struct linux_target_ops): Use linux_post_create_inferior.
5576 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5577 to post_create_inferior.
5578 * nto-low.c (struct nto_target_ops): Likewise.
5579 * spu-low.c (struct spu_target_ops): Likewise.
5580 * win32-low.c (struct win32_target_ops): Likewise.
5581
e58c48b4
AT
55822015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5583
5584 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5585
fbec8956
AT
55862015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5587
5588 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5589 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5590 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5591 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5592 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5593 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5594 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5595 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5596 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5597 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5598 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5599 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5600
9b4c5f87
AT
56012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5602
5603 * linux-low.c (linux_look_up_symbols): Don't call
5604 linux_supports_traceclone.
5605 * linux-low.h (thread_db_init): Remove use_events argument.
5606 * thread-db.c (thread_db_use_event): Remove global variable.
5607 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5608 (struct thread_db) <td_create_bp>: Remove field.
5609 (thread_db_create_event): Remove function.
5610 (thread_db_enable_reporting): Likewise.
5611 (find_one_thread): Don't check for thread_db_use_events.
5612 (attach_thread): Likewise.
5613 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5614 (try_thread_db_load_1): Don't check for thread_db_use_events.
5615 (thread_db_init): Remove use_events argument and thread events
5616 handling.
5617 (remove_thread_event_breakpoints): Remove function.
5618 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5619
7d00775e
AT
56202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5621
5622 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5623 New function.
5624 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5625 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5626 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5627 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5628 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5629 Initialize.
5630 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5631 New function.
5632 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5633 * linux-low.c (can_hardware_single_step): Use
5634 supports_hardware_single_step.
5635 (can_software_single_step): New function.
5636 (start_step_over): Call can_software_single_step.
5637 (linux_supports_hardware_single_step): New function.
5638 (struct target_ops) <supports_software_single_step>: Initialize.
5639 * linux-low.h (struct linux_target_ops)
5640 <supports_hardware_single_step>: Initialize.
5641 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5643 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5644 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5645 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5646 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5647 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5648 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5649 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5650 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5651 Initialize.
5652 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5653 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5654 Initialize.
5655 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5656 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5657 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5658 New function.
5659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5660 * target.h (struct target_ops): <supports_software_single_step>:
5661 New field.
5662 (target_supports_software_single_step): New macro.
5663
2d97cd35
AT
56642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5665
5666 * linux-low.c (linux_wait_1): Fix pc advance condition.
5667 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5668 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5669
769ef81f
AT
56702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5671
5672 * linux-arm-low.c (arm_is_thumb_mode): New function.
5673 (arm_breakpoint_at): Use arm_is_thumb_mode.
5674 (arm_breakpoint_kind_from_current_state): New function.
5675 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5676 Initialize.
5677 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5678 (linux_breakpoint_kind_from_current_state): New function.
5679 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5680 * linux-low.h (struct linux_target_ops)
5681 <breakpoint_kind_from_current_state>: New field.
5682 * target.h (struct target_ops): Likewise.
5683 (target_breakpoint_kind_from_current_state): New macro.
5684
1bebeeca
PA
56852015-11-30 Pedro Alves <palves@redhat.com>
5686
5687 * linux-low.c (linux_resume): Wake up the event loop before
5688 returning.
5689
a67a9fae
PA
56902015-11-30 Pedro Alves <palves@redhat.com>
5691
5692 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5693 check.
5694 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5695 to -1.
5696 * target.c (struct thread_search): New structure.
5697 (thread_search_callback): New function.
5698 (prev_general_thread): New global.
5699 (prepare_to_access_memory, done_accessing_memory): New functions.
5700 * target.h (prepare_to_access_memory, done_accessing_memory):
5701 Replace macros with function declarations.
5702
f2faf941
PA
57032015-11-30 Pedro Alves <palves@redhat.com>
5704
5705 PR 14618
5706 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5707 report TARGET_WAITKIND_NO_RESUMED.
5708 * remote-utils.c (prepare_resume_reply): Handle
5709 TARGET_WAITKIND_NO_RESUMED.
5710 * server.c (report_no_resumed): New global.
5711 (handle_query) <qSupported>: Handle "no-resumed+". Report
5712 "no-resumed+" support.
5713 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5714 return error if the client doesn't support no-resumed events.
5715 (push_stop_notification): New function.
5716 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5717 events if the client supports them.
5718
a681f9c9
PA
57192015-11-30 Pedro Alves <palves@redhat.com>
5720
5721 * linux-low.c (thread_still_has_status_pending_p): Don't check
5722 vCont;t here.
5723 (lwp_resumed): New function.
5724 (status_pending_p_callback): Return early if the LWP is not
5725 supposed to be resumed.
5726
65706a29
PA
57272015-11-30 Pedro Alves <palves@redhat.com>
5728
5729 * linux-low.c (handle_extended_wait): Assert that the LWP's
5730 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5731 thread create events, leave the new child's status pending.
5732 (linux_low_filter_event): If GDB wants to hear about thread exit
5733 events, leave the LWP marked dead and don't delete it.
5734 (linux_wait_for_event_filtered): Don't check for thread exit.
5735 (filter_exit_event): New function.
5736 (linux_wait_1): Use it, when returning an exit event.
5737 (linux_resume_one_lwp_throw): Assert that the LWP's
5738 waitstatus is TARGET_WAITKIND_IGNORE.
5739 * remote-utils.c (prepare_resume_reply): Handle
5740 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5741 * server.c (report_thread_events): New global.
5742 (handle_general_set): Handle QThreadEvents.
5743 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5744 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5745 TARGET_WAITKIND_THREAD_EXITED.
5746 * server.h (report_thread_events): Declare.
5747
56cf4bed
PA
57482015-11-30 Pedro Alves <palves@redhat.com>
5749
5750 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5751 the thread's last_resume_kind was resume_stop.
5752
500c1d85
PA
57532015-11-30 Pedro Alves <palves@redhat.com>
5754
5755 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5756 before returning.
5757
de979965
PA
57582015-11-30 Pedro Alves <palves@redhat.com>
5759
5760 * server.c (handle_v_requests): Handle vCtrlC.
5761
34c65914
PA
57622015-11-30 Pedro Alves <palves@redhat.com>
5763
5764 * gdbthread.h (find_any_thread_of_pid): Declare.
5765 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5766 functions.
5767 * server.c (handle_query): If current_thread is NULL, look for
5768 another thread of the selected process.
5769
79efa585 57702015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5771 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5772
5773 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5774 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5775 name in reply.
5776 * target.h (struct target_ops) <thread_name>: New field.
5777 (target_thread_name): New macro.
5778
80d82c19
JB
57792015-11-23 Joel Brobecker <brobecker@adacore.com>
5780
5781 * regcache.h (regcache_invalidate_pid): Add declaration.
5782 * regcache.c (regcache_invalidate_pid): New function, extracted
5783 from regcache_invalidate.
5784 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5785 Add trivial documentation comment.
5786 * lynx-low.c: Use regcache_invalidate_pid instead of
5787 regcache_invalidate.
5788
64da5dd5
JB
57892015-11-23 Joel Brobecker <brobecker@adacore.com>
5790
5791 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5792 and Elf64_auxv_t if the target is Android.
5793
37ce4055
DE
57942015-11-22 Doug Evans <xdje42@gmail.com>
5795
5796 * target.h: #include <sys/types.h>.
5797
06e03fff
PA
57982015-11-19 Pedro Alves <palves@redhat.com>
5799
5800 * linux-low.c (linux_process_qsupported): Change prototype.
5801 Adjust.
5802 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5803 Change prototype.
5804 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5805 and adjust to loop over all features.
5806 * server.c (handle_query) <qSupported>: Adjust to call
5807 target_process_qsupported once, passing it a vector of unprocessed
5808 features.
5809 * target.h (struct target_ops) <process_qsupported>: Change
5810 prototype.
5811 (target_process_qsupported): Adjust.
5812
9a084706
PA
58132015-11-19 Pedro Alves <palves@redhat.com>
5814
5815 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5816 mode.
5817 * configure: Regenerate.
5818
dad44a1f
PA
58192015-11-19 Pedro Alves <palves@redhat.com>
5820
5821 * configure: Regenerate.
5822
231c0592
YQ
58232015-11-19 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5826 type to uint32_t.
5827
6c1c9a8b
YQ
58282015-11-19 Yao Qi <yao.qi@linaro.org>
5829
5830 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5831 (struct aarch64_operand): Move enum out.
5832
9caa3311
YQ
58332015-11-19 Yao Qi <yao.qi@linaro.org>
5834
5835 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5836 struct user_fpsimd_state *.
5837 (aarch64_store_fpregset): Likewise.
5838
6a69a054
YQ
58392015-11-19 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5842 struct user_pt_regs *.
5843 (aarch64_store_gregset): Likewise.
5844
1798301e
PA
58452015-11-18 Pedro Alves <palves@redhat.com>
5846
5847 * Makefile.in (all_object_files): Add $IPA_OBJS.
5848
ce7715e2
PA
58492015-11-17 Pedro Alves <palves@redhat.com>
5850
5851 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5852 GDB_SIGNAL_0 and gdb_signal_to_string.
5853
c0879059
PA
58542015-11-17 Pedro Alves <palves@redhat.com>
5855
5856 * win32-low.c (handle_output_debug_string): Remove parameter.
5857 (win32_kill): Remove our_status local and adjust call to
5858 handle_output_debug_string.
5859 (get_child_debug_event): Adjust call to
5860 handle_output_debug_string.
5861
1996e237
SM
58622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5863
5864 * linux-mips-low.c (mips_fill_gregset): Add cast.
5865 (mips_store_gregset): Likewise.
5866 (mips_fill_fpregset): Likewise.
5867 (mips_store_fpregset): Likewise.
5868
cbec665b
SM
58692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5870
5871 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5872 priv.
5873
eb3e3c67
SM
58742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5875
5876 * linux-mips-low.c (mips_linux_new_thread): Change type of
5877 watch_type to enum target_hw_bp_type.
5878
171de4b8
SM
58792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5880
5881 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5882 Change return type to arm_hwbp_type.
5883
04248ead
SM
58842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5885
5886 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5887 (arm_store_gregset): Likewise.
5888 * linux-arm-low.c (arm_get_hwcap): Likewise.
5889 (arm_read_description): Likewise.
5890
04b3479c
SM
58912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5892
5893 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5894
2bc84e8a
SM
58952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5896
5897 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5898 (ppc_fill_vsxregset): Likewise.
5899 (ppc_store_vsxregset): Likewise.
5900 (ppc_fill_vrregset): Likewise.
5901 (ppc_store_vrregset): Likewise.
5902 (ppc_fill_evrregset): Likewise.
5903 (ppc_store_evrregset): Likewise.
5904
e6c5bb05
SM
59052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5906
5907 * linux-ppc-low.c (ppc_usrregs_info): Remove
5908 forward-declaration.
5909 (ppc_arch_setup): Move lower in file.
5910
7ea45d72
SM
59112015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5912
5913 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5914 (ps_pdwrite): Likewise.
5915
69291610
HW
59162015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5917
5918 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5919 to after assert checks.
5920
b42945fd
SM
59212015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5922
5923 * proc-service.c (ps_pdread): Add/adjust casts.
5924 (ps_pdwrite): Add/adjust casts.
5925
d6f85c84
SM
59262015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5927
5928 * server.c (handle_search_memory_1): Cast return value of
5929 memmem.
5930
f98cd059
SM
59312015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5932
5933 * server.c (write_qxfer_response): Change type of data to
5934 gdb_byte *.
5935
d2412fa5
PA
59362015-10-29 Pedro Alves <palves@redhat.com>
5937
5938 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5939
c17414a2
PA
59402015-10-29 Pedro Alves <palves@redhat.com>
5941
5942 * tracepoint.c (clear_installed_tracepoints): Add casts.
5943
e053fbc4
PA
59442015-10-29 Pedro Alves <palves@redhat.com>
5945
5946 * server.c (handle_v_cont, process_serial_event): Add enum
5947 gdb_signal casts to signal parsing code.
5948
add67df8
PA
59492015-10-29 Pedro Alves <palves@redhat.com>
5950
5951 * linux-low.h (NULL_REGSET): Define.
5952 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5953 * linux-arm-low.c (arm_regsets): Likewise.
5954 * linux-crisv32-low.c (cris_regsets): Likewise.
5955 * linux-m68k-low.c (m68k_regsets): Likewise.
5956 * linux-mips-low.c (mips_regsets): Likewise.
5957 * linux-nios2-low.c (nios2_regsets): Likewise.
5958 * linux-ppc-low.c (ppc_regsets): Likewise.
5959 * linux-s390-low.c (s390_regsets): Likewise.
5960 * linux-sh-low.c (sh_regsets): Likewise.
5961 * linux-sparc-low.c (sparc_regsets): Likewise.
5962 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5963 * linux-tile-low.c (tile_regsets): Likewise.
5964 * linux-x86-low.c (x86_regsets): Likewise.
5965 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5966
50bc912a
PA
59672015-10-29 Pedro Alves <palves@redhat.com>
5968
5969 * linux-low.h (NULL_REGSET): Define.
5970 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5971 * linux-arm-low.c (arm_regsets): Likewise.
5972 * linux-crisv32-low.c (cris_regsets): Likewise.
5973 * linux-m68k-low.c (m68k_regsets): Likewise.
5974 * linux-mips-low.c (mips_regsets): Likewise.
5975 * linux-nios2-low.c (nios2_regsets): Likewise.
5976 * linux-ppc-low.c (ppc_regsets): Likewise.
5977 * linux-s390-low.c (s390_regsets): Likewise.
5978 * linux-sh-low.c (sh_regsets): Likewise.
5979 * linux-sparc-low.c (sparc_regsets): Likewise.
5980 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5981 * linux-tile-low.c (tile_regsets): Likewise.
5982 * linux-x86-low.c (x86_regsets): Likewise.
5983 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5984
682b2546
DE
59852015-10-26 Doug Evans <dje@google.com>
5986
5987 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5988
963843d4
DE
59892015-10-26 Doug Evans <dje@google.com>
5990
5991 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5992
d41401ac
DE
59932015-10-26 Doug Evans <dje@google.com>
5994
5995 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5996 for debug_printf.
5997 (attach_thread, find_new_threads_callback): Ditto.
5998
3db28855
AT
59992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6000
6001 * mem-break.h (set_breakpoint_data): Remove.
6002
fb78e89c
AT
60032015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6004
6005 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6006 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6007 (initialize_low): Remove set_breakpoint_data call.
6008 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6009 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6010 (initialize_low): Remove set_breakpoint_data call.
6011 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6012 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6013 (initialize_low): Remove set_breakpoint_data call.
6014
2e6ee069
AT
60152015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6016
6017 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6018 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6019 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6020 * target.h (target_breakpoint_kind_from_pc): New macro.
6021
1652a986
AT
60222015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6023
6024 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6025 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6026 the default breakpoint kind.
6027
abeead09
AT
60282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6029
6030 * linux-arm-low.c (arm_supports_z_point_type): Add software
6031 breakpoint support.
6032
b0b4b501
AT
60332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6034
6035 * linux-arm-low.c: Refactor breakpoint definitions.
6036 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6037 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6038
8689682c
AT
60392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6040
6041 * Makefile.in: Add arm.c/o.
6042 * configure.srv: Likewise.
6043 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6044 (arm_breakpoint_kind_from_pc): New function.
6045 (arm_sw_breakpoint_from_kind): Return proper kind.
6046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6047
27165294
AT
60482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6049
6050 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6051 removal.
6052 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6053 (struct raw_breakpoint) <size>: Remove.
6054 (struct raw_breakpoint) <kind>: Add.
6055 (bp_size): New function.
6056 (bp_opcode): Likewise.
6057 (find_raw_breakpoint_at): Adjust for kind.
6058 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6059 (remove_memory_breakpoint): Adjust for kind call bp_size.
6060 (set_raw_breakpoint_at): Adjust for kind.
6061 (set_breakpoint): Likewise.
6062 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6063 (delete_raw_breakpoint): Adjust for kind.
6064 (delete_breakpoint): Likewise.
6065 (find_gdb_breakpoint): Likewise.
6066 (set_gdb_breakpoint_1): Likewise.
6067 (set_gdb_breakpoint): Likewise.
6068 (delete_gdb_breakpoint_1): Likewise.
6069 (delete_gdb_breakpoint): Likewise.
6070 (uninsert_raw_breakpoint): Likewise.
6071 (reinsert_raw_breakpoint): Likewise.
6072 (set_breakpoint_data): Remove.
6073 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6074 (check_mem_read): Adjust for kind call bp_size.
6075 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6076 (clone_one_breakpoint): Adjust for kind.
6077 * mem-break.h (set_gdb_breakpoint): Likewise.
6078 (delete_gdb_breakpoint): Likewise.
6079 * server.c (process_serial_event): Likewise.
6080
dd373349
AT
60812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6082
6083 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6084 (struct linux_target_ops) <breakpoint>: Remove.
6085 (struct linux_target_ops) <breakpoint_len>: Remove.
6086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6088 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6089 (arm_sw_breakpoint_from_kind): New function.
6090 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6091 (struct linux_target_ops) <breakpoint>: Remove.
6092 (struct linux_target_ops) <breakpoint_len>: Remove.
6093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6095 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6096 (struct linux_target_ops) <breakpoint>: Remove.
6097 (struct linux_target_ops) <breakpoint_len>: Remove.
6098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6100 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6101 (struct linux_target_ops) <breakpoint>: Remove.
6102 (struct linux_target_ops) <breakpoint_len>: Remove.
6103 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6104 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6105 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6106 and sw_breakpoint_from_kind to increment the pc.
6107 (linux_breakpoint_kind_from_pc): New function.
6108 (linux_sw_breakpoint_from_kind): New function.
6109 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6110 (initialize_low): Call breakpoint_kind_from_pc and
6111 sw_breakpoint_from_kind to replace breakpoint_data/len.
6112 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6113 New field.
6114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6115 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6116 (struct linux_target_ops) <breakpoint>: Remove.
6117 (struct linux_target_ops) <breakpoint_len>: Remove.
6118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6120 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6121 (struct linux_target_ops) <breakpoint>: Remove.
6122 (struct linux_target_ops) <breakpoint_len>: Remove.
6123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6125 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6126 (struct linux_target_ops) <breakpoint>: Remove.
6127 (struct linux_target_ops) <breakpoint_len>: Remove.
6128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6130 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6131 (struct linux_target_ops) <breakpoint>: Remove.
6132 (struct linux_target_ops) <breakpoint_len>: Remove.
6133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6135 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6136 (struct linux_target_ops) <breakpoint>: Remove.
6137 (struct linux_target_ops) <breakpoint_len>: Remove.
6138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6140 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6141 (struct linux_target_ops) <breakpoint>: Remove.
6142 (struct linux_target_ops) <breakpoint_len>: Remove.
6143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6145 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6146 (struct linux_target_ops) <breakpoint>: Remove.
6147 (struct linux_target_ops) <breakpoint_len>: Remove.
6148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6150 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6151 (struct linux_target_ops) <breakpoint>: Remove.
6152 (struct linux_target_ops) <breakpoint_len>: Remove.
6153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6155 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6156 (struct linux_target_ops) <breakpoint>: Remove.
6157 (struct linux_target_ops) <breakpoint_len>: Remove.
6158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6160 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6161 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6162 (struct linux_target_ops) <breakpoint>: Remove.
6163 (struct linux_target_ops) <breakpoint_len>: Remove.
6164 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6166 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6167 (struct linux_target_ops) <breakpoint>: Remove.
6168 (struct linux_target_ops) <breakpoint_len>: Remove.
6169 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6171
4cd98a19
AT
61722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6173
6174 * linux-cris-low.c (cris_get_pc): Remove void arg.
6175
774ee6d2
AR
61762015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6177
6178 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6179 variable name.
6180
833dcd29
AR
61812015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6182
6183 * inferiors.c (thread_pid_matches_callback): New function.
6184 (find_thread_process): New function.
6185 (remove_thread): Reset current_thread.
6186 (remove_process): Assert threads have been removed first.
6187
8d689ee5
YQ
61882015-10-15 Yao Qi <yao.qi@linaro.org>
6189
6190 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6191 if it is 3.
6192 (aarch64_remove_point): Likewise.
6193 * regcache.c (regcache_register_size): New function.
6194
1c2e1515
YQ
61952015-10-12 Yao Qi <yao.qi@linaro.org>
6196
6197 * linux-aarch64-low.c: Update all callers as emit_load_store
6198 is renamed to aarch64_emit_load_store.
6199
e1c587c3
YQ
62002015-10-12 Yao Qi <yao.qi@linaro.org>
6201
6202 * linux-aarch64-low.c: Update all callers of function renaming
6203 from emit_insn to aarch64_emit_insn.
6204
b6542f81
YQ
62052015-10-12 Yao Qi <yao.qi@linaro.org>
6206
6207 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6208 arch/aarch64-insn.h.
6209 (struct aarch64_memory_operand): Likewise.
6210 (ENCODE): Likewise.
6211 (emit_insn): Move to arch/aarch64-insn.c.
6212 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6213 (emit_load_store): Move to arch/aarch64-insn.c.
6214 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6215 (can_encode_int32): Remove.
6216
246994ce
YQ
62172015-10-12 Yao Qi <yao.qi@linaro.org>
6218
6219 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6220 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6221 (aarch64_relocate_instruction): Likewise.
6222 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6223 (struct aarch64_insn_visitor): Likewise.
6224
0badd99f
YQ
62252015-10-12 Yao Qi <yao.qi@linaro.org>
6226
6227 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6228 (struct aarch64_insn_visitor): New.
6229 (struct aarch64_insn_relocation_data): New.
6230 (aarch64_ftrace_insn_reloc_b): New function.
6231 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6232 (aarch64_ftrace_insn_reloc_cb): Likewise.
6233 (aarch64_ftrace_insn_reloc_tb): Likewise.
6234 (aarch64_ftrace_insn_reloc_adr): Likewise.
6235 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6236 (aarch64_ftrace_insn_reloc_others): Likewise.
6237 (visitor): New.
6238 (aarch64_relocate_instruction): Use visitor.
6239
dfaffe9d
YQ
62402015-10-12 Yao Qi <yao.qi@linaro.org>
6241
6242 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6243 int. Add argument buf.
6244 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6245 aarch64_relocate_instruction.
6246
70b439f0
YQ
62472015-10-12 Yao Qi <yao.qi@linaro.org>
6248
6249 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6250 argument insn. Remove local variable insn. Don't call
6251 target_read_uint32.
6252 (aarch64_install_fast_tracepoint_jump_pad): Call
6253 target_read_uint32.
6254
7781c06f
YQ
62552015-09-30 Yao Qi <yao.qi@linaro.org>
6256
6257 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6258 (emit_load_store_pair): Likewise.
6259
9a3c8263
SM
62602015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6261
6262 * dll.c (match_dll): Add cast(s).
6263 (unloaded_dll): Likewise.
6264 * linux-low.c (second_thread_of_pid_p): Likewise.
6265 (delete_lwp_callback): Likewise.
6266 (count_events_callback): Likewise.
6267 (select_event_lwp_callback): Likewise.
6268 (linux_set_resume_request): Likewise.
6269 * server.c (accumulate_file_name_length): Likewise.
6270 (emit_dll_description): Likewise.
6271 (handle_qxfer_threads_worker): Likewise.
6272 (visit_actioned_threads): Likewise.
6273 * thread-db.c (any_thread_of): Likewise.
6274 * tracepoint.c (same_process_p): Likewise.
6275 (match_blocktype): Likewise.
6276 (build_traceframe_info_xml): Likewise.
6277
224c3ddb
SM
62782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6279
6280 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6281 assignment.
6282 (gdb_unparse_agent_expr): Likewise.
6283 * hostio.c (require_data): Likewise.
6284 (handle_pread): Likewise.
6285 * linux-low.c (disable_regset): Likewise.
6286 (fetch_register): Likewise.
6287 (store_register): Likewise.
6288 (get_dynamic): Likewise.
6289 (linux_qxfer_libraries_svr4): Likewise.
6290 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6291 (set_fast_tracepoint_jump): Likewise.
6292 (uninsert_fast_tracepoint_jumps_at): Likewise.
6293 (reinsert_fast_tracepoint_jumps_at): Likewise.
6294 (validate_inserted_breakpoint): Likewise.
6295 (clone_agent_expr): Likewise.
6296 * regcache.c (init_register_cache): Likewise.
6297 * remote-utils.c (putpkt_binary_1): Likewise.
6298 (decode_M_packet): Likewise.
6299 (decode_X_packet): Likewise.
6300 (look_up_one_symbol): Likewise.
6301 (relocate_instruction): Likewise.
6302 (monitor_output): Likewise.
6303 * server.c (handle_search_memory): Likewise.
6304 (handle_qxfer_exec_file): Likewise.
6305 (handle_qxfer_libraries): Likewise.
6306 (handle_qxfer): Likewise.
6307 (handle_query): Likewise.
6308 (handle_v_cont): Likewise.
6309 (handle_v_run): Likewise.
6310 (captured_main): Likewise.
6311 * target.c (write_inferior_memory): Likewise.
6312 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6313 * tracepoint.c (init_trace_buffer): Likewise.
6314 (add_tracepoint_action): Likewise.
6315 (add_traceframe): Likewise.
6316 (add_traceframe_block): Likewise.
6317 (cmd_qtdpsrc): Likewise.
6318 (cmd_qtdv): Likewise.
6319 (cmd_qtstatus): Likewise.
6320 (response_source): Likewise.
6321 (response_tsv): Likewise.
6322 (cmd_qtnotes): Likewise.
6323 (gdb_collect): Likewise.
6324 (initialize_tracepoint): Likewise.
6325
afbe19f8
PL
63262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6327
6328 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6329 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6330 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6331 <NOP>: New.
6332 (enum aarch64_condition_codes): New enum.
6333 (w0): New static global.
6334 (fp): Likewise.
6335 (lr): Likewise.
6336 (struct aarch64_memory_operand) <type>: New
6337 MEMORY_OPERAND_POSTINDEX type.
6338 (postindex_memory_operand): New helper function.
6339 (emit_ret): New function.
6340 (emit_load_store_pair): New function, factored out of emit_stp
6341 with support for MEMORY_OPERAND_POSTINDEX.
6342 (emit_stp): Rewrite using emit_load_store_pair.
6343 (emit_ldp): New function.
6344 (emit_load_store): Likewise.
6345 (emit_ldr): Mention post-index instruction in comment.
6346 (emit_ldrh): New function.
6347 (emit_ldrb): New function.
6348 (emit_ldrsw): Mention post-index instruction in comment.
6349 (emit_str): Likewise.
6350 (emit_subs): New function.
6351 (emit_cmp): Likewise.
6352 (emit_and): Likewise.
6353 (emit_orr): Likewise.
6354 (emit_orn): Likewise.
6355 (emit_eor): Likewise.
6356 (emit_mvn): Likewise.
6357 (emit_lslv): Likewise.
6358 (emit_lsrv): Likewise.
6359 (emit_asrv): Likewise.
6360 (emit_mul): Likewise.
6361 (emit_sbfm): Likewise.
6362 (emit_sbfx): Likewise.
6363 (emit_ubfm): Likewise.
6364 (emit_ubfx): Likewise.
6365 (emit_csinc): Likewise.
6366 (emit_cset): Likewise.
6367 (emit_nop): Likewise.
6368 (emit_ops_insns): New helper function.
6369 (emit_pop): Likewise.
6370 (emit_push): Likewise.
6371 (aarch64_emit_prologue): New function.
6372 (aarch64_emit_epilogue): Likewise.
6373 (aarch64_emit_add): Likewise.
6374 (aarch64_emit_sub): Likewise.
6375 (aarch64_emit_mul): Likewise.
6376 (aarch64_emit_lsh): Likewise.
6377 (aarch64_emit_rsh_signed): Likewise.
6378 (aarch64_emit_rsh_unsigned): Likewise.
6379 (aarch64_emit_ext): Likewise.
6380 (aarch64_emit_log_not): Likewise.
6381 (aarch64_emit_bit_and): Likewise.
6382 (aarch64_emit_bit_or): Likewise.
6383 (aarch64_emit_bit_xor): Likewise.
6384 (aarch64_emit_bit_not): Likewise.
6385 (aarch64_emit_equal): Likewise.
6386 (aarch64_emit_less_signed): Likewise.
6387 (aarch64_emit_less_unsigned): Likewise.
6388 (aarch64_emit_ref): Likewise.
6389 (aarch64_emit_if_goto): Likewise.
6390 (aarch64_emit_goto): Likewise.
6391 (aarch64_write_goto_address): Likewise.
6392 (aarch64_emit_const): Likewise.
6393 (aarch64_emit_call): Likewise.
6394 (aarch64_emit_reg): Likewise.
6395 (aarch64_emit_pop): Likewise.
6396 (aarch64_emit_stack_flush): Likewise.
6397 (aarch64_emit_zero_ext): Likewise.
6398 (aarch64_emit_swap): Likewise.
6399 (aarch64_emit_stack_adjust): Likewise.
6400 (aarch64_emit_int_call_1): Likewise.
6401 (aarch64_emit_void_call_2): Likewise.
6402 (aarch64_emit_eq_goto): Likewise.
6403 (aarch64_emit_ne_goto): Likewise.
6404 (aarch64_emit_lt_goto): Likewise.
6405 (aarch64_emit_le_goto): Likewise.
6406 (aarch64_emit_gt_goto): Likewise.
6407 (aarch64_emit_ge_got): Likewise.
6408 (aarch64_emit_ops_impl): New static global variable.
6409 (aarch64_emit_ops): New target function, return
6410 &aarch64_emit_ops_impl.
6411 (struct linux_target_ops): Install it.
6412
bb903df0
PL
64132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6414
6415 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6416 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6417 aarch64-ipa.o.
6418 * linux-aarch64-ipa.c: New file.
6419 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6420 and endian.h.
6421 (aarch64_get_thread_area): New target method.
6422 (extract_signed_bitfield): New helper function.
6423 (aarch64_decode_ldr_literal): New function.
6424 (enum aarch64_opcodes): New enum.
6425 (struct aarch64_register): New struct.
6426 (struct aarch64_operand): New struct.
6427 (x0): New static global.
6428 (x1): Likewise.
6429 (x2): Likewise.
6430 (x3): Likewise.
6431 (x4): Likewise.
6432 (w2): Likewise.
6433 (ip0): Likewise.
6434 (sp): Likewise.
6435 (xzr): Likewise.
6436 (aarch64_register): New helper function.
6437 (register_operand): Likewise.
6438 (immediate_operand): Likewise.
6439 (struct aarch64_memory_operand): New struct.
6440 (offset_memory_operand): New helper function.
6441 (preindex_memory_operand): Likewise.
6442 (enum aarch64_system_control_registers): New enum.
6443 (ENCODE): New macro.
6444 (emit_insn): New helper function.
6445 (emit_b): New function.
6446 (emit_bcond): Likewise.
6447 (emit_cb): Likewise.
6448 (emit_tb): Likewise.
6449 (emit_blr): Likewise.
6450 (emit_stp): Likewise.
6451 (emit_ldp_q_offset): Likewise.
6452 (emit_stp_q_offset): Likewise.
6453 (emit_load_store): Likewise.
6454 (emit_ldr): Likewise.
6455 (emit_ldrsw): Likewise.
6456 (emit_str): Likewise.
6457 (emit_ldaxr): Likewise.
6458 (emit_stxr): Likewise.
6459 (emit_stlr): Likewise.
6460 (emit_data_processing_reg): Likewise.
6461 (emit_data_processing): Likewise.
6462 (emit_add): Likewise.
6463 (emit_sub): Likewise.
6464 (emit_mov): Likewise.
6465 (emit_movk): Likewise.
6466 (emit_mov_addr): Likewise.
6467 (emit_mrs): Likewise.
6468 (emit_msr): Likewise.
6469 (emit_sevl): Likewise.
6470 (emit_wfe): Likewise.
6471 (append_insns): Likewise.
6472 (can_encode_int32_in): New helper function.
6473 (aarch64_relocate_instruction): New function.
6474 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6475 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6476 (struct linux_target_ops): Install aarch64_get_thread_area,
6477 aarch64_install_fast_tracepoint_jump_pad and
6478 aarch64_get_min_fast_tracepoint_insn_len.
6479
787749ea
PL
64802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6481
6482 * Makefile.in (aarch64-insn.o): New rule.
6483 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6484
9812b2e6
YQ
64852015-09-21 Yao Qi <yao.qi@linaro.org>
6486
6487 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6488
18fe412b
YQ
64892015-09-21 Yao Qi <yao.qi@linaro.org>
6490
6491 * tracepoint.c (max_jump_pad_size): Remove.
6492
a0cc84cd
YQ
64932015-09-18 Yao Qi <yao.qi@linaro.org>
6494
6495 * linux-aarch64-low.c: Don't include sys/uio.h.
6496 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6497
d78908cf
WW
64982015-09-16 Wei-cheng Wang <cole945@gmail.com>
6499
6500 * tracepoint.c (eval_result_type): Change prototype.
6501 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6502
d57e0d50
PA
65032015-09-15 Pedro Alves <palves@redhat.com>
6504
6505 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6506 Check whether to report exec events instead of checking whether
6507 multiprocess is enabled.
6508
5a676acc
PA
65092015-09-15 Pedro Alves <palves@redhat.com>
6510
6511 PR remote/18965
6512 * remote-utils.c (prepare_resume_reply): Merge
6513 TARGET_WAITKIND_VFORK_DONE switch case with the
6514 TARGET_WAITKIND_FORKED case.
6515
7c5d0fad
YQ
65162015-09-15 Yao Qi <yao.qi@linaro.org>
6517
6518 * server.c (handle_query): Check string comparison using
6519 "else if" instead of "if".
6520
750ce8d1
YQ
65212015-09-15 Yao Qi <yao.qi@linaro.org>
6522
6523 * server.c (vCont_supported): New global variable.
6524 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6525 matches. Append ";vContSupported+" to own_buf.
6526 (handle_v_requests): Append ";s;S" to own_buf if target supports
6527 hardware single step or vCont_supported is false.
6528 (capture_main): Set vCont_supported to zero.
6529
70b90b91
YQ
65302015-09-15 Yao Qi <yao.qi@linaro.org>
6531
6532 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6533 it to ...
6534 (linux_supports_hardware_single_step): ... New function.
6535 (linux_target_ops): Update.
6536 * lynx-low.c (lynx_target_ops): Set field
6537 supports_hardware_single_step to target_can_do_hardware_single_step.
6538 * nto-low.c (nto_target_ops): Likewise.
6539 * spu-low.c (spu_target_ops): Likewise.
6540 * win32-low.c (win32_target_ops): Likewise.
6541 * target.c (target_can_do_hardware_single_step): New function.
6542 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6543 Remove. <supports_hardware_single_step>: New field.
6544 (target_supports_conditional_breakpoints): Remove.
6545 (target_supports_hardware_single_step): New macro.
6546 (target_can_do_hardware_single_step): Declare.
6547 * server.c (handle_query): Use target_supports_hardware_single_step
6548 instead of target_supports_conditional_breakpoints.
6549
ade90bde
YQ
65502015-09-15 Yao Qi <yao.qi@linaro.org>
6551
6552 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6553 function.
6554 (struct linux_target_ops the_low_target): Install
6555 aarch64_linux_siginfo_fixup.
6556
94585166
DB
65572015-09-11 Don Breazeal <donb@codesourcery.com>
6558 Luis Machado <lgustavo@codesourcery.com>
6559
6560 * linux-low.c (linux_mourn): Static declaration.
6561 (linux_arch_setup): Move in front of
6562 handle_extended_wait.
6563 (linux_arch_setup_thread): New function.
6564 (handle_extended_wait): Handle exec events. Call
6565 linux_arch_setup_thread. Make event_lwp argument a
6566 pointer-to-a-pointer.
6567 (check_zombie_leaders): Do not check stopped threads.
6568 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6569 (linux_low_filter_event): Add lwp and thread for exec'ing
6570 non-leader thread if leader thread has been deleted.
6571 Refactor code into linux_arch_setup_thread and call it.
6572 Pass child lwp pointer by reference to handle_extended_wait.
6573 (linux_wait_for_event_filtered): Update comment.
6574 (linux_wait_1): Prevent clobbering exec event status.
6575 (linux_supports_exec_events): New function.
6576 (linux_target_ops) <supports_exec_events>: Initialize new member.
6577 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6578 new member.
6579 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6580 * server.c (report_exec_events): New global variable.
6581 (handle_query): Handle qSupported query for exec-events feature.
6582 (captured_main): Initialize report_exec_events.
6583 * server.h (report_exec_events): Declare new global variable.
6584 * target.h (struct target_ops) <supports_exec_events>: New
6585 member.
6586 (target_supports_exec_events): New macro.
6587 * win32-low.c (win32_target_ops) <supports_exec_events>:
6588 Initialize new member.
6589
0568462b
MM
65902015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6591
6592 * linux-low.c (linux_low_enable_btrace): Remove.
6593 (linux_target_ops): Replace linux_low_enable_btrace with
6594 linux_enable_btrace.
6595
39edd165
YQ
65962015-09-03 Yao Qi <yao.qi@linaro.org>
6597
6598 * linux-aarch64-low.c (aarch64_insert_point): Call
6599 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6600 returns true.
6601
1db33b5a
UW
66022015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6603
6604 * linux-low.c (check_stopped_by_breakpoint): Use
6605 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6606
ab290430
PA
66072015-08-27 Pedro Alves <palves@redhat.com>
6608
6609 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6610
8d749320
SM
66112015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6612
6711b7f8
SM
6613 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6614 the XNEW-family equivalent.
8d749320
SM
6615 (compile_bytecodes): Likewise.
6616 * dll.c (loaded_dll): Likewise.
6617 * event-loop.c (append_callback_event): Likewise.
6618 (create_file_handler): Likewise.
6619 (create_file_event): Likewise.
6620 * hostio.c (handle_open): Likewise.
6621 * inferiors.c (add_thread): Likewise.
6622 (add_process): Likewise.
6623 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6624 * linux-arm-low.c (arm_new_process): Likewise.
6625 (arm_new_thread): Likewise.
6626 * linux-low.c (add_to_pid_list): Likewise.
6627 (linux_add_process): Likewise.
6628 (handle_extended_wait): Likewise.
6629 (add_lwp): Likewise.
6630 (enqueue_one_deferred_signal): Likewise.
6631 (enqueue_pending_signal): Likewise.
6632 (linux_resume_one_lwp_throw): Likewise.
6633 (linux_resume_one_thread): Likewise.
6634 (linux_read_memory): Likewise.
6635 (linux_write_memory): Likewise.
6636 * linux-mips-low.c (mips_linux_new_process): Likewise.
6637 (mips_linux_new_thread): Likewise.
6638 (mips_add_watchpoint): Likewise.
6639 * linux-x86-low.c (initialize_low_arch): Likewise.
6640 * lynx-low.c (lynx_add_process): Likewise.
6641 * mem-break.c (set_raw_breakpoint_at): Likewise.
6642 (set_breakpoint): Likewise.
6643 (add_condition_to_breakpoint): Likewise.
6644 (add_commands_to_breakpoint): Likewise.
6645 (clone_agent_expr): Likewise.
6646 (clone_one_breakpoint): Likewise.
6647 * regcache.c (new_register_cache): Likewise.
6648 * remote-utils.c (look_up_one_symbol): Likewise.
6649 * server.c (queue_stop_reply): Likewise.
6650 (start_inferior): Likewise.
6651 (queue_stop_reply_callback): Likewise.
6652 (handle_target_event): Likewise.
6653 * spu-low.c (fetch_ppc_memory): Likewise.
6654 (store_ppc_memory): Likewise.
6655 * target.c (set_target_ops): Likewise.
6656 * thread-db.c (thread_db_load_search): Likewise.
6657 (try_thread_db_load_1): Likewise.
6658 * tracepoint.c (add_tracepoint): Likewise.
6659 (add_tracepoint_action): Likewise.
6660 (create_trace_state_variable): Likewise.
6661 (cmd_qtdpsrc): Likewise.
6662 (cmd_qtro): Likewise.
6663 (add_while_stepping_state): Likewise.
6664 * win32-low.c (child_add_thread): Likewise.
6665 (get_image_name): Likewise.
6666
ed8b7b42
YQ
66672015-08-25 Yao Qi <yao.qi@linaro.org>
6668
6669 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6670
db3cb7cb
YQ
66712015-08-25 Yao Qi <yao.qi@linaro.org>
6672
6673 * Makefile.in (aarch64-linux.o): New rule.
6674 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6675 srv_tgtobj.
6676 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6677 (aarch64_init_debug_reg_state): Make it extern.
6678 (aarch64_linux_prepare_to_resume): Remove.
6679
f6011a1c
YQ
66802015-08-25 Yao Qi <yao.qi@linaro.org>
6681
6682 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6683 lwp_arch_private_info and ptid_of_lwp.
6684
88e2cf7e
YQ
66852015-08-25 Yao Qi <yao.qi@linaro.org>
6686
6687 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6688 Find proc_info by find_process_pid. All callers updated.
6689
5e35436e
YQ
66902015-08-25 Yao Qi <yao.qi@linaro.org>
6691
6692 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6693 Remove.
6694 (debug_reg_change_callback): Remove.
6695 (aarch64_notify_debug_reg_change): Remove.
6696
4a8a7965
YQ
66972015-08-25 Yao Qi <yao.qi@linaro.org>
6698
6699 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6700 Call current_lwp_ptid.
6701
32a271ee
YQ
67022015-08-25 Yao Qi <yao.qi@linaro.org>
6703
6704 * linux-aarch64-low.c (debug_reg_change_callback): Use
6705 debug_printf.
6706
0d51c8d7
YQ
67072015-08-25 Yao Qi <yao.qi@linaro.org>
6708
6709 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6710
31a43dd5
YQ
67112015-08-25 Yao Qi <yao.qi@linaro.org>
6712
6713 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6714
8ee52567
YQ
67152015-08-25 Yao Qi <yao.qi@linaro.org>
6716
6717 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6718 the code.
6719
ff3f0f45
YQ
67202015-08-25 Yao Qi <yao.qi@linaro.org>
6721
6722 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6723 Remove.
6724 (debug_reg_change_callback): Remove argument entry and add argument
6725 lwp. Remove local variable thread. Don't print thread id in the
6726 debugging output. Don't check whether pid of thread equals to pid.
6727 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6728 iterate_over_lwps instead find_inferior.
6729
3d40fbb5
PA
67302015-08-24 Pedro Alves <palves@redhat.com>
6731
6732 * inferiors.c (get_first_process): New function.
6733 * inferiors.h (get_first_process): New declaration.
6734 * remote-utils.c (read_ptid): Default to the first process in the
6735 list, instead of to the current thread's process.
6736
438e1e42
PA
67372015-08-24 Pedro Alves <palves@redhat.com>
6738
6739 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6740 * event-loop.c: Likewise.
6741 * remote-utils.c: Likewise.
6742 * tracepoint.c: Likewise.
6743
a8c6d4fc
PA
67442015-08-24 Pedro Alves <palves@redhat.com>
6745
6746 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6747 ptid_get_lwp.
6748
99b0bb12
PA
67492015-08-21 Pedro Alves <palves@redhat.com>
6750
6751 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6752 instead of literal 1.
6753
f8904751
PA
67542015-08-21 Pedro Alves <palves@redhat.com>
6755
6756 * tdesc.c (default_description): Explicitly zero-initialize.
6757
465a859e
PA
67582015-08-21 Pedro Alves <palves@redhat.com>
6759
6760 PR gdb/18749
6761 * inferiors.c (remove_thread): Discard any pending stop reply for
6762 this thread.
6763 * server.c (remove_all_on_match_pid): Rename to ...
6764 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6765 instead of a pid.
6766 (discard_queued_stop_replies): Change parameter to a ptid. Now
6767 extern.
6768 (handle_v_kill, kill_inferior_callback, captured_main)
6769 (process_serial_event): Adjust.
6770 * server.h (discard_queued_stop_replies): Declare.
6771
f0db101d
PA
67722015-08-21 Pedro Alves <palves@redhat.com>
6773
6774 * linux-low.c (wait_for_sigstop): Always switch to no thread
6775 selected if the previously current thread dies.
6776 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6777 process instead of the current thread's.
6778 * remote-utils.c (input_interrupt): Don't check if there's no
6779 current thread.
6780 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6781 current thread to the general thread fails, error out.
6782 (handle_qxfer_auxv, handle_qxfer_libraries)
6783 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6784 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6785 (handle_query): Check if there's a thread selected instead of
6786 checking whether there's any thread in the thread list.
6787 (handle_qxfer_threads, handle_qxfer_btrace)
6788 (handle_qxfer_btrace_conf): Don't error out early if there's no
6789 thread in the thread list.
6790 (handle_v_cont, myresume): Don't set the current thread to the
6791 continue thread.
6792 (process_serial_event) <Hg handling>: Also set thread_id if the
6793 previous general thread is still alive.
6794 (process_serial_event) <g/G handling>: If setting the current
6795 thread to the general thread fails, error out.
6796 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6797 thread's lwp instead of the current thread's.
6798 * target.c (set_desired_thread): If the desired thread was not
6799 found, leave the current thread pointing to NULL. Return an int
6800 (boolean) indicating success.
6801 * target.h (set_desired_thread): Change return type to int.
6802
40045d91
MF
68032015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6804
6805 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6806 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6807 #includes.
6808 (ps_get_thread_area): New function.
6809
45face3b
GB
68102015-08-19 Gary Benson <gbenson@redhat.com>
6811
6812 * hostio.c (handle_pread): Do not attempt to read more data
6813 than hostio_reply_with_data can fit in a packet.
6814
16d5f642
JB
68152015-08-18 Joel Brobecker <brobecker@adacore.com>
6816
6817 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6818
a738da3a
MF
68192015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6820
6821 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6822
33ebda9d
PA
68232015-08-06 Pedro Alves <palves@redhat.com>
6824
6825 * tracepoint.c (expr_eval_result): Now an int.
6826
a44892be
PA
68272015-08-06 Pedro Alves <palves@redhat.com>
6828
6829 * gdbthread.h (struct regcache): Forward declare.
6830 (struct thread_info) <regcache_data>: Now a struct regcache
6831 pointer.
6832 * inferiors.c (inferior_regcache_data)
6833 (set_inferior_regcache_data): Now work with struct regcache
6834 pointers.
6835 * inferiors.h (struct regcache): Forward declare.
6836 (inferior_regcache_data, set_inferior_regcache_data): Now work
6837 with struct regcache pointers.
6838 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6839 (free_register_cache_thread): Remove struct regcache pointer
6840 casts.
6841
608a1e46
PA
68422015-08-06 Pedro Alves <palves@redhat.com>
6843
6844 * server.c (captured_main): On error, print the exception message
6845 to stderr, and if run_once is set, throw a quit.
6846
f0ce0d3a
PA
68472015-08-06 Pedro Alves <palves@redhat.com>
6848
6849 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6850 the current thread.
6851
bf47e248
PA
68522015-08-06 Pedro Alves <palves@redhat.com>
6853
6854 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6855 reading beyond the passed in buffer length.
6856
b6b9ffcc
PL
68572015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6858
6859 * tracepoint.c (symbol_list) <required>: Remove.
6860
863d01bd
PA
68612015-08-06 Pedro Alves <palves@redhat.com>
6862
6863 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6864 count if stopping and suspending threads.
6865 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6866 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6867 (linux_detach): Complete an ongoing step-over.
6868 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6869 throughout.
6870 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6871 (linux_wait_1): If passing a signal to the inferior after
6872 finishing a step-over, unsuspend and re-resume all lwps. If we
6873 see a single-step event but the thread should be continuing, don't
6874 pass the trap to gdb.
6875 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6876 internal_error instead of gdb_assert.
6877 (enqueue_pending_signal): New function.
6878 (check_ptrace_stopped_lwp_gone): Add debug output.
6879 (start_step_over): Use internal_error instead of gdb_assert.
6880 (complete_ongoing_step_over): New function.
6881 (linux_resume_one_thread): Don't resume a suspended thread.
6882 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6883 it stepping.
6884
00db26fa
PA
68852015-08-06 Pedro Alves <palves@redhat.com>
6886
6887 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6888 (linux_thread_alive): Use lwp_is_marked_dead.
6889 (extended_event_reported): Delete.
6890 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6891 instead of extended_event_reported.
6892 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6893 as well.
6894 (lwp_is_marked_dead): New function.
6895 (lwp_running): Use lwp_is_marked_dead.
6896 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6897 comment.
6898
ad071a30
PA
68992015-08-06 Pedro Alves <palves@redhat.com>
6900
6901 * linux-low.c (linux_wait_1): Move fork event output out of the
6902 !report_to_gdb check. Pass event_child->waitstatus to
6903 target_waitstatus_to_string instead of ourstatus.
6904
524b57e6
YQ
69052015-08-04 Yao Qi <yao.qi@linaro.org>
6906
6907 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6908 if current_thread is 32 bit.
6909
6085d6f6
YQ
69102015-08-04 Yao Qi <yao.qi@linaro.org>
6911
6912 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6913 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6914 * server.c (extended_protocol): Remove "static".
6915 * server.h (extended_protocol): Declare it.
6916
8a7e4587
YQ
69172015-08-04 Yao Qi <yao.qi@linaro.org>
6918
6919 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6920 both aarch64 and aarch32.
6921 (aarch64_set_pc): Likewise.
6922
3b53ae99
YQ
69232015-08-04 Yao Qi <yao.qi@linaro.org>
6924
6925 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6926 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6927 arm-with-neon.xml to srv_xmlfiles.
6928 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6929 (is_64bit_tdesc): New function.
6930 (aarch64_linux_read_description): New function.
6931 (aarch64_arch_setup): Call aarch64_linux_read_description.
6932 (regs_info): Rename to regs_info_aarch64.
6933 (aarch64_regs_info): Return right regs_info.
6934 (initialize_low_arch): Call initialize_low_arch_aarch32.
6935
bd9e6534
YQ
69362015-08-04 Yao Qi <yao.qi@linaro.org>
6937
6938 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6939 * linux-aarch32-low.c: New file.
6940 * linux-aarch32-low.h: New file.
6941 * linux-arm-low.c (arm_fill_gregset): Move it to
6942 linux-aarch32-low.c.
6943 (arm_store_gregset): Likewise.
6944 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6945 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6946 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6947 (regs_info): Rename to regs_info_arm.
6948 (arm_regs_info): Return regs_info_aarch32 if
6949 have_ptrace_getregset is 1 and target description is
6950 arm_with_neon or arm_with_vfpv3.
6951 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6952 Call initialize_low_arch_aarch32 instead.
6953
ded48a5e
YQ
69542015-08-04 Yao Qi <yao.qi@linaro.org>
6955
6956 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6957 * linux-low.c: ... here.
6958 * linux-low.h (have_ptrace_getregset): Declare it.
6959
96e9210f
PA
69602015-08-04 Pedro Alves <palves@redhat.com>
6961
6962 * thread-db.c (struct thread_db): Use new typedefs.
6963 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6964 CHK calls.
6965 (disable_thread_event_reporting): Cast result of dlsym to
6966 destination function pointer type.
6967 (thread_db_mourn): Use td_ta_delete_ftype.
6968
af60a1ef
SL
69692015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6970
6971 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6972 arch variant.
6973 (CDX_BREAKPOINT): Define for R2.
6974 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6975 (the_low_target): Add comments.
6976
e8b41681
YQ
69772015-07-30 Yao Qi <yao.qi@linaro.org>
6978
6979 * linux-arm-low.c (arm_hwcap): Remove it.
6980 (arm_read_description): New local variable arm_hwcap. Don't
6981 set arm_hwcap to zero.
6982
89abb039
YQ
69832015-07-30 Yao Qi <yao.qi@linaro.org>
6984
6985 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6986 Use regcache->tdesc instead.
6987 (arm_store_wmmxregset): Likewise.
6988 (arm_fill_vfpregset): Likewise.
6989 (arm_store_vfpregset): Likewise.
6990
deca266c
YQ
69912015-07-30 Yao Qi <yao.qi@linaro.org>
6992
6993 * linux-arm-low.c: Include arch/arm.h.
6994 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6995 (arm_store_gregset): Likewise.
6996
aa58a496
SM
69972015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6998
6999 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7000 ptrace's 4th parameter.
7001
50904b25
YQ
70022015-07-27 Yao Qi <yao.qi@linaro.org>
7003
7004 * configure.srv (case aarch64*-*-linux*): Don't set
7005 srv_linux_usrregs.
7006
5826e159
PA
70072015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7008
7009 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7010 sys/ptrace.h.
7011 * linux-arm-low.c: Likewise.
7012 * linux-cris-low.c: Likewise.
7013 * linux-crisv32-low.c: Likewise.
7014 * linux-low.c: Likewise.
7015 * linux-m68k-low.c: Likewise.
7016 * linux-mips-low.c: Likewise.
7017 * linux-nios2-low.c: Likewise.
7018 * linux-s390-low.c: Likewise.
7019 * linux-sparc-low.c: Likewise.
7020 * linux-tic6x-low.c: Likewise.
7021 * linux-tile-low.c: Likewise.
7022 * linux-x86-low.c: Likewise.
7023
54019719
PA
70242015-07-24 Pedro Alves <palves@redhat.com>
7025
7026 * config.in: Regenerate.
7027 * configure: Regenerate.
7028
eb7aa561
PA
70292015-07-24 Pedro Alves <palves@redhat.com>
7030
7031 * acinclude.m4: Include ../ptrace.m4.
7032 * configure.ac: Call GDB_AC_PTRACE.
7033 * config.in, configure: Regenerate.
7034
55d7b841
YQ
70352015-07-24 Yao Qi <yao.qi@linaro.org>
7036
7037 * linux-low.c (linux_create_inferior): Remove setting to
7038 proc->priv->new_inferior.
7039 (linux_attach): Likewise.
7040 (linux_low_filter_event): Likewise.
7041 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7042
c06cbd92
YQ
70432015-07-24 Yao Qi <yao.qi@linaro.org>
7044
7045 * linux-low.c (linux_arch_setup): New function.
7046 (linux_low_filter_event): If proc->tdesc is NULL and
7047 proc->attached is true, call the_low_target.arch_setup.
7048 Otherwise, keep status pending, and return.
7049 (linux_resume_one_lwp_throw): Don't call get_pc if
7050 thread->while_stepping isn't NULL. Don't call
7051 get_thread_regcache if proc->tdesc is NULL.
7052 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7053 (linux_target_ops): Install arch_setup.
7054 * server.c (start_inferior): Call the_target->arch_setup.
7055 * target.h (struct target_ops) <arch_setup>: New field.
7056 (target_arch_setup): New marco.
7057 * lynx-low.c (lynx_target_ops): Update.
7058 * nto-low.c (nto_target_ops): Update.
7059 * spu-low.c (spu_target_ops): Update.
7060 * win32-low.c (win32_target_ops): Update.
7061
5ae3ebba
YQ
70622015-07-24 Yao Qi <yao.qi@linaro.org>
7063
7064 * linux-low.c (linux_add_process): Don't set
7065 proc->priv->new_inferior.
7066 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7067 (linux_attach): Likewise.
7068
eb97750b
YQ
70692015-07-24 Yao Qi <yao.qi@linaro.org>
7070
7071 * server.c (start_inferior): Code refactor.
7072
51aee833
YQ
70732015-07-24 Yao Qi <yao.qi@linaro.org>
7074
7075 * server.c (process_serial_event): Set general_thread.
7076
af1b22f3
YQ
70772015-07-21 Yao Qi <yao.qi@linaro.org>
7078
7079 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7080 aarch64_linux_get_debug_reg_capacity.
7081
554717a3
YQ
70822015-07-17 Yao Qi <yao.qi@linaro.org>
7083
7084 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7085 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7086 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7087 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7088 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7089 (AARCH64_HWP_ALIGNMENT): Likewise.
7090 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7091 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7092 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7093 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7094 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7095 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7096 (struct aarch64_debug_reg_state): Likewise.
7097 (struct arch_lwp_info): Likewise.
7098 (aarch64_align_watchpoint): Likewise.
7099 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7100 (aarch64_watchpoint_length): Likewise.
7101 (aarch64_point_encode_ctrl_reg): Likewise
7102 (aarch64_point_is_aligned): Likewise.
7103 (aarch64_align_watchpoint): Likewise.
7104 (aarch64_linux_set_debug_regs):
7105 (aarch64_dr_state_insert_one_point): Likewise.
7106 (aarch64_dr_state_remove_one_point): Likewise.
7107 (aarch64_handle_breakpoint): Likewise.
7108 (aarch64_handle_aligned_watchpoint): Likewise.
7109 (aarch64_handle_unaligned_watchpoint): Likewise.
7110 (aarch64_handle_watchpoint): Likewise.
7111
c67ca4de
YQ
71122015-07-17 Yao Qi <yao.qi@linaro.org>
7113
7114 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7115 and don't aarch64_get_debug_reg_state. All callers update.
7116 (aarch64_handle_aligned_watchpoint): Likewise.
7117 (aarch64_handle_unaligned_watchpoint): Likewise.
7118 (aarch64_handle_watchpoint): Likewise.
7119 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7120 (aarch64_remove_point): Likewise.
7121
25abf979
YQ
71222015-07-17 Yao Qi <yao.qi@linaro.org>
7123
7124 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7125 debug_printf.
7126 (aarch64_handle_unaligned_watchpoint): Likewise.
7127
db1ff28b
JK
71282015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7129
7130 Revert the previous 3 commits:
7131 Move gdb_regex* to common/
7132 Move linux_find_memory_regions_full & co.
7133 gdbserver build-id attribute generator
7134
700ca40f
JK
71352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7136 Jan Kratochvil <jan.kratochvil@redhat.com>
7137
7138 gdbserver build-id attribute generator.
7139 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7140 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7141 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7142 (find_phdr): New.
7143 (get_dynamic): Use find_pdhr to traverse program headers.
7144 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7145 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7146 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7147 (get_hex_build_id): New.
7148 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7149 to reply XML document.
7150
9904185c
JK
71512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7152 Jan Kratochvil <jan.kratochvil@redhat.com>
7153
7154 * target.c: Include target/target-utils.h and fcntl.h.
7155 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7156 (target_fileio_read_stralloc): New functions.
7157
6e5b4429
JK
71582015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7159
7160 * Makefile.in (OBS): Add gdb_regex.o.
7161 (gdb_regex.o): New.
7162 * config.in: Rebuilt.
7163 * configure: Rebuilt.
7164
ddc98fbf
JK
71652015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7166 Jan Kratochvil <jan.kratochvil@redhat.com>
7167
7168 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7169 * Makefile.in (OBS): Add target-utils.o.
7170 (linux-maps.o, target-utils.o): New.
7171 * configure.srv (srv_linux_obj): Add linux-maps.o.
7172
e57bb7a0
PL
71732015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7174
7175 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7176 function, return 1.
7177 (the_low_target): Install it.
7178
586b02a9
PA
71792015-07-14 Pedro Alves <palves@redhat.com>
7180
7181 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7182 Instead, ignore ECHILD, and throw an error for other errnos.
7183
58c1b36c
PA
71842015-07-10 Pedro Alves <palves@redhat.com>
7185
7186 * event-loop.c (struct callback_event) <data>: Change type to
7187 gdb_client_data instance instead of gdb_client_data pointer.
7188 (append_callback_event): Adjust.
7189
421530db
PL
71902015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7191
7192 * linux-aarch64-low.c: Add comments for each linux_target_ops
7193 method. Remove comments already covered in target_ops and
7194 linux_target_ops definitions.
7195 (the_low_target): Add comments for each unimplemented method.
7196
c2d65f38
YQ
71972015-07-09 Yao Qi <yao.qi@linaro.org>
7198
7199 * linux-aarch64-low.c (aarch64_regmap): Remove.
7200 (aarch64_usrregs_info): Remove.
7201 (regs_info): Set field usrregs to NULL.
7202
b20a6524
MM
72032015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7204
7205 * linux-low.c: Include "rsp-low.h"
7206 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7207 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7208 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7209 (handle_btrace_enable_pt): New.
7210 (handle_btrace_general_set): Support "pt".
7211 (handle_btrace_conf_general_set): Support "pt:size".
7212
96c97461
PL
72132015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7214
7215 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7216 Z_PACKET_SW_BP.
7217
37d66942
PL
72182015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7219
7220 * linux-aarch64-low.c: Remove comment about endianness.
7221 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7222 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7223 memcmp.
7224
dc06243f
GB
72252015-06-24 Gary Benson <gbenson@redhat.com>
7226
7227 * linux-i386-ipa.c (stdint.h): Do not include.
7228 * lynx-i386-low.c (stdint.h): Likewise.
7229 * lynx-ppc-low.c (stdint.h): Likewise.
7230 * mem-break.c (stdint.h): Likewise.
7231 * thread-db.c (stdint.h): Likewise.
7232 * tracepoint.c (stdint.h): Likewise.
7233 * win32-low.c (stdint.h): Likewise.
7234
124e13d9
SM
72352015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7236
7237 * server.c (write_qxfer_response): Update call to
7238 remote_escape_output.
7239
909c2cda
JK
72402015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7241 Jan Kratochvil <jan.kratochvil@redhat.com>
7242
7243 Merge multiple hex conversions.
7244 * gdbreplay.c (tohex): Rename to 'fromhex'.
7245 (logchar): Use fromhex.
7246
24c05f46
JK
72472015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7248
7249 * server.c (handle_qxfer_libraries): Set `version' attribute for
7250 <library-list>.
7251
14d2069a
GB
72522015-06-10 Gary Benson <gbenson@redhat.com>
7253
7254 * target.h (struct target_ops) <multifs_open>: New field.
7255 <multifs_unlink>: Likewise.
7256 <multifs_readlink>: Likewise.
7257 * linux-low.c (nat/linux-namespaces.h): New include.
7258 (linux_target_ops): Initialize the_target->multifs_open,
7259 the_target->multifs_unlink and the_target->multifs_readlink.
7260 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7261 * hostio.c (hostio_fs_pid): New static variable.
7262 (hostio_handle_new_gdb_connection): New function.
7263 (handle_setfs): Likewise.
7264 (handle_open): Use the_target->multifs_open as appropriate.
7265 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7266 (handle_readlink): Use the_target->multifs_readlink as
7267 appropriate.
7268 (handle_vFile): Handle vFile:setfs packets.
7269 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7270 after target_handle_new_gdb_connection.
7271
4b8b5e72
GB
72722015-06-10 Gary Benson <gbenson@redhat.com>
7273
7274 * configure.ac (AC_CHECK_FUNCS): Add setns.
7275 * config.in: Regenerate.
7276 * configure: Likewise.
7277 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7278 (linux-namespaces.o): New rule.
7279 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7280
3ac2e371
GB
72812015-06-09 Gary Benson <gbenson@redhat.com>
7282
7283 * hostio.c (handle_open): Process mode argument with
7284 fileio_to_host_mode.
7285
ca9b78ce
YQ
72862015-06-01 Yao Qi <yao.qi@linaro.org>
7287
7288 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7289 * linux-x86-low.c: Likewise.
7290
bfacd19d
DB
72912015-05-28 Don Breazeal <donb@codesourcery.com>
7292
7293 * linux-low.c (handle_extended_wait): Initialize
7294 thread_info.last_resume_kind for new fork children.
7295
452003ef
PA
72962015-05-15 Pedro Alves <palves@redhat.com>
7297
7298 * target.h (target_handle_new_gdb_connection): Rewrite using if
7299 wrapped in do/while.
7300
1041a03c
JB
73012015-05-14 Joel Brobecker <brobecker@adacore.com>
7302
7303 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7304 * configure, config.in: Regenerate.
7305 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7306 Declare typedef.
7307
c269dbdb
DB
73082015-05-12 Don Breazeal <donb@codesourcery.com>
7309
7310 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7311 PTRACE_EVENT_VFORK_DONE.
7312 (linux_low_ptrace_options, extended_event_reported): Add vfork
7313 events.
7314 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7315 and "vforkdone" for RSP 'T' Stop Reply Packet.
7316 * server.h (report_vfork_events): Declare
7317 global variable.
7318
3a8a0396
DB
73192015-05-12 Don Breazeal <donb@codesourcery.com>
7320
7321 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7322 (the_low_target) <new_fork>: Initialize new member.
7323 * linux-arm-low.c (arm_new_fork): New function.
7324 (the_low_target) <new_fork>: Initialize new member.
7325 * linux-low.c (handle_extended_wait): Call new target function
7326 new_fork.
7327 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7328 * linux-mips-low.c (mips_add_watchpoint): New function
7329 extracted from mips_insert_point.
7330 (the_low_target) <new_fork>: Initialize new member.
7331 (mips_linux_new_fork): New function.
7332 (mips_insert_point): Call mips_add_watchpoint.
7333 * linux-x86-low.c (x86_linux_new_fork): New function.
7334 (the_low_target) <new_fork>: Initialize new member.
7335
de0d863e
DB
73362015-05-12 Don Breazeal <donb@codesourcery.com>
7337
7338 * linux-low.c (handle_extended_wait): Implement return value,
7339 rename argument 'event_child' to 'event_lwp', handle
7340 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7341 (linux_low_ptrace_options): New function.
7342 (linux_low_filter_event): Call linux_low_ptrace_options,
7343 use different argument fo linux_enable_event_reporting,
7344 use return value from handle_extended_wait.
7345 (extended_event_reported): New function.
7346 (linux_wait_1): Call extended_event_reported and set
7347 status to report fork events.
7348 (linux_write_memory): Add pid to debug message.
7349 (reset_lwp_ptrace_options_callback): New function.
7350 (linux_handle_new_gdb_connection): New function.
7351 (linux_target_ops): Initialize new structure member.
7352 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7353 * lynx-low.c: Initialize new structure member.
7354 * remote-utils.c (prepare_resume_reply): Implement stop reason
7355 "fork" for "T" stop message.
7356 * server.c (handle_query): Call handle_new_gdb_connection.
7357 * server.h (report_fork_events): Declare global flag.
7358 * target.h (struct target_ops) <handle_new_gdb_connection>:
7359 New member.
7360 (target_handle_new_gdb_connection): New macro.
7361 * win32-low.c: Initialize new structure member.
7362
ddcbc397
DB
73632015-05-12 Don Breazeal <donb@codesourcery.com>
7364
7365 * mem-break.c (APPEND_TO_LIST): Define macro.
7366 (clone_agent_expr): New function.
7367 (clone_one_breakpoint): New function.
7368 (clone_all_breakpoints): New function.
7369 * mem-break.h: Declare new functions.
7370
89245bc0
DB
73712015-05-12 Don Breazeal <donb@codesourcery.com>
7372
7373 * linux-low.c (linux_supports_fork_events): New function.
7374 (linux_supports_vfork_events): New function.
7375 (linux_target_ops): Initialize new structure members.
7376 (initialize_low): Call linux_check_ptrace_features.
7377 * lynx-low.c (lynx_target_ops): Initialize new structure
7378 members.
7379 * server.c (report_fork_events, report_vfork_events):
7380 New global flags.
7381 (handle_query): Add new features to qSupported packet and
7382 response.
7383 (captured_main): Initialize new global variables.
7384 * target.h (struct target_ops) <supports_fork_events>:
7385 New member.
7386 <supports_vfork_events>: New member.
7387 (target_supports_fork_events): New macro.
7388 (target_supports_vfork_events): New macro.
7389 * win32-low.c (win32_target_ops): Initialize new structure
7390 members.
7391
835205d0
GB
73922015-05-12 Gary Benson <gbenson@redhat.com>
7393
7394 * server.c (handle_qxfer_exec_file): Use current process
7395 if annex is empty.
7396
21e94bd9
SL
73972015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7398
7399 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7400 Remove HAVE_PTRACE_GETREGS conditionals.
7401 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7402 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7403
45614f15
YQ
74042015-05-08 Yao Qi <yao.qi@linaro.org>
7405
7406 * linux-low.c (linux_supports_conditional_breakpoints): New
7407 function.
7408 (linux_target_ops): Install new target method.
7409 * lynx-low.c (lynx_target_ops): Install NULL hook for
7410 supports_conditional_breakpoints.
7411 * nto-low.c (nto_target_ops): Likewise.
7412 * spu-low.c (spu_target_ops): Likewise.
7413 * win32-low.c (win32_target_ops): Likewise.
7414 * server.c (handle_query): Check
7415 target_supports_conditional_breakpoints.
7416 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7417 New field.
7418 (target_supports_conditional_breakpoints): New macro.
7419
80ad801e
PA
74202015-05-06 Pedro Alves <palves@redhat.com>
7421
7422 PR server/18081
7423 * server.c (start_inferior): If the process exits, mourn it.
7424
819843c7
GB
74252015-04-21 Gary Benson <gbenson@redhat.com>
7426
7427 * hostio.c (fileio_open_flags_to_host): Factored out to
7428 fileio_to_host_openflags in common/fileio.c. Single use
7429 updated.
7430
a2d5a9d7
MF
74312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7432
7433 * linux-xtensa-low.c (xtensa_fill_gregset)
7434 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7435 XCHAL_HAVE_LOOP.
7436
deb44829
MF
74372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7438
7439 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7440 (regs_info): Replace usrregs pointer with NULL.
7441
e57f1de3
GB
74422015-04-17 Gary Benson <gbenson@redhat.com>
7443
7444 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7445 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7446 * server.c (handle_qxfer_exec_file): New function.
7447 (qxfer_packets): Add exec-file entry.
7448 (handle_query): Report qXfer:exec-file:read as supported packet.
7449
62828379
RN
74502015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7451
7452 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7453
b88bb450
GB
74542015-04-09 Gary Benson <gbenson@redhat.com>
7455
7456 * hostio-errno.c (errno_to_fileio_error): Remove function.
7457 Update caller to use remote_fileio_to_fio_error.
7458
c8f4bfdd
YQ
74592015-04-09 Yao Qi <yao.qi@linaro.org>
7460
7461 * linux-low.c (linux_insert_point): Call
7462 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7463 (linux_remove_point): Call remove_memory_breakpoint if type is
7464 raw_bkpt_type_sw.
7465 * linux-x86-low.c (x86_insert_point): Don't call
7466 insert_memory_breakpoint.
7467 (x86_remove_point): Don't call remove_memory_breakpoint.
7468
41f98f02
PA
74692015-04-01 Pedro Alves <palves@redhat.com>
7470 Cleber Rosa <crosa@redhat.com>
7471
7472 * server.c (gdbserver_usage): Reorganize and extend the usage
7473 message.
7474
2bf6fb9d
PA
74752015-03-24 Pedro Alves <palves@redhat.com>
7476
7477 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7478 output. Also dump TRAP_TRACE.
7479 (linux_low_filter_event): In debug output, distinguish a
7480 resume_stop SIGSTOP from a delayed SIGSTOP.
7481
369f6daa
GB
74822015-03-24 Gary Benson <gbenson@redhat.com>
7483
7484 * linux-x86-low.c (x86_linux_new_thread): Moved to
7485 nat/x86-linux.c.
7486 (x86_linux_prepare_to_resume): Likewise.
7487
8e5d4070
GB
74882015-03-24 Gary Benson <gbenson@redhat.com>
7489
7490 * Makefile.in (x86-linux-dregs.o): New rule.
7491 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7492 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7493 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7494 (x86_linux_dr_get): Likewise.
7495 (x86_linux_dr_set): Likewise.
7496 (update_debug_registers_callback): Likewise.
7497 (x86_linux_dr_set_addr): Likewise.
7498 (x86_linux_dr_get_addr): Likewise.
7499 (x86_linux_dr_set_control): Likewise.
7500 (x86_linux_dr_get_control): Likewise.
7501 (x86_linux_dr_get_status): Likewise.
7502 (x86_linux_update_debug_registers): Likewise.
7503
2b95d440
GB
75042015-03-24 Gary Benson <gbenson@redhat.com>
7505
7506 * linux-x86-low.c (x86_linux_update_debug_registers):
7507 New function, factored out from...
7508 (x86_linux_prepare_to_resume): ...this.
7509
14b0bc68
GB
75102015-03-24 Gary Benson <gbenson@redhat.com>
7511
7512 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7513 (x86_linux_dr_set): Likewise.
7514 (update_debug_registers_callback): Likewise.
7515 (x86_linux_dr_set_addr): Likewise.
7516 (x86_linux_dr_get_addr): Likewise.
7517 (x86_linux_dr_set_control): Likewise.
7518 (x86_linux_dr_get_control): Likewise.
7519 (x86_linux_dr_get_status): Likewise.
7520 (x86_linux_prepare_to_resume): Likewise.
7521
5dfe6ca8
GB
75222015-03-24 Gary Benson <gbenson@redhat.com>
7523
7524 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7525 Use perror_with_name. Pass string through gettext.
7526 (x86_linux_dr_set): Likewise.
7527
d33472ad
GB
75282015-03-24 Gary Benson <gbenson@redhat.com>
7529
7530 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7531 (x86_linux_dr_set_addr): ...this.
7532 (x86_dr_low_get_addr): Rename to...
7533 (x86_linux_dr_get_addr): ...this.
7534 (x86_dr_low_set_control): Rename to...
7535 (x86_linux_dr_set_control): ...this.
7536 (x86_dr_low_get_control): Rename to...
7537 (x86_linux_dr_get_control): ...this.
7538 (x86_dr_low_get_status): Rename to...
7539 (x86_linux_dr_get_status): ...this.
7540 (x86_dr_low): Update with new function names.
7541
4b134ca1
GB
75422015-03-24 Gary Benson <gbenson@redhat.com>
7543
7544 * Makefile.in (x86-linux.o): New rule.
7545 * configure.srv: Add x86-linux.o to relevant targets.
7546 * linux-low.c (lwp_set_arch_private_info): New function.
7547 (lwp_arch_private_info): Likewise.
7548 * linux-x86-low.c: Include nat/x86-linux.h.
7549 (arch_lwp_info): Removed structure.
7550 (update_debug_registers_callback):
7551 Use lwp_set_debug_registers_changed.
7552 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7553 and lwp_set_debug_registers_changed.
7554 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7555
34c703da
GB
75562015-03-24 Gary Benson <gbenson@redhat.com>
7557
7558 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7559 * linux-arm-low.c (arm_new_thread): Likewise.
7560 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7561 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7562 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7563 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7564
cff068da
GB
75652015-03-24 Gary Benson <gbenson@redhat.com>
7566
7567 * linux-low.c (ptid_of_lwp): New function.
7568 (lwp_is_stopped): Likewise.
7569 (lwp_stop_reason): Likewise.
7570 * linux-x86-low.c (update_debug_registers_callback):
7571 Use lwp_is_stopped.
7572 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7573 lwp_stop_reason.
7574
b2f7c7e8
GB
75752015-03-24 Gary Benson <gbenson@redhat.com>
7576
7577 * linux-low.h (linux_stop_lwp): Remove declaration.
7578
6d4ee8c6
GB
75792015-03-24 Gary Benson <gbenson@redhat.com>
7580
7581 * linux-low.h: Include nat/linux-nat.h.
7582 * linux-low.c (iterate_over_lwps_args): New structure.
7583 (iterate_over_lwps_filter): New function.
7584 (iterate_over_lwps): Likewise.
7585 * linux-x86-low.c (update_debug_registers_callback):
7586 Update signature to what iterate_over_lwps expects.
7587 Remove PID check that iterate_over_lwps now performs.
7588 (x86_dr_low_set_addr): Use iterate_over_lwps.
7589 (x86_dr_low_set_control): Likewise.
7590
70a0bb6b
GB
75912015-03-24 Gary Benson <gbenson@redhat.com>
7592
7593 * linux-x86-low.c (x86_debug_reg_state): New function.
7594 (x86_linux_prepare_to_resume): Use the above.
7595
7b669087
GB
75962015-03-24 Gary Benson <gbenson@redhat.com>
7597
7598 * linux-low.c (current_lwp_ptid): New function.
7599 * linux-x86-low.c: Include nat/linux-nat.h.
7600 (x86_dr_low_get_addr): Use current_lwp_ptid.
7601 (x86_dr_low_get_control): Likewise.
7602 (x86_dr_low_get_status): Likewise.
7603
eef49a3d
PA
76042015-03-20 Pedro Alves <palves@redhat.com>
7605
7606 * tracepoint.c (cmd_qtstatus): Make "str" const.
7607
b2333d22
PA
76082015-03-20 Pedro Alves <palves@redhat.com>
7609
7610 * server.c (handle_general_set): Make "req_str" const.
7611
23f238d3
PA
76122015-03-19 Pedro Alves <palves@redhat.com>
7613
7614 * linux-low.c (linux_resume_one_lwp): Rename to ...
7615 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7616 instead call perror_with_name.
7617 (check_ptrace_stopped_lwp_gone): New function.
7618 (linux_resume_one_lwp): Reimplement as wrapper around
7619 linux_resume_one_lwp_throw that swallows errors if the LWP is
7620 gone.
7621
91baf43f
PA
76222015-03-19 Pedro Alves <palves@redhat.com>
7623
7624 * linux-low.c (count_events_callback, select_event_lwp_callback):
7625 No longer check whether the thread has resume_stop as last resume
7626 kind.
7627
8bf3b159
PA
76282015-03-19 Pedro Alves <palves@redhat.com>
7629
7630 * linux-low.c (count_events_callback, select_event_lwp_callback):
7631 Use the lwp's status_pending_p field, not the thread's.
7632
b90fc188
PA
76332015-03-19 Pedro Alves <palves@redhat.com>
7634
7635 * linux-low.c (select_event_lwp_callback): Update comments to
7636 no longer mention SIGTRAP.
7637
464b0089
GB
76382015-03-18 Gary Benson <gbenson@redhat.com>
7639
7640 * server.c (handle_query): Do not report vFile:fstat as supported.
7641
aa9e327f
GB
76422015-03-11 Gary Benson <gbenson@redhat.com>
7643
7644 * hostio.c (sys/types.h): New include.
7645 (sys/stat.h): Likewise.
7646 (common-remote-fileio.h): Likewise.
7647 (handle_fstat): New function.
7648 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7649
791c0056
GB
76502015-03-11 Gary Benson <gbenson@redhat.com>
7651
7652 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7653 struct stat.st_blocks and struct stat.st_blksize.
7654 * configure: Regenerate.
7655 * config.in: Likewise.
7656 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7657 (OBS): Add common-remote-fileio.o.
7658 (common-remote-fileio.o): New rule.
7659
9a9df970
PA
76602015-03-09 Pedro Alves <palves@redhat.com>
7661
7662 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7663 'struct sockaddr' pointer in 'accept' call.
7664
9eb1356e
PA
76652015-03-09 Pedro Alves <palves@redhat.com>
7666
7667 Revert:
7668 2015-03-07 Pedro Alves <palves@redhat.com>
7669 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7670 or <winsock2.h> here. Instead include "gdb_socket.h".
7671 (remote_open): Use union gdb_sockaddr_u.
7672 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7673 or <winsock2.h> here. Instead include "gdb_socket.h".
7674 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7675 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7676 or <sys/un.h>.
7677 (init_named_socket, gdb_agent_helper_thread): Use union
7678 gdb_sockaddr_u.
7679
aac331e4
PA
76802015-03-07 Pedro Alves <palves@redhat.com>
7681
7682 * configure.ac (build_warnings): Move
7683 -Wdeclaration-after-statement to the C-specific set.
7684 * configure: Regenerate.
7685
366c75fc
PA
76862015-03-07 Pedro Alves <palves@redhat.com>
7687
7688 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7689 or <winsock2.h> here. Instead include "gdb_socket.h".
7690 (remote_open): Use union gdb_sockaddr_u.
7691 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7692 or <winsock2.h> here. Instead include "gdb_socket.h".
7693 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7694 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7695 or <sys/un.h>.
7696 (init_named_socket, gdb_agent_helper_thread): Use union
7697 gdb_sockaddr_u.
7698
492d29ea
PA
76992015-03-07 Pedro Alves <palves@redhat.com>
7700
7701 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7702 instead.
7703
60a191ed
YQ
77042015-03-06 Yao Qi <yao.qi@linaro.org>
7705
7706 * linux-aarch64-low.c (aarch64_insert_point): Use
7707 show_debug_regs as a boolean.
7708 (aarch64_remove_point): Likewise.
7709
f5771b1d
PA
77102015-03-05 Pedro Alves <palves@redhat.com>
7711
7712 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7713 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7714 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7715 * nto-low.c (nto_target_ops): Likewise.
7716 * spu-low.c (spu_target_ops): Likewise.
7717 * win32-low.c (win32_target_ops): Likewise.
7718
3e572f71
PA
77192015-03-04 Pedro Alves <palves@redhat.com>
7720
72f4393d 7721 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7722 Decide whether a breakpoint triggered based on the SIGTRAP's
7723 siginfo.si_code.
72f4393d
L
7724 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7725 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7726 (linux_low_filter_event): Check for breakpoints before checking
7727 watchpoints.
7728 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7729 siginfo.si_code.
72f4393d
L
7730 (linux_stopped_by_sw_breakpoint)
7731 (linux_supports_stopped_by_sw_breakpoint)
7732 (linux_stopped_by_hw_breakpoint)
7733 (linux_supports_stopped_by_hw_breakpoint): New functions.
7734 (linux_target_ops): Install new target methods.
3e572f71 7735
1ec68e26
PA
77362015-03-04 Pedro Alves <palves@redhat.com>
7737
7738 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7739 * server.c (swbreak_feature, hwbreak_feature): New globals.
7740 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7741 (captured_main): Clear swbreak_feature and hwbreak_feature.
7742 * server.h (swbreak_feature, hwbreak_feature): Declare.
7743 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7744 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7745 supports_stopped_by_hw_breakpoint>: New fields.
7746 (target_supports_stopped_by_sw_breakpoint)
7747 (target_stopped_by_sw_breakpoint)
7748 (target_supports_stopped_by_hw_breakpoint)
7749 (target_stopped_by_hw_breakpoint): Declare.
7750
15c66dd6
PA
77512015-03-04 Pedro Alves <palves@redhat.com>
7752
7753 enum lwp_stop_reason -> enum target_stop_reason
7754 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7755 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7756 (linux_wait_1, stuck_in_jump_pad_callback)
7757 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7758 (linux_stopped_by_watchpoint):
7759 * linux-low.h (enum lwp_stop_reason): Delete.
7760 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7761 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7762
98fc70d6
YQ
77632015-03-04 Yao Qi <yao.qi@linaro.org>
7764
7765 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7766
dd2ac174
GB
77672015-03-03 Gary Benson <gbenson@redhat.com>
7768
7769 * hostio.c (handle_vFile): Fix prefix lengths.
7770
d68e53f4
MM
77712015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7772
7773 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7774 ptr_bits.
7775
bf2d68ab
AA
77762015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7777
7778 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7779 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7780 (clean): Add "rm -f" for above C files.
7781 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7782 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7783 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7784 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7785 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7786 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7787 (init_registers_s390x_vx_linux64)
7788 (init_registers_s390x_tevx_linux64)
7789 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7790 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7791 declarations.
7792 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7793 (s390_store_vxrs_high): New functions.
7794 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7795 NT_S390_VXRS_HIGH.
7796 (s390_arch_setup): Add logic for selecting one of the new target
7797 descriptions. Activate the new vector regsets if applicable.
7798 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7799 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7800 and init_registers_s390x_tevx_linux64.
7801
c966a859
PA
78022015-03-01 Pedro Alves <palves@redhat.com>
7803
7804 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7805 parameter.
7806
4180215b
PA
78072015-02-27 Pedro Alves <palves@redhat.com>
7808
7809 * linux-x86-low.c (u_debugreg_offset): New function.
7810 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7811
749bab01
PA
78122015-02-27 Pedro Alves <palves@redhat.com>
7813
7814 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7815 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7816 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7817 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7818 (ps_lsetfpregs, ps_getpid)
7819 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7820 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7821 (ps_lsetxregs, ps_plog): Declare.
7822
3c14e5a3
PA
78232015-02-27 Pedro Alves <palves@redhat.com>
7824
7825 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7826 IP_AGENT_EXPORT_FUNC.
7827 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7828 IP_AGENT_EXPORT_FUNC.
7829 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7830 (IP_AGENT_EXPORT): Delete.
7831 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7832 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7833 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7834 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7835 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7836 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7837 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7838 (traceframe_read_count, traceframe_write_count)
7839 (traceframes_created, trace_state_variables, get_raw_reg)
7840 (get_trace_state_variable_value, set_trace_state_variable_value)
7841 (ust_loaded, helper_thread_id, cmd_buf): Use
7842 IPA_SYM_EXPORTED_NAME.
7843 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7844 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7845 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7846 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7847 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7848 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7849 EXTERN_C_PUSH/EXTERN_C_POP.
7850 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7851 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7852 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7853 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7854 (traceframe_write_count, traceframe_read_count)
7855 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7856 (about_to_request_buffer_space, get_trace_state_variable_value)
7857 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7858 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7859 EXTERN_C_PUSH/EXTERN_C_POP.
7860 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7861 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7862 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7863 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7864 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7865 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7866 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7867 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7868 Define.
7869 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7870 (IP_AGENT_EXPORT_VAR_DECL): Define.
7871 (tracing): Declare.
7872 (gdb_agent_get_raw_reg): Declare.
7873
fe978cb0
PA
78742015-02-27 Tom Tromey <tromey@redhat.com>
7875 Pedro Alves <palves@redhat.com>
7876
7877 Rename symbols whose names are reserved C++ keywords throughout.
7878
3bc3d82a
PA
78792015-02-27 Pedro Alves <palves@redhat.com>
7880
7881 * Makefile.in (COMPILER): New, get it from autoconf.
7882 (CXX): Get from autoconf instead.
7883 (COMPILE.pre): Use COMPILER.
7884 (CC-LD): Rename to ...
7885 (CC_LD): ... this. Use COMPILER.
7886 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7887 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7888 * acinclude.m4: Include build-with-cxx.m4.
7889 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7890 Disable -Werror by default if building in C++ mode.
7891 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7892 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7893 the C++ compiler. Save/restore CXXFLAGS too.
7894 * configure: Regenerate.
7895
07697489
PA
78962015-02-27 Pedro Alves <palves@redhat.com>
7897
7898 * acinclude.m4: Include libiberty.m4.
7899 * configure.ac: Call libiberty_INIT.
7900 * config.in, configure: Regenerate.
7901
9beb7c4e
PA
79022015-02-26 Pedro Alves <palves@redhat.com>
7903
7904 * linux-low.c (linux_wait_1): When incrementing the PC past a
7905 program breakpoint always use the_low_target.breakpoint_len as
7906 increment, rather than the maximum between that and
7907 the_low_target.decr_pc_after_break.
7908
8090aef2
PA
79092015-02-23 Pedro Alves <palves@redhat.com>
7910
7911 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7912 thread was doing a step-over; always adjust the PC if
7913 we stepped over a permanent breakpoint.
7914 (linux_wait_1): If we stepped over breakpoint that was on top of a
7915 permanent breakpoint, manually advance the PC past it.
7916
bc9540e8
PA
79172015-02-23 Pedro Alves <palves@redhat.com>
7918
7919 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7920 modes.
7921 (x86_fill_gregset, x86_store_gregset): Use it when handling
7922 $orig_eax.
7923
2db9a427
PA
79242015-02-20 Pedro Alves <palves@redhat.com>
7925
7926 * thread-db.c: Include "nat/linux-procfs.h".
7927 (thread_db_init): Skip listing new threads if the kernel supports
7928 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7929
afa8d396
PA
79302015-02-20 Pedro Alves <palves@redhat.com>
7931
7932 * linux-low.c (status_pending_p_callback): Use ptid_match.
7933
c9587f88
AT
79342015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7935
7936 PR breakpoints/16812
7937 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7938 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7939 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7940
b05ec7a5
AT
79412015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7942
7943 PR breakpoints/15956
7944 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7945
d33501a5
MM
79462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7947
7948 * linux-low.c (linux_low_btrace_conf): Print size.
7949 * server.c (handle_btrace_conf_general_set): New.
7950 (hanle_general_set): Call handle_btrace_conf_general_set.
7951 (handle_query): Report Qbtrace-conf:bts:size as supported.
7952
f4abbc16
MM
79532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7954
7955 * linux-low.c (linux_low_enable_btrace): Update parameters.
7956 (linux_low_btrace_conf): New.
7957 (linux_target_ops)<to_btrace_conf>: Initialize.
7958 * server.c (current_btrace_conf): New.
7959 (handle_btrace_enable): Rename to ...
7960 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7961 to target_enable_btrace. Update comment. Update users.
7962 (handle_qxfer_btrace_conf): New.
7963 (qxfer_packets): Add btrace-conf entry.
7964 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7965 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7966 (target_ops)<read_btrace_conf>: New.
7967 (target_enable_btrace): Update parameters.
7968 (target_read_btrace_conf): New.
7969
043c3577
MM
79702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7971
7972 * server.c (handle_btrace_general_set): Remove call to
7973 target_supports_btrace.
7974 (supported_btrace_packets): New.
7975 (handle_query): Call supported_btrace_packets.
7976 * target.h: include btrace-common.h.
7977 (btrace_target_info): Removed.
7978 (supports_btrace, target_supports_btrace): Update parameters.
7979
734b0e4b
MM
79802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7981
7982 * Makefile.in (SFILES): Add common/btrace-common.c.
7983 (OBS): Add common/btrace-common.o.
7984 (btrace-common.o): Add build rules.
7985 * linux-low: Include btrace-common.h.
7986 (linux_low_read_btrace): Use struct btrace_data. Call
7987 btrace_data_init and btrace_data_fini.
7988
d6c146e9
PA
79892015-02-06 Pedro Alves <palves@redhat.com>
7990
7991 * thread-db.c (find_new_threads_callback): Add debug output.
7992
20ba1ce6
PA
79932015-02-04 Pedro Alves <palves@redhat.com>
7994
7995 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7996 (resume_stopped_resumed_lwps): New function.
7997 (linux_wait_for_event_filtered): Use it.
7998
8cc73a39
SDJ
79992015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8000
8001 * Makefile.in (SFILES): Add linux-personality.c.
8002 (linux-personality.o): New rule.
8003 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8004 list of objects to be built.
8005 * linux-low.c: Include nat/linux-personality.h.
8006 (linux_create_inferior): Remove code to disable address space
8007 randomization (moved to ../nat/linux-personality.c). Create
8008 cleanup to disable address space randomization.
8009
fb23d554
SDJ
80102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8011
8012 * Makefile.in (posix-strerror.o): New rule.
8013 (mingw-strerror.o): Likewise.
8014 * configure: Regenerated.
8015 * configure.ac: Source file ../common/common.host. Initialize new
8016 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8017
cdf43629
YQ
80182015-01-14 Yao Qi <yao@codesourcery.com>
8019
8020 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8021 (ppc-linux.o): New rule.
8022 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8023 * configure.ac: AC_CHECK_FUNCS(getauxval).
8024 * config.in: Re-generated.
8025 * configure: Re-generated.
8026 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8027 ppc64_64bit_inferior_p
8028
514c5338
YQ
80292015-01-14 Yao Qi <yao@codesourcery.com>
8030
8031 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8032 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8033 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8034 (PT_ORIG_R3, PT_TRAP): Likewise.
8035 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8036 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8037 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8038
3368c1e5
JB
80392015-01-10 Joel Brobecker <brobecker@adacore.com>
8040
8041 * i387-fp.c (i387_cache_to_xsave): In look over
8042 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8043 zmmh_low_space field by use of zmmh_high_space.
8044
582511be
PA
80452015-01-09 Pedro Alves <palves@redhat.com>
8046
8047 * linux-low.c (step_over_bkpt): Move higher up in the file.
8048 (handle_extended_wait): Don't store the stop_pc here.
8049 (get_stop_pc): Adjust comments and rename to ...
8050 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8051 stopped for a software breakpoint or hardware breakpoint.
8052 (thread_still_has_status_pending_p): New function.
8053 (status_pending_p_callback): Use
8054 thread_still_has_status_pending_p. If the event is no longer
8055 interesting, resume the LWP.
8056 (handle_tracepoints): Add assert.
8057 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8058 (wstatus_maybe_breakpoint): New function.
8059 (cancel_breakpoint): Delete function.
8060 (check_stopped_by_watchpoint): New function, factored out from
8061 linux_low_filter_event.
8062 (lp_status_maybe_breakpoint): Delete function.
8063 (linux_low_filter_event): Remove filter_ptid argument.
8064 Leave thread group exits pending here. Store the LWP's stop PC.
8065 Always leave events pending.
8066 (linux_wait_for_event_filtered): Pull all events out of the
8067 kernel, and leave them all pending.
8068 (count_events_callback, select_event_lwp_callback): Consider all
8069 events.
8070 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8071 (select_event_lwp): Only give preference to the stepping LWP in
8072 all-stop mode. Adjust comments.
8073 (ignore_event): New function.
8074 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8075 references to cancel_breakpoints. Adjust to renames. Also give
8076 equal priority to all LWPs that have had events in non-stop mode.
8077 If reporting a software breakpoint event, unadjust the LWP's PC.
8078 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8079 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8080 Adjust.
8081 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8082 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8083 (linux_stopped_by_watchpoint): Adjust.
8084 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8085 * linux-low.h (enum lwp_stop_reason): New.
8086 (struct lwp_info) <stop_pc>: Adjust comment.
8087 <stopped_by_watchpoint>: Delete field.
8088 <stop_reason>: New field.
8089 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8090 * mem-break.c (software_breakpoint_inserted_here)
8091 (hardware_breakpoint_inserted_here): New function.
8092 * mem-break.h (software_breakpoint_inserted_here)
8093 (hardware_breakpoint_inserted_here): Declare.
8094 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8095 (cancel_breakpoints): Delete.
8096 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8097 (upload_fast_traceframes): Remove references to
8098 cancel_breakpoints.
8099
a33e3959
PA
81002015-01-09 Pedro Alves <palves@redhat.com>
8101
8102 * thread-db.c (find_new_threads_callback): Ignore thread if the
8103 kernel thread ID is -1.
8104
8784d563
PA
81052015-01-09 Pedro Alves <palves@redhat.com>
8106
8107 * linux-low.c (linux_attach_fail_reason_string): Move to
8108 nat/linux-ptrace.c, and rename.
8109 (linux_attach_lwp): Update comment.
8110 (attach_proc_task_lwp_callback): New function.
8111 (linux_attach): Adjust to rename and use
8112 linux_proc_attach_tgid_threads.
8113 (linux_attach_fail_reason_string): Delete declaration.
8114
76f2b779
JB
81152015-01-01 Joel Brobecker <brobecker@adacore.com>
8116
8117 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8118 * server.c (gdbserver_version): Likewise.
8119
fafcc06a
SDJ
81202014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8121
8122 * remote-utils.c: Include ctype.h.
8123 (input_interrupt): Explicitly handle the case when the char
8124 received is the NUL byte. Improve the printing of non-ASCII
8125 characters.
8126
beed38b8
JB
81272014-12-16 Joel Brobecker <brobecker@adacore.com>
8128
8129 * linux-low.c (linux_low_filter_event): Update call to
8130 linux_enable_event_reporting following the addition of
8131 a new parameter to that function.
8132
bf330350
CU
81332014-12-16 Catalin Udma <catalin.udma@freescale.com>
8134
8135 PR server/17457
8136 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8137 (AARCH64_FPCR_REGNO): Likewise.
8138 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8139 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8140 (aarch64_store_fpregset): Likewise.
8141
5227d625
JB
81422014-12-15 Joel Brobecker <brobecker@adacore.com>
8143
8144 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8145 Remove FIXME comment about assumption about N.
8146
f93b65a0
JB
81472014-12-13 Joel Brobecker <brobecker@adacore.com>
8148
8149 * configure.ac: If large-file support is disabled in GDBserver,
8150 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8151 * configure: Regenerate.
8152
e5a9158d
AA
81532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8154
8155 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8156 warning upon ENODATA from ptrace.
8157 * linux-s390-low.c (s390_store_tdb): New.
8158 (s390_regsets): Add regset for NT_S390_TDB.
8159
feea5f36
AA
81602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8161
8162 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8163 without a fill_function.
8164 * linux-s390-low.c (s390_fill_last_break): Remove.
8165 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8166 (s390_arch_setup): Use regset's size instead of fill_function for
8167 loop end condition.
8168
098dbe61
AA
81692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8170
8171 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8172 the regset's store function when ptrace returned an error.
8173 * regcache.c (get_thread_regcache): Invalidate register cache
8174 before fetching inferior's registers.
8175
28eef672
AA
81762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8177
8178 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8179 while-loop as for-loop.
8180 (regsets_store_inferior_registers): Likewise.
8181
bdca27a2
YQ
81822014-11-28 Yao Qi <yao@codesourcery.com>
8183
8184 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8185 * config.in, configure: Re-generate.
8186 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8187 is defined.
8188
9c232dda
YQ
81892014-11-21 Yao Qi <yao@codesourcery.com>
8190
8191 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8192 (AC_CHECK_HEADERS): Remove malloc.h.
8193 * configure: Re-generated.
8194 * config.in: Re-generated.
8195 * server.h: Don't include alloca.h and malloc.h.
8196 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8197 Don't include malloc.h.
8198
43968415
JB
81992014-11-17 Joel Brobecker <brobecker@adacore.com>
8200
8201 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8202 corresponding ERRNO check in same block.
8203
40e91bc7
PA
82042014-11-12 Pedro Alves <palves@redhat.com>
8205
8206 * server.c (cont_thread): Update comment.
8207 (start_inferior, attach_inferior): No longer clear cont_thread.
8208 (handle_v_cont): No longer set cont_thread.
8209 (captured_main): Clear cont_thread each time a GDB connects.
8210
c2c118cf
PA
82112014-11-12 Pedro Alves <palves@redhat.com>
8212
8213 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8214 thread, and don't resume all threads if the Hc thread has exited.
8215
78708b7c
PA
82162014-11-12 Pedro Alves <palves@redhat.com>
8217
8218 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8219 the process group instead of to a specific LWP.
8220
a2abc7de
PA
82212014-10-15 Pedro Alves <palves@redhat.com>
8222
8223 PR server/17487
8224 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8225 parameter.
8226 (arm_set_thread_context): Delete.
8227 (the_low_target): Adjust.
8228 * win32-i386-low.c (debug_registers_changed)
8229 (debug_registers_used): Delete.
8230 (update_debug_registers_callback): New function.
8231 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8232 needing to update their debug registers.
8233 (win32_get_current_dr): New function.
8234 (x86_dr_low_get_addr, x86_dr_low_get_control)
8235 (x86_dr_low_get_status): Fetch the debug register from the thread
8236 record's context.
8237 (i386_initial_stuff): Adjust.
8238 (i386_get_thread_context): Remove current_event parameter. Don't
8239 clear debug_registers_changed nor copy DR values to
8240 debug_reg_state.
8241 (i386_set_thread_context): Delete.
8242 (i386_prepare_to_resume): New function.
8243 (i386_thread_added): Mark the thread as needing to update irs
8244 debug registers.
8245 (the_low_target): Remove i386_set_thread_context and install
8246 i386_prepare_to_resume.
8247 * win32-low.c (win32_get_thread_context): Adjust.
8248 (win32_set_thread_context): Use SetThreadContext
8249 directly.
8250 (win32_prepare_to_resume): New function.
8251 (win32_require_context): New function, factored out from ...
8252 (thread_rec): ... this.
8253 (continue_one_thread): Call win32_prepare_to_resume on each thread
8254 we're about to continue.
8255 (win32_resume): Call win32_prepare_to_resume on the event thread.
8256 * win32-low.h (struct win32_thread_info)
8257 <debug_registers_changed>: New field.
8258 (struct win32_target_ops): Change prototype of set_thread_context,
8259 delete set_thread_context and add prepare_to_resume.
8260 (win32_require_context): New declaration.
8261
a442d071
GB
82622014-10-08 Gary Benson <gbenson@redhat.com>
8263
8264 * server.h: Do not include common-exceptions.h.
8265
6f1947e8
GB
82662014-10-08 Gary Benson <gbenson@redhat.com>
8267
8268 * server.h: Do not include cleanups.h.
8269
63b434a4
JH
82702014-09-30 James Hogan <james.hogan@imgtec.com>
8271
8272 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8273 mips64-dsp-linux.c.
8274
c4d9ceb6
YQ
82752014-09-23 Yao Qi <yao@codesourcery.com>
8276
8277 * linux-low.c (lp_status_maybe_breakpoint): New function.
8278 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8279 (count_events_callback): Likewise.
8280 (select_event_lwp_callback): Likewise.
8281 (cancel_breakpoints_callback): Likewise.
8282
89a5711c
DB
82832014-09-19 Don Breazeal <donb@codesourcery.com>
8284
8285 * linux-low.c (handle_extended_wait): Call
8286 linux_ptrace_get_extended_event.
8287 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8288 linux_is_extended_waitstatus.
8289
bffc0964
JB
82902014-09-16 Joel Brobecker <brobecker@adacore.com>
8291
8292 * Makefile.in (CPPFLAGS): Define.
8293 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8294 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8295
0bfdf32f
GB
82962014-09-16 Gary Benson <gbenson@redhat.com>
8297
8298 * inferiors.h (current_inferior): Renamed as...
8299 (current_thread): New variable. All uses updated.
8300 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8301 (maybe_move_out_of_jump_pad): Likewise.
8302 (cancel_breakpoint): Likewise.
8303 (linux_low_filter_event): Likewise.
8304 (wait_for_sigstop): Likewise.
8305 (linux_resume_one_lwp): Likewise.
8306 (need_step_over_p): Likewise.
8307 (start_step_over): Likewise.
8308 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8309 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8310 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8311 and save_inferior as saved_thread.
8312 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8313 saved_thread.
8314 (regcache_invalidate_thread): Likewise.
8315 * remote-utils.c (prepare_resume_reply): Likewise.
8316 * thread-db.c (thread_db_get_tls_address): Likewise.
8317 (disable_thread_event_reporting): Likewise.
8318 (remove_thread_event_breakpoints): Likewise.
8319 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8320 as saved_thread.
8321 * target.h (set_desired_inferior): Renamed as...
8322 (set_desired_thread): New declaration. All uses updated.
8323 * server.c (myresume): Updated comment to reference thread instead
8324 of inferior.
8325 (handle_serial_event): Likewise.
8326 (handle_target_event): Likewise.
8327
361c8ade
GB
83282014-09-12 Tom Tromey <tromey@redhat.com>
8329 Gary Benson <gbenson@redhat.com>
8330
8331 * regcache.h: Include common-regcache.h.
8332 (regcache_read_pc): Don't declare.
8333 * regcache.c (get_thread_regcache_for_ptid): New function.
8334
bd9269f7
GB
83352014-09-11 Tom Tromey <tromey@redhat.com>
8336 Gary Benson <gbenson@redhat.com>
8337
8338 * symbol.c: New file.
8339 * Makefile.in (SFILES): Add symbol.c.
8340 (OBS): Add symbol.o.
8341
f8c1d06b
GB
83422014-09-11 Gary Benson <gbenson@redhat.com>
8343
8344 * target.c (target_stop_ptid, target_continue_ptid): New
8345 functions.
8346
721ec300
GB
83472014-09-11 Tom Tromey <tromey@redhat.com>
8348 Gary Benson <gbenson@redhat.com>
8349
8350 * target.h: Include target/target.h.
8351 * target.c (target_read_memory, target_read_uint32)
8352 (target_write_memory): New functions.
8353
c5e92cca
GB
83542014-09-11 Gary Benson <gbenson@redhat.com>
8355
8356 * server.h (debug_hw_points): Don't declare.
8357 * server.c (debug_hw_points): Don't define. Replace all uses
8358 with show_debug_regs.
8359 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8360 all uses with show_debug_regs.
8361
2e4bb98a
EBM
83622014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8363
8364 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8365 endianness into account.
8366 (ppc_supply_ptrace_register): Likewise.
8367
ac740bc7
JH
83682014-09-03 James Hogan <james.hogan@imgtec.com>
8369
8370 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8371 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8372
97ea6506
GB
83732014-09-03 Gary Benson <gbenson@redhat.com>
8374
8375 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8376 ALL_DEBUG_ADDRESS_REGISTERS.
8377
df7e5265
GB
83782014-09-02 Gary Benson <gbenson@redhat.com>
8379
8380 * i386-low.h: Renamed as...
8381 * x86-low.h: New file. All type, function and variable name
8382 prefixes changed from "i386_" to "x86_". All references updated.
8383 * i386-low.c: Renamed as...
8384 * x86-low.c: New file. All type, function and variable name
8385 prefixes changed from "i386_" to "x86_". All references updated.
8386
ed859da7
GB
83872014-09-02 Gary Benson <gbenson@redhat.com>
8388
8389 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8390 (x86_linux_new_thread): Likewise.
8391
860789c7
GB
83922014-08-29 Gary Benson <gbenson@redhat.com>
8393
8394 * server.h (setjmp.h): Do not include.
8395 (toplevel): Do not declare.
8396 (common-exceptions.h): Include.
8397 (cleanups.h): Likewise.
8398 * server.c (toplevel): Do not define.
8399 (exit_code): New static global.
8400 (detach_or_kill_for_exit_cleanup): New function.
8401 (main): New function. Original main renamed to...
8402 (captured_main): New function.
8403 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8404
ff55e1b5
GB
84052014-08-29 Gary Benson <gbenson@redhat.com>
8406
8407 * Makefile.in (SFILES): Add common/common-exceptions.c.
8408 (OBS): Add common-exceptions.o.
8409 (common-exceptions.o): New rule.
8410 * utils.c (prepare_to_throw_exception): New function.
8411
e9bcb658
GB
84122014-08-29 Gary Benson <gbenson@redhat.com>
8413
8414 * config.in: Regenerate.
8415 * configure: Likewise.
8416
e3180625
GB
84172014-08-29 Gary Benson <gbenson@redhat.com>
8418
8419 * Makefile.in (SFILES): Add common/cleanups.c.
8420 (OBS): cleanups.o.
8421 (cleanups.o): New rule.
8422
e3d6ba5d
GB
84232014-08-29 Gary Benson <gbenson@redhat.com>
8424
8425 * utils.c (internal_vwarning): New function.
8426
7096e886
GB
84272014-08-28 Gary Benson <gbenson@redhat.com>
8428
8429 * utils.h (fatal): Remove declaration.
8430 * utils.c (fatal): Remove function.
8431
14ce3192
GB
84322014-08-28 Gary Benson <gbenson@redhat.com>
8433
8434 * tracepoint.c (gdb_agent_init): Replace fatal with
8435 perror_with_name.
8436 (initialize_tracepoint): Likewise.
8437
50278d59
GB
84382014-08-28 Gary Benson <gbenson@redhat.com>
8439
8440 * remote-utils.c (remote_prepare): Replace fatal with error.
8441
aa96c426
GB
84422014-08-28 Gary Benson <gbenson@redhat.com>
8443
8444 * linux-low.c (linux_async): Replace fatal with warning.
8445 Tidy up and return.
8446 (linux_start_non_stop): Return -1 if linux_async failed.
8447
f7160e97
GB
84482014-08-28 Gary Benson <gbenson@redhat.com>
8449
8450 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8451 gdb_assert.
8452 (i386_dr_low_get_addr): Remove vague comment.
8453 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8454 gdb_assert.
8455
38e08fca
GB
84562014-08-28 Gary Benson <gbenson@redhat.com>
8457
8458 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8459 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8460 internal_error.
8461 (linux_resume_one_lwp): Likewise.
8462 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8463 gdb_assert.
8464 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8465 with internal_error.
8466 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8467 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8468 (find_register_by_name): Replace fatal with internal_error.
8469 (find_regno): Likewise.
8470 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8471 * thread-db.c (thread_db_create_event): Likewise.
8472 (thread_db_load_search): Likewise.
8473 (try_thread_db_load_1): Likewise.
8474 * tracepoint.c (get_jump_space_head): Replace fatal with
8475 internal_error.
8476 (claim_trampoline_space): Likewise.
8477 (have_fast_tracepoint_trampoline_buffer): Likewise.
8478 (cmd_qtstart): Likewise.
8479 (stop_tracing): Likewise.
8480 (fast_tracepoint_collecting): Likewise.
8481 (target_malloc): Likewise.
8482 (download_tracepoint): Likewise.
8483 (download_trace_state_variables): Replace check with gdb_assert.
8484 (upload_fast_traceframes): Replace fatal with internal_error.
8485
34abf635
GB
84862014-08-19 Tom Tromey <tromey@redhat.com>
8487 Gary Benson <gbenson@redhat.com>
8488
8489 * Makefile.in (SFILES): Add common/common-debug.c.
8490 (OBS): Add common-debug.o.
8491 (common-debug.o): New rule.
8492 * debug.h (debug_printf): Don't declare.
8493 * debug.c (debug_printf): Renamed and rewritten as...
8494 (debug_vprintf): New function.
8495
f6e94d78
GB
84962014-08-19 Gary Benson <gbenson@redhat.com>
8497
8498 * utils.h: Do not include print-utils.h.
8499
9239eeab
GB
85002014-08-19 Tom Tromey <tromey@redhat.com>
8501 Gary Benson <gbenson@redhat.com>
8502
8503 * server.h: Add static assertion.
8504 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8505
ef87c8bb
GB
85062014-08-19 Tom Tromey <tromey@redhat.com>
8507 Gary Benson <gbenson@redhat.com>
8508
8509 * Makefile.in (SFILES): Add common/errors.c.
8510 (OBS): Add errors.o.
8511 (IPA_OBS): Add errors-ipa.o.
8512 (errors.o): New rule.
8513 (errors-ipa.o): Likewise.
8514 * utils.h (perror_with_name, error, warning): Don't declare.
8515 * utils.c (warning): Renamed and rewritten as...
8516 (vwarning): New function.
8517 (error): Renamed and rewritten as...
8518 (verror): New function.
8519 (internal_error): Renamed and rewritten as...
8520 (internal_verror): New function.
8521
bb974a24
GB
85222014-08-07 Gary Benson <gbenson@redhat.com>
8523
8524 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8525 * configure: Regenerate.
8526 * config.in: Likewise.
8527 * server.h: Do not include errno.h.
8528 * event-loop.c: Likewise.
8529 * hostio-errno.c: Likewise.
8530 * linux-low.c: Likewise.
8531 * remote-utils.c: Likewise.
8532 * spu-low.c: Likewise.
8533 * utils.c: Likewise.
8534 * gdbreplay.c: Unconditionally include errno.h.
8535
6d3d12eb
GB
85362014-08-07 Gary Benson <gbenson@redhat.com>
8537
8538 * server.h: Do not include string.h.
8539 * event-loop.c: Likewise.
8540 * linux-low.c: Likewise.
8541 * regcache.c: Likewise.
8542 * remote-utils.c: Likewise.
8543 * spu-low.c: Likewise.
8544 * utils.c: Likewise.
8545
dccbb609
GB
85462014-08-07 Gary Benson <gbenson@redhat.com>
8547
8548 * server.h: Do not include gdb_assert.h.
8549
e76df0d0
GB
85502014-08-07 Gary Benson <gbenson@redhat.com>
8551
8552 * server.h: Do not include common-utils.h.
8553
4cb9c816
GB
85542014-08-07 Gary Benson <gbenson@redhat.com>
8555
8556 * server.h: Do not include ptid.h.
8557 * notif.h: Likewise.
8558
3995eeee
GB
85592014-08-07 Gary Benson <gbenson@redhat.com>
8560
8561 * server.h: Do not include gdb_locale.h.
8562
cb9f1a9b
GB
85632014-08-07 Gary Benson <gbenson@redhat.com>
8564
8565 * server.h: Do not include gdb/signals.h.
8566 * win32-low.c: Likewise.
8567
a5fceff8
GB
85682014-08-07 Gary Benson <gbenson@redhat.com>
8569
8570 * server.h: Do not include pathmax.h.
8571
b9391142
GB
85722014-08-07 Gary Benson <gbenson@redhat.com>
8573
8574 * server.h: Do not include libiberty.h.
8575 * linux-bfin-low.c: Likewise.
8576
0e443c87
GB
85772014-08-07 Gary Benson <gbenson@redhat.com>
8578
8579 * server.h: Do not include ansidecl.h.
8580
8ebb3f56
GB
85812014-08-07 Gary Benson <gbenson@redhat.com>
8582
8583 * linux-x86-low.c: Do not include stddef.h.
8584 * lynx-ppc-low.c: Likewise.
8585 * tracepoint.c: Likewise.
8586
8980bdf6
GB
85872014-08-07 Gary Benson <gbenson@redhat.com>
8588
8589 * server.h: Do not include stdarg.h.
8590 * nto-low.c: Likewise.
8591
d7096f71
GB
85922014-08-07 Gary Benson <gbenson@redhat.com>
8593
8594 * server.h: Do not include stdlib.h.
8595 * inferiors.c: Likewise.
8596 * linux-low.c: Likewise.
8597 * regcache.c: Likewise.
8598 * spu-low.c: Likewise.
8599 * tracepoint.c: Likewise.
8600 * utils.c: Likewise.
8601
d02f550d
GB
86022014-08-07 Gary Benson <gbenson@redhat.com>
8603
8604 * server.h: Do not include stdio.h.
8605 * linux-low.c: Likewise.
8606 * remote-utils.c: Likewise.
8607 * spu-low.c: Likewise.
8608 * utils.c: Likewise.
8609 * wincecompat.c: Likewise.
8610
87f6c4e3
GB
86112014-08-06 Gary Benson <gbenson@redhat.com>
8612
8613 * regcache.c (init_register_cache): Move conditionals inside if.
8614
7089dca4
GB
86152014-08-06 Gary Benson <gbenson@redhat.com>
8616
8617 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8618
462f517e
GB
86192014-07-31 Gary Benson <gbenson@redhat.com>
8620
8621 * ax.h: Do not include server.h.
8622 * gdbthread.h: Likewise.
8623 * lynx-low.h: Likewise.
8624 * notif.h: Likewise.
8625
976411d6
GB
86262014-07-30 Gary Benson <gbenson@redhat.com>
8627
8628 * server.h: Include common-defs.h.
8629 Do not include config.h or build-gnulib-gdbserver/config.h.
8630
d41f6d8e
GB
86312014-07-30 Gary Benson <gbenson@redhat.com>
8632
8633 * hostio-errno.c: Move server.h to top of includes list.
8634 * inferiors.c: Likewise.
8635 * linux-x86-low.c: Likewise.
8636 * notif.c: Include server.h.
8637
314c6a35
TT
86382014-07-24 Tom Tromey <tromey@redhat.com>
8639 Gary Benson <gbenson@redhat.com>
8640
8641 * server.h (CORE_ADDR): Now unsigned.
8642
69ff6be5
PA
86432014-07-16 Pedro Alves <palves@redhat.com>
8644
8645 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8646
ce9e3fe7
PA
86472014-07-15 Pedro Alves <palves@redhat.com>
8648
8649 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8650 copy.
8651
e76126e8
PA
86522014-07-11 Pedro Alves <palves@redhat.com>
8653
8654 * linux-low.c (kill_wait_lwp): New function, based on
8655 kill_one_lwp_callback, but use my_waitpid directly.
8656 (kill_one_lwp_callback, linux_kill): Use it.
8657
8e9db26e
PA
86582014-06-23 Pedro Alves <palves@redhat.com>
8659
8660 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8661 before setting DR0..DR3.
8662
698b3e08
GB
86632014-06-20 Gary Benson <gbenson@redhat.com>
8664
8665 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8666 * configure: Regenerated.
8667 * config.in: Likewise.
8668
125f8a3d
GB
86692014-06-20 Gary Benson <gbenson@redhat.com>
8670
8671 * Makefile.in (SFILES): Update locations for files moved
8672 from common to nat.
8673 (object file files): Reordered.
8674
42995dbd
GB
86752014-06-20 Gary Benson <gbenson@redhat.com>
8676
8677 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8678 (i386_dr_low_set_addr): Likewise.
8679 (i386_dr_low_get_addr): Likewise.
8680 (i386_dr_low_can_set_control): Likewise.
8681 (i386_dr_low_set_control): Likewise.
8682 (i386_dr_low_get_control): Likewise.
8683 (i386_dr_low_get_status): Likewise.
8684 (i386_get_debug_register_length): Likewise.
8685 * linux-x86-low.c (i386_dr_low_set_addr):
8686 Changed signature. Made static.
8687 (i386_dr_low_get_addr): Likewise.
8688 (i386_dr_low_set_control): Likewise.
8689 (i386_dr_low_get_control): Likewise.
8690 (i386_dr_low_get_status): Likewise.
8691 (i386_dr_low): New global variable.
8692 * win32-i386-low.c (i386_dr_low_set_addr):
8693 Changed signature. Made static.
8694 (i386_dr_low_get_addr): Likewise.
8695 (i386_dr_low_set_control): Likewise.
8696 (i386_dr_low_get_control): Likewise.
8697 (i386_dr_low_get_status): Likewise.
8698 (i386_dr_low): New global variable.
8699
e1d2394b
MS
87002014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8701
8702 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8703 * Makefile.in (AR, AR_FLAGS): Define.
8704 * configure: Regenerate.
8705
3a8ee006
GB
87062014-06-19 Gary Benson <gbenson@redhat.com>
8707
8708 * Makefile.in (i386-dregs.o): New rule.
8709 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8710 * i386-low.c (target.h): Remove include.
8711 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8712 (DR_CONTROL_SHIFT): Likewise.
8713 (DR_CONTROL_SIZE): Likewise.
8714 (DR_RW_EXECUTE): Likewise.
8715 (DR_RW_WRITE): Likewise.
8716 (DR_RW_READ): Likewise.
8717 (DR_RW_IORW): Likewise.
8718 (DR_LEN_1): Likewise.
8719 (DR_LEN_2): Likewise.
8720 (DR_LEN_4): Likewise.
8721 (DR_LEN_8): Likewise.
8722 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8723 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8724 (DR_ENABLE_SIZE): Likewise.
8725 (DR_LOCAL_SLOWDOWN): Likewise.
8726 (DR_GLOBAL_SLOWDOWN): Likewise.
8727 (DR_CONTROL_RESERVED): Likewise.
8728 (I386_DR_CONTROL_MASK): Likewise.
8729 (I386_DR_VACANT): Likewise.
8730 (I386_DR_LOCAL_ENABLE): Likewise.
8731 (I386_DR_GLOBAL_ENABLE): Likewise.
8732 (I386_DR_DISABLE): Likewise.
8733 (I386_DR_SET_RW_LEN): Likewise.
8734 (I386_DR_GET_RW_LEN): Likewise.
8735 (I386_DR_WATCH_HIT): Likewise.
8736 (i386_wp_op_t): Likewise.
8737 (i386_show_dr): Likewise.
8738 (i386_length_and_rw_bits): Likewise.
8739 (i386_insert_aligned_watchpoint): Likewise.
8740 (i386_remove_aligned_watchpoint): Likewise.
8741 (i386_handle_nonaligned_watchpoint): Likewise.
8742 i386_update_inferior_debug_regs(): Likewise.
8743 (i386_dr_insert_watchpoint): Likewise.
8744 (i386_dr_remove_watchpoint): Likewise.
8745 (i386_dr_region_ok_for_watchpoint): Likewise.
8746 (i386_dr_stopped_data_address): Likewise.
8747 (i386_dr_stopped_by_watchpoint): Likewise.
8748
8f26655c
GB
87492014-06-19 Gary Benson <gbenson@redhat.com>
8750
8751 * i386-low.c (i386_dr_show): Renamed to
8752 i386_show_dr and made static. All uses updated.
8753 (i386_dr_length_and_rw_bits): Renamed to
8754 i386_length_and_rw_bits and made static.
8755 All uses updated.
8756 (i386_dr_insert_aligned_watchpoint): Renamed to
8757 i386_insert_aligned_watchpoint and made static.
8758 All uses updated.
8759 (i386_dr_remove_aligned_watchpoint): Renamed to
8760 i386_remove_aligned_watchpoint and made static.
8761 All uses updated.
8762 (i386_dr_update_inferior_debug_regs): Renamed to
8763 i386_update_inferior_debug_regs and made static.
8764 All uses updated.
8765
b9228891
GB
87662014-06-18 Gary Benson <gbenson@redhat.com>
8767
5171def3
GB
8768 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8769 (i386_dr_low_can_set_control): Likewise.
8770 (i386_get_debug_register_length): Likewise.
8771 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8772 (i386_dr_low_can_set_control): Likewise.
8773 (i386_get_debug_register_length): Likewise.
8774
87752014-06-17 Gary Benson <gbenson@redhat.com>
8776
b9228891
GB
8777 * i386-low.h (i386-dregs.h): New include.
8778 (DR_FIRSTADDR): Now in i386-dregs.h.
8779 (DR_LASTADDR): Likewise.
8780 (DR_NADDR): Likewise.
8781 (DR_STATUS): Likewise.
8782 (DR_CONTROL): Likewise.
8783 (i386_debug_reg_state): Likewise.
8784 (i386_dr_insert_watchpoint): Likewise.
8785 (i386_dr_remove_watchpoint): Likewise.
8786 (i386_dr_region_ok_for_watchpoint): Likewise.
8787 (i386_dr_stopped_data_address): Likewise.
8788 (i386_dr_stopped_by_watchpoint): Likewise.
8789 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8790
4be83cc2
GB
87912014-06-18 Gary Benson <gbenson@redhat.com>
8792
8793 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8794 i386_dr_insert_watchpoint.
8795 (i386_low_remove_watchpoint): Renamed to
8796 i386_dr_remove_watchpoint.
8797 (i386_low_region_ok_for_watchpoint): Renamed to
8798 i386_dr_region_ok_for_watchpoint.
8799 (i386_low_stopped_data_address): Renamed to
8800 i386_dr_stopped_data_address.
8801 (i386_low_stopped_by_watchpoint): Renamed to
8802 i386_dr_stopped_by_watchpoint.
8803 * i386-low.c (i386_show_dr): Renamed to
8804 i386_dr_show and made nonstatic. All uses updated.
8805 (i386_length_and_rw_bits): Renamed to
8806 i386_dr_length_and_rw_bits and made nonstatic.
8807 All uses updated.
8808 (i386_insert_aligned_watchpoint): Renamed to
8809 i386_dr_insert_aligned_watchpoint and made nonstatic.
8810 All uses updated.
8811 (i386_remove_aligned_watchpoint): Renamed to
8812 i386_dr_remove_aligned_watchpoint and made nonstatic.
8813 All uses updated.
8814 (i386_update_inferior_debug_regs): Renamed to
8815 i386_dr_update_inferior_debug_regs and made nonstatic.
8816 All uses updated.
8817 (i386_low_insert_watchpoint): Renamed to
8818 i386_dr_insert_watchpoint. All uses updated.
8819 (i386_low_remove_watchpoint): Renamed to
8820 i386_dr_remove_watchpoint. All uses updated.
8821 (i386_low_region_ok_for_watchpoint): Renamed to
8822 i386_dr_region_ok_for_watchpoint. All uses updated.
8823 (i386_low_stopped_data_address): Renamed to
8824 i386_dr_stopped_data_address. All uses updated.
8825 (i386_low_stopped_by_watchpoint): Renamed to
8826 i386_dr_stopped_by_watchpoint. All uses updated.
8827
131aa0d4
GB
88282014-06-18 Gary Benson <gbenson@redhat.com>
8829
8830 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8831 (i386_dr_low_can_set_control): Likewise.
8832 (i386_insert_aligned_watchpoint): New check.
8833
d9305f7f
GB
88342014-06-18 Gary Benson <gbenson@redhat.com>
8835
8836 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8837 Renamed to state.
8838
e927c9fc
GB
88392014-06-18 Gary Benson <gbenson@redhat.com>
8840
8841 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8842 instead of fatal and error.
8843 (i386_handle_nonaligned_watchpoint): Likewise.
8844
1b6d4134
GB
88452014-06-18 Gary Benson <gbenson@redhat.com>
8846
8847 * i386-low.c (i386_get_debug_register_length): New macro.
8848 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8849 (i386_show_dr): Use debug_printf instead of fprintf. Use
8850 phex to format values.
8851
6e62758f
GB
88522014-06-18 Gary Benson <gbenson@redhat.com>
8853
8854 * i386-low.h: Comment changes.
8855 * i386-low.c: Likewise.
8856
fc6e2f03
GB
88572014-06-18 Gary Benson <gbenson@redhat.com>
8858
8859 * i386-low.c: Whitespace changes.
8860
f9d1eeed
TT
88612014-06-12 Tom Tromey <tromey@redhat.com>
8862
8863 * utils.c (freeargv): Remove.
8864
0b04e523
TT
88652014-06-12 Tom Tromey <tromey@redhat.com>
8866
8867 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8868 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8869 (parse_debug_format_options): Likewise.
8870 (gdbserver_usage): Likewise.
8871 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8872 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8873 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8874 against libiberty.
8875 ($(LIBGNU)): Depend on libiberty.
8876 (all-lib): Recurse into all subdirs.
8877 (install-only): Invoke "install" target in subdirs.
8878 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8879 targets.
8880 * configure: Rebuild.
8881 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8882 for vasprintf, vsnprintf, or gettimeofday.
8883 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8884 srv_tgtobj.
8885
270c9937
JB
88862014-06-05 Joel Brobecker <brobecker@adacore.com>
8887
8888 * development.sh: Delete.
8889 * Makefile.in (config.status): Adjust dependency on development.sh.
8890 * configure.ac: Adjust development.sh source call.
8891 * configure: Regenerate.
8892
0a261ed8
PA
88932014-06-02 Pedro Alves <palves@redhat.com>
8894
8895 * ax.c (gdb_free_agent_expr): New function.
8896 * ax.h (gdb_free_agent_expr): New declaration.
8897 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8898 list.
8899 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8900 static.
8901 (clear_breakpoint_conditions_and_commands): New function.
8902 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8903 (clear_breakpoint_conditions_and_commands): New declaration.
8904
e9dae05e
RR
89052014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8906
8907 * linux-aarch64-low.c (asm/ptrace.h): Include.
8908
5876f503
JK
89092014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8910
8911 Fix TLS access for -static -pthread.
8912 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8913 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8914 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8915
802e8e6d
PA
89162014-05-20 Pedro Alves <palves@redhat.com>
8917
8918 * linux-aarch64-low.c (aarch64_insert_point)
8919 (aarch64_remove_point): No longer check whether the type is
8920 supported here. Adjust to new interface.
8921 (the_low_target): Install aarch64_supports_z_point_type as
8922 supports_z_point_type method.
8923 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8924 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8925 instead of a Z packet char. Adjust.
8926 (arm_supports_z_point_type): New function.
8927 (arm_insert_point, arm_remove_point): Adjust to new interface.
8928 (the_low_target): Install arm_supports_z_point_type.
8929 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8930 (cris_insert_point, cris_remove_point): Adjust to new interface.
8931 Don't check whether the type is supported here.
8932 (the_low_target): Install cris_supports_z_point_type.
8933 * linux-low.c (linux_supports_z_point_type): New function.
8934 (linux_insert_point, linux_remove_point): Adjust to new interface.
8935 * linux-low.h (struct linux_target_ops) <insert_point,
8936 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8937 raw_breakpoint pointer parameter.
8938 <supports_z_point_type>: New method.
8939 * linux-mips-low.c (mips_supports_z_point_type): New function.
8940 (mips_insert_point, mips_remove_point): Adjust to new interface.
8941 Use mips_supports_z_point_type.
8942 (the_low_target): Install mips_supports_z_point_type.
8943 * linux-ppc-low.c (the_low_target): Install NULL as
8944 supports_z_point_type method.
8945 * linux-s390-low.c (the_low_target): Install NULL as
8946 supports_z_point_type method.
8947 * linux-sparc-low.c (the_low_target): Install NULL as
8948 supports_z_point_type method.
8949 * linux-x86-low.c (x86_supports_z_point_type): New function.
8950 (x86_insert_point): Adjust to new insert_point interface. Use
8951 insert_memory_breakpoint. Adjust to new
8952 i386_low_insert_watchpoint interface.
8953 (x86_remove_point): Adjust to remove_point interface. Use
8954 remove_memory_breakpoint. Adjust to new
8955 i386_low_remove_watchpoint interface.
8956 (the_low_target): Install x86_supports_z_point_type.
8957 * lynx-low.c (lynx_target_ops): Install NULL as
8958 supports_z_point_type callback.
8959 * nto-low.c (nto_supports_z_point_type): New.
8960 (nto_insert_point, nto_remove_point): Adjust to new interface.
8961 (nto_target_ops): Install nto_supports_z_point_type.
8962 * mem-break.c: Adjust intro comment.
8963 (struct raw_breakpoint) <raw_type, size>: New fields.
8964 <inserted>: Update comment.
8965 <shlib_disabled>: Delete field.
8966 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8967 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8968 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8969 (raw_bkpt_type_to_target_hw_bp_type): New function.
8970 (find_enabled_raw_code_breakpoint_at): New function.
8971 (find_raw_breakpoint_at): New type and size parameters. Use them.
8972 (insert_memory_breakpoint): New function, based off
8973 set_raw_breakpoint_at.
8974 (remove_memory_breakpoint): New function.
8975 (set_raw_breakpoint_at): Reimplement.
8976 (set_breakpoint): New, based on set_breakpoint_at.
8977 (set_breakpoint_at): Reimplement.
8978 (delete_raw_breakpoint): Go through the_target->remove_point
8979 instead of assuming memory breakpoints.
8980 (find_gdb_breakpoint_at): Delete.
8981 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8982 (find_gdb_breakpoint): New function.
8983 (set_gdb_breakpoint_at): Delete.
8984 (z_type_supported): New function.
8985 (set_gdb_breakpoint_1): New function, loosely based off
8986 set_gdb_breakpoint_at.
8987 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8988 (delete_gdb_breakpoint_at): Delete.
8989 (delete_gdb_breakpoint_1): New function, loosely based off
8990 delete_gdb_breakpoint_at.
8991 (delete_gdb_breakpoint): New function.
8992 (clear_gdb_breakpoint_conditions): Rename to ...
8993 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8994 breakpoint.
8995 (add_condition_to_breakpoint): Make static.
8996 (add_breakpoint_condition): Take a struct breakpoint pointer
8997 instead of an address. Adjust.
8998 (gdb_condition_true_at_breakpoint): Rename to ...
8999 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9000 z_type parameter.
9001 (gdb_condition_true_at_breakpoint): Reimplement.
9002 (add_breakpoint_commands): Take a struct breakpoint pointer
9003 instead of an address. Adjust.
9004 (gdb_no_commands_at_breakpoint): Rename to ...
9005 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9006 parameter. Return true if no breakpoint was found. Change debug
9007 output.
9008 (gdb_no_commands_at_breakpoint): Reimplement.
9009 (run_breakpoint_commands): Rename to ...
9010 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9011 and change return type to boolean.
9012 (run_breakpoint_commands): New function.
9013 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9014 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9015 breakpoint. Go through the_target->remove_point instead of
9016 assuming memory breakpoint.
9017 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9018 software and hardware breakpoints.
9019 (reinsert_raw_breakpoint): Go through the_target->insert_point
9020 instead of assuming memory breakpoint.
9021 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9022 software and hardware breakpoints.
9023 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9024 Check both software and hardware breakpoints.
9025 (validate_inserted_breakpoint): Assert the breakpoint is a
9026 software breakpoint. Set the inserted flag to -1 instead of
9027 setting shlib_disabled.
9028 (delete_disabled_breakpoints): Adjust.
9029 (validate_breakpoints): Only validate software breakpoints.
9030 Adjust to inserted flag change.
9031 (check_mem_read, check_mem_write): Skip breakpoint types other
9032 than software breakpoints. Adjust to inserted flag change.
9033 * mem-break.h (enum raw_bkpt_type): New enum.
9034 (raw_breakpoint, struct process_info): Forward declare.
9035 (Z_packet_to_target_hw_bp_type): Delete declaration.
9036 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9037 (set_gdb_breakpoint, delete_gdb_breakpoint)
9038 (clear_breakpoint_conditions): New declarations.
9039 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9040 (breakpoint_inserted_here): Update comment.
9041 (add_breakpoint_condition, add_breakpoint_commands): Replace
9042 address parameter with a breakpoint pointer parameter.
9043 (gdb_breakpoint_here): Update comment.
9044 (delete_gdb_breakpoint_at): Delete.
9045 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9046 * server.c (process_point_options): Take a struct breakpoint
9047 pointer instead of an address. Adjust.
9048 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9049 delete_gdb_breakpoint.
9050 * spu-low.c (spu_target_ops): Install NULL as
9051 supports_z_point_type method.
9052 * target.h: Include mem-break.h.
9053 (struct target_ops) <prepare_to_access_memory>: Update comment.
9054 <supports_z_point_type>: New field.
9055 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9056 instead of a char. Also take a raw breakpoint pointer.
9057 * win32-arm-low.c (the_low_target): Install NULL as
9058 supports_z_point_type.
9059 * win32-i386-low.c (i386_supports_z_point_type): New function.
9060 (i386_insert_point, i386_remove_point): Adjust to new interface.
9061 (the_low_target): Install i386_supports_z_point_type.
9062 * win32-low.c (win32_supports_z_point_type): New function.
9063 (win32_insert_point, win32_remove_point): Adjust to new interface.
9064 (win32_target_ops): Install win32_supports_z_point_type.
9065 * win32-low.h (struct win32_target_ops):
9066 <supports_z_point_type>: New method.
9067 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9068 instead of a char. Also take a raw breakpoint pointer.
9069
932539e3
PA
90702014-05-20 Pedro Alves <palves@redhat.com>
9071
9072 * mem-break.h: Include break-common.h.
9073 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9074 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9075 (Z_packet_to_target_hw_bp_type): New declaration.
9076 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9077 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9078 (Z_PACKET_ACCESS_WP): Delete macros.
9079 (Z_packet_to_hw_type): Delete function.
9080 * i386-low.h: Don't include break-common.h here.
9081 (Z_packet_to_hw_type): Delete declaration.
9082 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9083 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9084 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9085 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9086 * linux-aarch64-low.c: Don't include break-common.h here.
9087 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9088 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9089 (Z_packet_to_target_hw_bp_type): Delete function.
9090 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9091 function.
9092 (mips_insert_point, mips_remove_point): Use
9093 Z_packet_to_target_hw_bp_type.
9094
4ff0d3d8
PA
90952014-05-20 Pedro Alves <palves@redhat.com>
9096
9097 * linux-aarch64-low.c: Include break-common.h.
9098 (enum target_point_type): Delete.
9099 (Z_packet_to_point_type): Rename to ...
9100 (Z_packet_to_target_hw_bp_type): ... this, and return a
9101 target_hw_bp_type instead.
9102 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9103 instead of an enum target_point_type.
9104 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9105 breakpoint type.
9106 (aarch64_dr_state_insert_one_point)
9107 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9108 (aarch64_handle_aligned_watchpoint)
9109 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9110 Take an enum target_hw_bp_type instead of an enum
9111 target_point_type.
9112 (aarch64_supports_z_point_type): New function.
9113 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9114 use Z_packet_to_target_hw_bp_type.
9115
786dc519
JB
91162014-05-20 Joel Brobecker <brobecker@adacore.com>
9117
9118 * configure.ac: Only use -Werror by default when DEVELOPMENT
9119 is true.
9120 * configure: Regenerate.
9121
9e0aa64f
JK
91222014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9123
9124 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9125 * linux-x86-low.c (X86_64_USER_REGS): New.
9126 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9127
2b577b92
YQ
91282014-04-28 Yao Qi <yao@codesourcery.com>
9129
9130 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9131 name.
9132
94611da2
PA
91332014-04-25 Pedro Alves <palves@redhat.com>
9134
9135 PR server/16255
9136 * linux-low.c (linux_attach_fail_reason_string): New function.
9137 (linux_attach_lwp): Delete.
9138 (linux_attach_lwp_1): Rename to ...
9139 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9140 argument. Remove "initial" parameter. Return int instead of
9141 void. Don't error or warn here.
9142 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9143 failure to attach to the tgid. Call warning when failing to
9144 attach to an lwp.
9145 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9146 argument. Remove "initial" parameter. Return int instead of
9147 void. Don't error or warn here.
9148 (linux_attach_fail_reason_string): New declaration.
9149 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9150 interface change. Use linux_attach_fail_reason_string.
9151
01f9f808
MS
91522014-04-24 Michael Sturm <michael.sturm@mintel.com>
9153 Walfred Tedeschi <walfred.tedeschi@intel.com>
9154
9155 * Makefile.in: Added rules to handle new files
9156 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9157 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9158 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9159 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9160 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9161 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9162 x32-avx512-linux.o.
9163 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9164 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9165 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9166 i386/x32-avx512.xml.
9167 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9168 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9169 i386/x32-avx512-linux.xml.
9170 * i387-fp.c (num_avx512_k_registers): New constant for number
9171 of K registers.
9172 (num_avx512_zmmh_low_registers): New constant for number of
9173 lower ZMM registers (0-15).
9174 (num_avx512_zmmh_high_registers): New constant for number of
9175 higher ZMM registers (16-31).
9176 (num_avx512_ymmh_registers): New contant for number of higher
9177 YMM registers (ymm16-31 added by avx521 on x86_64).
9178 (num_avx512_xmm_registers): New constant for number of higher
9179 XMM registers (xmm16-31 added by AVX512 on x86_64).
9180 (struct i387_xsave): Add space for AVX512 registers.
9181 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9182 Add code to handle AVX512 registers.
9183 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9184 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9185 prototypei from generated file.
9186 (tdesc_amd64_avx512_linux): Likewise.
9187 (init_registers_x32_avx512_linux): Likewise.
9188 (tdesc_x32_avx512_linux): Likewise.
9189 (init_registers_i386_avx512_linux): Likewise.
9190 (tdesc_i386_avx512_linux): Likewise.
9191 (x86_64_regmap): Add AVX512 registers.
9192 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9193 mask.
9194 (initialize_low_arch): Add code to initialize AVX512 registers.
9195
51aa91f9
PA
91962014-04-23 Pedro Alves <palves@redhat.com>
9197
9198 * mem-break.c (find_gdb_breakpoint_at): Make static.
9199 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9200
a4165e94
PA
92012014-04-23 Pedro Alves <palves@redhat.com>
9202
9203 * i386-low.c: Don't include break-common.h here.
9204 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9205 prototype to take target_hw_bp_type as argument instead of a Z
9206 packet char.
9207 * i386-low.h: Include break-common.h here.
9208 (Z_packet_to_hw_type): Declare.
9209 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9210 prototypes.
9211 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9212 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9213 (x86_remove_point): Convert the packet number to a
9214 target_hw_bp_type before calling i386_low_remove_watchpoint.
9215 * win32-i386-low.c (i386_insert_point): Convert the packet number
9216 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9217 (i386_remove_point): Convert the packet number to a
9218 target_hw_bp_type before calling i386_low_remove_watchpoint.
9219
b8acf843
PA
92202014-04-23 Pedro Alves <palves@redhat.com>
9221
9222 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9223
d708bcd1
PA
92242014-04-10 Pedro Alves <palves@redhat.com>
9225
9226 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9227 Check if the condition or command is NULL before checking if the
9228 breakpoint is known. On success, return true.
9229 * mem-break.h (add_breakpoint_condition): Document return.
9230 (add_breakpoint_commands): Add describing comment.
9231 * server.c (skip_to_semicolon): New function.
9232 (process_point_options): Use it.
9233
2eec7d5b
PA
92342014-04-09 Pedro Alves <palves@redhat.com>
9235
9236 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9237 to lwpid_of.
9238
fa96cb38
PA
92392014-02-27 Pedro Alves <palves@redhat.com>
9240
9241 PR 12702
9242 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9243 macros.
9244 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9245 output.
9246 (last_thread_of_process_p): Take a PID argument instead of a
9247 thread pointer.
9248 (linux_wait_for_lwp): Delete.
9249 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9250 functions.
9251 (linux_low_filter_event): New function, party factored out from
9252 linux_wait_for_event.
9253 (linux_wait_for_event): Rename to ...
9254 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9255 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9256 sigsuspend. Check for zombie leaders.
9257 (linux_wait_for_event): Reimplement as wrapper around
9258 linux_wait_for_event_filtered.
9259 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9260 a normal or signal exit is seen, it's the whole process exiting.
9261 (wait_for_sigstop): No longer a for_each_inferior callback.
9262 Rewrite on top of linux_wait_for_event_filtered.
9263 (stop_all_lwps): Call wait_for_sigstop directly.
9264 * server.c (resume, handle_target_event): Handle
9265 TARGET_WAITKIND_NO_RESUMED.
9266
d763de10
JB
92672014-02-26 Joel Brobecker <brobecker@adacore.com>
9268
9269 * win32-low.c (psapi_get_dll_name,
9270 * win32_CreateToolhelp32Snapshot): Delete.
9271 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9272 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9273 Delete.
9274 (handle_load_dll): Add function description.
9275 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9276
850a0f76
JB
92772014-02-26 Joel Brobecker <brobecker@adacore.com>
9278
9279 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9280 Add comment.
9281 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9282 base address when calling win32_add_one_solib.
9283 (handle_load_dll): Delete local variable load_addr.
9284 Remove 0x1000 offset applied to DLL base address when calling
9285 win32_add_one_solib.
9286 (handle_unload_dll): Add comment.
9287
f25b3fc3
JB
92882014-02-26 Joel Brobecker <brobecker@adacore.com>
9289
9290 * win32-low.c (win32_add_all_dlls): Renames
9291 win32_ensure_ntdll_loaded. Rewrite function documentation.
9292 Adjust implementation to always load all DLLs.
9293 Add 0x1000 offset to DLL base address when calling
9294 win32_add_one_solib.
9295 (child_initialization_done): New static global.
9296 (do_initial_child_stuff): Set child_initialization_done to
9297 zero during child initialization, and 1 after. Replace call
9298 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9299 Add comment.
9300 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9301 (handle_unload_dll): Add function documentation.
9302 (get_child_debug_event): Ignore load and unload DLL events
9303 during child initialization.
9304
d86d4aaf
DE
93052014-02-20 Doug Evans <dje@google.com>
9306
3bc32da3 9307 Remove global all_lwps.
d86d4aaf
DE
9308 * inferiors.h (ptid_of): Move here from linux-low.h.
9309 (pid_of, lwpid_of): Ditto.
9310 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9311 parameter is a struct thread_info * now.
9312 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9313 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9314 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9315 directly.
9316 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9317 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9318 * linux-arm-low.c (update_registers_callback): Update, "entry"
9319 parameter is a struct thread_info * now.
9320 Fetch lwpid from current_inferior directly.
9321 (arm_insert_point): Pass &all_threads to find_inferior instead of
9322 &all_lwps.
9323 (arm_remove_point): Ditto.
9324 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9325 (arm_prepare_to_resume): Fetch pid from thread.
9326 (arm_read_description): Fetch lwpid from current_inferior directly.
9327 * linux-low.c (all_lwps): Delete.
9328 (delete_lwp): Delete call to remove_inferior.
9329 (handle_extended_wait): Fetch lwpid from thread.
9330 (add_lwp): Don't set lwp->entry.id. Remove call to
9331 add_inferior_to_list.
9332 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9333 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9334 (kill_one_lwp_callback): Ditto.
9335 (linux_kill): Don't dereference NULL pointer.
9336 Fetch ptid,lwpid from thread.
9337 (get_detach_signal): Fetch ptid from thread.
9338 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9339 Simplify call to regcache_invalidate_thread.
9340 (delete_lwp_callback): Update, "entry" parameter is a
9341 struct thread_info * now. Fetch pid from thread.
9342 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9343 (status_pending_p_callback): Update, "entry" parameter is a
9344 struct thread_info * now. Fetch ptid from thread.
9345 (find_lwp_pid): Update, "entry" parameter is a
9346 struct thread_info * now.
9347 (linux_wait_for_lwp): Fetch pid from thread.
9348 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9349 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9350 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9351 (dequeue_one_deferred_signal): Ditto.
9352 (cancel_breakpoint): Fetch ptid from current_inferior.
9353 (linux_wait_for_event): Pass &all_threads to find_inferior,
9354 not &all_lwps. Fetch ptid, lwpid from thread.
9355 (count_events_callback): Update, "entry" parameter is a
9356 struct thread_info * now.
9357 (select_singlestep_lwp_callback): Ditto.
9358 (select_event_lwp_callback): Ditto.
9359 (cancel_breakpoints_callback): Ditto.
9360 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9361 not &all_lwps.
9362 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9363 (unsuspend_one_lwp): Update, "entry" parameter is a
9364 struct thread_info * now.
9365 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9366 not &all_lwps.
9367 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9368 Fetch lwpid from thread, not lwp.
9369 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9370 Pass &all_threads to find_inferior, not &all_lwps.
9371 (send_sigstop): Fetch lwpid from thread, not lwp.
9372 (send_sigstop_callback): Update, "entry" parameter is a
9373 struct thread_info * now.
9374 (suspend_and_send_sigstop_callback): Ditto.
9375 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9376 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9377 struct thread_info * now.
9378 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9379 from thread, lwp.
9380 (lwp_running): Update, "entry" parameter is a
9381 struct thread_info * now.
9382 (stop_all_lwps): Fetch ptid from thread.
9383 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9384 (linux_resume_one_lwp): Fetch lwpid from thread.
9385 (linux_set_resume_request): Update, "entry" parameter is a
9386 struct thread_info * now. Fetch pid, lwpid from thread.
9387 (resume_status_pending_p): Update, "entry" parameter is a
9388 struct thread_info * now.
9389 (need_step_over_p): Ditto. Fetch lwpid from thread.
9390 (start_step_over): Fetch lwpid from thread.
9391 (linux_resume_one_thread): Update, "entry" parameter is a
9392 struct thread_info * now. Fetch lwpid from thread.
9393 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9394 (proceed_one_lwp): Update, "entry" parameter is a
9395 struct thread_info * now. Fetch lwpid from thread.
9396 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9397 struct thread_info * now.
9398 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9399 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9400 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9401 directly.
9402 (regsets_store_inferior_registers): Ditto.
9403 (fetch_register, store_register): Ditto.
9404 (linux_read_memory, linux_write_memory): Ditto.
9405 (linux_request_interrupt): Ditto.
9406 (linux_read_auxv): Ditto.
9407 (linux_xfer_siginfo): Ditto.
9408 (linux_qxfer_spu): Ditto.
9409 (linux_qxfer_libraries_svr4): Ditto.
9410 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9411 moved to inferiors.h.
9412 (get_lwp): Delete.
9413 (get_thread_lwp): Update.
9414 (struct lwp_info): Delete member "entry". Simplify comment for
9415 member "thread".
9416 (all_lwps): Delete.
9417 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9418 current_inferior directly.
9419 (update_watch_registers_callback): Update, "entry" parameter is a
9420 struct thread_info * now. Fetch pid from thread.
9421 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9422 (mips_insert_point): Fetch lwpid from current_inferior.
9423 Pass &all_threads to find_inferior, not &all_lwps.
9424 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9425 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9426 directly.
9427 (mips_stopped_data_address): Ditto.
9428 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9429 directly.
9430 * linux-tile-low.c (tile_arch_setup): Ditto.
9431 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9432 (update_debug_registers_callback): Update, "entry" parameter is a
9433 struct thread_info * now. Fetch pid from thread.
9434 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9435 Pass &all_threads to find_inferior, not &all_lwps.
9436 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9437 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9438 Pass &all_threads to find_inferior, not &all_lwps.
9439 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9440 (i386_dr_low_get_status): Ditto.
9441 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9442 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9443 (x86_linux_read_description): Ditto.
9444 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9445
3b8361aa
DE
94462014-02-20 Doug Evans <dje@google.com>
9447
9448 * inferiors.c (get_first_inferior): Fix buglet.
9449
f7667f0d
DE
94502014-02-19 Doug Evans <dje@google.com>
9451
9452 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9453 * inferiors.c (add_thread): Change result type to struct thread_info *.
9454 All callers updated.
9455 (add_lwp): Call add_thread here instead of in callers.
9456 All callers updated.
9457 * linux-low.h (get_lwp_thread): Rewrite.
9458 (struct lwp_info): New member "thread".
9459
b3312d80
DE
94602014-02-19 Doug Evans <dje@google.com>
9461
9462 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9463 All callers updated.
9464
ecc6f45c
DE
94652014-02-19 Doug Evans <dje@google.com>
9466
9467 * inferiors.c (add_thread): Fix whitespace.
9468
649ebbca
DE
94692014-02-19 Doug Evans <dje@google.com>
9470
9471 * dll.c (clear_dlls): Replace accessing list implemention details
9472 with API function.
9473 * gdbthread.h (get_first_thread): Declare.
9474 * inferiors.c (for_each_inferior_with_data): New function.
9475 (get_first_thread): New function.
9476 (find_thread_ptid): Simplify.
9477 (get_first_inferior): New function.
9478 (clear_list): Delete.
9479 (one_inferior_p): New function.
9480 (clear_inferior_list): New function.
9481 (clear_inferiors): Update.
9482 * inferiors.h (for_each_inferior_with_data): Declare.
9483 (clear_inferior_list): Declare.
9484 (one_inferior_p): Declare.
9485 (get_first_inferior): Declare.
9486 * linux-low.c (linux_wait_for_event): Replace accessing list
9487 implemention details with API function.
9488 * server.c (target_running): Ditto.
9489 (accumulate_file_name_length): New function.
9490 (emit_dll_description): New function.
9491 (handle_qxfer_libraries): Replace accessing list implemention
9492 details with API function.
9493 (handle_qxfer_threads_worker): New function.
9494 (handle_qxfer_threads_proper): Replace accessing list implemention
9495 details with API function.
9496 (handle_query): Ditto.
9497 (visit_actioned_threads_callback_ftype): New typedef.
9498 (visit_actioned_threads_data): New struct.
9499 (visit_actioned_threads): Rewrite to be find_inferior callback.
9500 (resume): Call find_inferior.
9501 (handle_status): Replace accessing list implemention
9502 details with API function.
9503 (process_serial_event): Replace accessing list implemention details
9504 with API function.
9505 * target.c (set_desired_inferior): Replace accessing list implemention
9506 details with API function.
9507 * tracepoint.c (same_process_p): New function.
9508 (gdb_agent_about_to_close): Replace accessing list implemention
9509 details with API function.
9510 * win32-low.c (child_delete_thread): Replace accessing list
9511 implemention details with API function.
9512 (match_dll_by_basename): New function.
9513 (dll_is_loaded_by_basename): New function.
9514 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9515 details call to dll_is_loaded_by_basename.
9516
80894984
DE
95172014-02-19 Doug Evans <dje@google.com>
9518
9519 * dll.h (struct dll_info): Add comment.
9520 * gdbthread.h (struct thread_info): Add comment.
9521 (current_ptid): Simplify.
9522 * inferiors.c (add_process): Update.
9523 (remove_process): Update.
9524 * inferiors.h (struct process_info): Rename member "head" to "entry".
9525 * linux-low.c (delete_lwp): Update.
9526 (add_lwp): Update.
9527 (last_thread_of_process_p): Update.
9528 (kill_one_lwp_callback, linux_kill): Update.
9529 (status_pending_p_callback): Update.
9530 (wait_for_sigstop): Update. Simplify read of ptid.
9531 (start_step_over): Update.
9532 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9533 (get_lwp_thread): Update.
9534 (struct lwp_info): Rename member "head" to "entry".
9535 * regcache.h (inferior_list_entry): Delete.
9536 * server.c (kill_inferior_callback): Update.
9537 (detach_or_kill_inferior_callback): Update.
9538 (print_started_pid): Update.
9539 (print_attached_pid): Update.
9540 (process_serial_event): Simplify read of ptid.
9541 * thread-db.c (thread_db_create_event): Update.
9542 (thread_db_get_tls_address): Update.
9543 * win32-low.c (current_inferior_ptid): Simplify.
9544
46917d26
TT
95452014-02-19 Tom Tromey <tromey@redhat.com>
9546
9547 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9548 argument.
9549 (target_supports_btrace): Update.
9550
0759a81e
YQ
95512014-02-14 Yao Qi <yao@codesourcery.com>
9552
9553 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9554 (rsp-low-ipa.o): New target.
9555
a7191e8b
TT
95562014-02-12 Tom Tromey <tromey@redhat.com>
9557
9558 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9559 convert_ascii_to_int.
9560 * regcache.c (registers_to_string): Likewise.
9561 * remote-utils.c (decode_M_packet): Likewise.
9562 * server.c (process_serial_event): Likewise.
9563
ff0e980e
TT
95642014-02-12 Tom Tromey <tromey@redhat.com>
9565
9566 * server.c (handle_query, handle_v_run): Use hex2bin, not
9567 unhexify.
9568 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9569
e9371aff
TT
95702014-02-12 Tom Tromey <tromey@redhat.com>
9571
9572 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9573 convert_int_to_ascii.
9574 * regcache.c (registers_to_string, collect_register_as_string):
9575 Likewise.
9576 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9577 Likewise.
9578 * server.c (process_serial_event): Likewise.
9579 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9580 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9581
971dc0b8
TT
95822014-02-12 Tom Tromey <tromey@redhat.com>
9583
9584 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9585 bin2hex, not hexify.
9586 * tracepoint.c (cmd_qtstatus): Likewise.
9587
0a822afb
TT
95882014-02-12 Tom Tromey <tromey@redhat.com>
9589
9590 * remote-utils.c (monitor_output): Pass explicit length to
9591 hexify.
9592
9c3d6531
TT
95932014-02-12 Tom Tromey <tromey@redhat.com>
9594
9595 * tracepoint.c: Include rsp-low.h.
9596 * server.c: Include rsp-low.h.
9597 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9598 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9599 declare.
9600 * remote-utils.c: Include rsp-low.h.
9601 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9602 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9603 (convert_int_to_ascii, convert_ascii_to_int): Move to
9604 common/rsp-low.c.
9605 * regcache.c: Include rsp-low.h.
9606 * ax.c: Include rsp-low.h.
9607 * Makefile.in (SFILES): Add common/rsp-low.c.
9608 (OBS): Add rsp-low.o.
9609 (rsp-low.o): New target.
9610
01fd3ea5
TT
96112014-02-12 Tom Tromey <tromey@redhat.com>
9612
9613 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9614 Include print-utils.h.
9615 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9616 (plongest, thirty_two, phex_nz): Remove.
9617 * Makefile.in (SFILES): Add common/print-utils.c.
9618 (OBS): Add print-utils.o.
9619 (print-utils-ipa.o): New target.
9620 (print-utils.o): New target.
9621 (IPA_OBJS): Add print-utils-ipa.o.
9622
e99dc820
TT
96232014-02-06 Tom Tromey <tromey@redhat.com>
9624
9625 * Makefile.in (SFILES): Fix indentation.
9626
ee1e2d4f
DE
96272014-02-05 Doug Evans <dje@google.com>
9628
9629 * linux-low.c (linux_wait_for_event): Improve comment.
9630 (linux_wait_1): Keep current_inferior in sync with event_child.
9631
f5a02773
DE
96322014-01-22 Doug Evans <dje@google.com>
9633
9634 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9635
87ce2a04
DE
96362014-01-22 Doug Evans <dje@google.com>
9637
9638 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9639 * configure: Regenerate.
9640 * config.in: Regenerate.
9641 * Makefile.in (SFILES): Add debug.c.
9642 (OBS): Add debug.o.
9643 * debug.c: New file.
9644 * debug.h: New file.
9645 * linux-aarch64-low.c (*): Update all debugging printfs to use
9646 debug_printf instead of fprintf.
9647 * linux-arm-low.c (*): Ditto.
9648 * linux-cris-low.c (*): Ditto.
9649 * linux-crisv32-low.c (*): Ditto.
9650 * linux-m32r-low.c (*): Ditto.
9651 * linux-sparc-low.c (*): Ditto.
9652 * linux-x86.c (*): Ditto.
9653 * linux-low.c (*): Ditto.
9654 (linux_wait_1): Add calls to debug_enter, debug_exit.
9655 (linux_wait): Remove redundant debugging printf.
9656 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9657 (linux_resume, unstop_all_lwps): Ditto.
9658 * mem-break.c (*): Update all debugging printfs to use
9659 debug_printf instead of fprintf.
9660 * remote-utils.c (*): Ditto.
9661 * thread-db.c (*): Ditto.
9662 * server.c #include <ctype.h>, "gdb_vecs.h".
9663 (debug_threads): Moved to debug.c.
9664 (*): Update all debugging printfs to use debug_printf instead of
9665 fprintf.
9666 (start_inferior): Replace call to fflush with call to debug_flush.
9667 (monitor_show_help): Mention set debug-format.
9668 (parse_debug_format_options): New function.
9669 (handle_monitor_command): Handle "monitor set debug-format".
9670 (gdbserver_usage): Mention --debug-format.
9671 (main): Parse --debug-format.
9672 * server.h (debug_threads): Declaration moved to debug.h.
9673 #include "debug.h".
9674 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9675 trace_debug_1 that uses debug_printf.
9676 (tracepoint_look_up_symbols): Update all debugging printfs to use
9677 debug_printf instead of fprintf.
9678
e671835b
BS
96792014-01-20 Baruch Siach <baruch@tkos.co.il>
9680
9681 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9682 sys/ptrace.h.
9683
b5737fa9
PA
96842014-01-17 Pedro Alves <palves@redhat.com>
9685
ea38d2a9 9686 PR build/16445
c7faa97a
PA
9687 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9688 defined after including gdb_proc_service.h.
b5737fa9 9689
40ed484e
DE
96902014-01-16 Doug Evans <dje@google.com>
9691
9692 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9693 (match_dll): Use it.
9694
969c39fb
MM
96952014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9696
9697 * target.h (target_ops) <read_btrace>: Change parameters and
9698 return type to allow error reporting.
9699 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9700 trace reading errors on.
9701 * linux-low.c (linux_low_read_btrace): Pass trace reading
9702 errors on.
9703 (linux_low_disable_btrace): New.
9704
ab7f45ba
DE
97052014-01-15 Doug Evans <dje@google.com>
9706
9707 * inferiors.c (thread_id_to_gdb_id): Delete.
9708 * inferiors.h (thread_id_to_gdb_id): Delete.
9709
66af0f44
EZ
97102014-01-13 Eli Zaretskii <eliz@gnu.org>
9711
9712 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9713 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9714 versions.
9715
9939e131
PA
97162014-01-08 Pedro Alves <palves@redhat.com>
9717
9718 * server.c (handle_status): Don't discard previous queued stop
9719 replies or thread's pending status here.
9720 (main) <disconnection>: Do it here instead.
9721
b7ea362b
PA
97222014-01-08 Pedro Alves <palves@redhat.com>
9723
9724 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9725 * server.c (visit_actioned_threads, handle_pending_status): New
9726 function.
9727 (handle_v_cont): Factor out parts to ...
9728 (resume): ... this new function. If in all-stop, and a thread
9729 being resumed has a pending status, report it without actually
9730 resuming.
9731 (myresume): Adjust to use the new 'resume' function.
9732 (clear_pending_status_callback, set_pending_status_callback)
9733 (find_status_pending_thread_callback): New functions.
9734 (handle_status): Handle the case of multiple threads having
9735 interesting statuses to report. Report threads' real last signal
9736 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9737 with an interesting thread to report the status for, instead of
9738 always reporting the status of the first thread.
9739
28498c42
JB
97402014-01-01 Joel Brobecker <brobecker@adacore.com>
9741
9742 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9743 * gdbreplay.c (gdbreplay_version): Likewise.
9744
f45c82da
YZ
97452013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9746
9747 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9748 iov.iov_len with the real length in use.
9749
379a5e2d
JB
97502013-12-13 Joel Brobecker <brobecker@adacore.com>
9751
9752 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9753 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9754 for all targets that use win32-low.c.
9755 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9756 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9757
4210d83e
PA
97582013-12-13 Pedro Alves <palves@redhat.com>
9759
9760 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9761 if equal to TARGET_WAITKIND_LOADED.
9762 * win32-low.c (cached_status): New static global.
9763 (win32_wait): Add declaration.
9764 (do_initial_child_stuff): Flush all initial pending debug events
9765 up to the initial breakpoint.
9766 (win32_wait): If CACHED_STATUS was set, return that instead
9767 of doing a real wait. Remove the code resuming the execution
9768 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9769 during the initial phase. Also remove the code changing
9770 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9771 TARGET_WAITKIND_STOPPED.
9772
e7f0d979
YQ
97732013-12-11 Yao Qi <yao@codesourcery.com>
9774
9775 * notif.c (handle_notif_ack): Return 0 if no notification
9776 matches.
9777
ebcf782c
DE
97782013-11-20 Doug Evans <dje@google.com>
9779
9780 * linux-low.c (linux_set_resume_request): Fix comment.
9781
20ad9378
DE
97822013-11-20 Doug Evans <dje@google.com>
9783
9784 * linux-low.c (resume_status_pending_p): Tweak comment.
9785
a196ebeb
WT
97862013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9787
9788 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9789 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9790 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9791 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9792 (srv_amd64_regobj): Add amd64-mpx.o.
9793 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9794 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9795 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9796 * i387-fp.c (num_pl_bnd_register) Added constant.
9797 (num_pl_bnd_cfg_registers) Added constant.
9798 (struct i387_xsave) Added reserved area and MPX fields.
9799 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9800 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9801 function.
9802 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9803 (init_registers_amd64_mpx_linux): Declare new function.
9804 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9805 (x86_64_regmap): Add MPX registers.
9806 (x86_linux_read_description): Add MPX case.
9807 (initialize_low_arch): Initialize MPX targets.
9808
0080a2f6
TT
98092013-11-18 Tom Tromey <tromey@redhat.com>
9810
9811 * configure: Rebuild.
9812 * configure.ac: Don't check for stdlib.h.
9813 * gdbreplay.c: Unconditionally include stdlib.h.
9814
2978b111
TT
98152013-11-18 Tom Tromey <tromey@redhat.com>
9816
9817 * config.in: Rebuild.
9818 * configure: Rebuild.
9819 * configure.ac: Don't use AC_HEADER_DIRENT.
9820
a3d08894
TT
98212013-11-18 Tom Tromey <tromey@redhat.com>
9822
9823 * server.h: Don't check HAVE_STRING_H.
9824 * gdbreplay.c: Don't check HAVE_STRING_H.
9825 * configure: Rebuild.
9826
0a5dd17d
TT
98272013-11-18 Tom Tromey <tromey@redhat.com>
9828
9829 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9830 LIBGNU.
9831
1bd2f0ba
TT
98322013-11-08 Tom Tromey <tromey@redhat.com>
9833
9834 * configure, config.in: Rebuild.
9835 * configure.ac: Remove unused configury.
9836
3266f10b
TT
98372013-11-08 Tom Tromey <tromey@redhat.com>
9838
9839 * acinclude.m4: Include common.m4, codeset.m4.
9840 * configure, config.in: Rebuild.
9841 * configure.ac: Use GDB_AC_COMMON.
9842
6682d959
AA
98432013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9844
9845 * linux-s390-low.c (HWCAP_S390_TE): New define.
9846 (s390_arch_setup): Consider the TE field in the HWCAP for
9847 determining 'have_regset_tdb'.
9848
fd0a4d76
SDJ
98492013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9850
9851 PR gdb/16014
9852 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9853 call to sizeof.
9854
1a3d890b
PA
98552013-10-02 Pedro Alves <palves@redhat.com>
9856
9857 * server.c (process_serial_event): Don't output "GDBserver
9858 exiting" if GDB is connected through stdio.
9859 * target.c (mywait): Likewise, be silent if GDB is connected
9860 through stdio.
9861
97ad4581
JB
98622013-10-01 Joel Brobecker <brobecker@adacore.com>
9863
9864 * lynx-low.c (lynx_add_threads_after_attach): New function.
9865 (lynx_attach): Remove call to add_thread. Add call to
9866 lynx_add_threads_after_attach instead.
9867
5b4e221c
MF
98682013-09-28 Mike Frysinger <vapier@gentoo.org>
9869
9870 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9871 * config.in, configure: Regenerated.
9872
ee47b2f8
YQ
98732013-09-18 Yao Qi <yao@codesourcery.com>
9874
9875 PR server/15959
9876 * server.c (start_inferior): Clear 'resume_info'.
9877
d6707650 98782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9879
d6707650
JW
9880 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9881 for each register.
9882
9243dd0e 98832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9884
9243dd0e
JW
9885 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9886 linux-tile-low.o to srv_tgtobj.
9887
c623a6ef
WN
98882013-09-16 Will Newton <will.newton@linaro.org>
9889
9890 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9891 out regs.
9892
fb71d39e
PA
98932013-09-06 Pedro Alves <palves@redhat.com>
9894
9895 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9896 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9897 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9898 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9899 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9900 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9901
8e7e9910
PA
99022013-09-06 Pedro Alves <palves@redhat.com>
9903
9904 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9905 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9906
7c3a12ca
PA
99072013-09-06 Pedro Alves <palves@redhat.com>
9908
9909 * linux-amd64-ipa.c: Include tracepoint.h.
9910 * linux-i386-ipa.c: Include tracepoint.h.
9911
8eb3d7b6
RW
99122013-09-06 Ricard Wanderlof <ricardw@axis.com>
9913
9914 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9915 (ps_get_thread_area): New function.
9916
eddddb9d
RW
99172013-09-06 Ricard Wanderlof <ricardw@axis.com>
9918
9919 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9920 (initialize_low_arch): Call init_registers_crisv32 rather than
9921 init_register_crisv32.
9922
533b0600
PA
99232013-09-05 Pedro Alves <palves@redhat.com>
9924
9925 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9926 to ...
9927 * hostio.h: ... this new file.
9928 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9929 win32-low.c: Include hostio.h.
9930
0ce3d3b5
PA
99312013-09-05 Pedro Alves <palves@redhat.com>
9932
9933 * server.h (gdb_client_data, handler_func, callback_handler_func)
9934 (delete_file_handler, add_file_handler, append_callback_event)
9935 (delete_callback_event, start_event_loop, initialize_event_loop):
9936 Move to event-loop.h and include it.
9937 * event-loop.h: New file.
9938
799cdc37
PA
99392013-09-05 Pedro Alves <palves@redhat.com>
9940
9941 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9942 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9943 (loaded_dll, unloaded_dll): Move to ...
9944 * dll.h: ... this new file.
9945 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9946
6a6bbd9d
PA
99472013-09-05 Pedro Alves <palves@redhat.com>
9948
9949 * server.h (current_process, get_thread_process, all_processes)
9950 (add_inferior_to_list, for_each_inferior, current_inferior)
9951 (remove_inferior, add_process, remove_process, find_process_pid)
9952 (have_started_inferiors_p, have_attached_inferiors_p)
9953 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9954 (clear_inferiors, find_inferior, find_inferior_id)
9955 (inferior_target_data, set_inferior_target_data)
9956 (inferior_regcache_data, set_inferior_regcache_data): Move to
9957 inferiors.h, and include it.
9958 * inferiors.h: New file.
9959
f699aaba
PA
99602013-09-05 Pedro Alves <palves@redhat.com>
9961
9962 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9963 Move ...
72f4393d 9964 * ax.h: ... here.
f699aaba 9965
c144c7a0
PA
99662013-09-05 Pedro Alves <palves@redhat.com>
9967
9968 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9969 tracepoint.h.
9970 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9971 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9972 (handle_tracepoint_general_set, handle_tracepoint_query)
9973 (tracepoint_finished_step, tracepoint_was_hit)
9974 (release_while_stepping_state_list, current_traceframe)
9975 (in_readonly_region, traceframe_read_mem)
9976 (fetch_traceframe_registers, traceframe_read_sdata)
9977 (traceframe_read_info, struct fast_tpoint_collect_status)
9978 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9979 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9980 (supply_fast_tracepoint_registers)
9981 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9982 (ipa_tdesc, claim_trampoline_space)
9983 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9984 (agent_mem_read, agent_get_trace_state_variable_value)
9985 (agent_set_trace_state_variable_value, agent_tsv_read)
9986 (agent_mem_read_string, get_raw_reg_func_addr)
9987 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9988 * tracepoint.h: ... this new file.
9989
ff42e6ab
PA
99902013-09-05 Pedro Alves <palves@redhat.com>
9991
9992 * server.h (perror_with_name, error, fatal, warning, paddress)
9993 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9994 include it.
9995 * utils.h: New file.
9996
541af0f4
PA
99972013-09-05 Pedro Alves <palves@redhat.com>
9998
9999 * server.h (remote_debug, noack_mode, transport_is_reliable)
10000 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10001 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10002 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10003 (write_enn, initialize_async_io, enable_async_io)
10004 (disable_async_io, check_remote_input_interrupt_request)
10005 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10006 (dead_thread_notify, prepare_resume_reply)
10007 (decode_address_to_semicolon, decode_address, decode_m_packet)
10008 (decode_M_packet, decode_X_packet, decode_xfer_write)
10009 (decode_search_memory_packet, unhexify, hexify)
10010 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10011 (look_up_one_symbol, relocate_instruction)
10012 (monitor_output): Move to remote-utils.h, and include it.
10013 * remote-utils.h: New file.
10014
eebdf26b
PA
100152013-09-05 Pedro Alves <palves@redhat.com>
10016
10017 * server.h (_): Delete.
10018
3aafd2ff
PA
100192013-09-02 Pedro Alves <palves@redhat.com>
10020
10021 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10022 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10023 allocated.
10024 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10025
cee83bcb
PM
100262013-09-02 Pierre Muller <muller@sourceware.org>
10027
10028 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10029 or WriteProcessMemory complete successfully and handle
10030 ERROR_PARTIAL_COPY error.
10031
9a13b2fa
PA
100322013-09-02 Pedro Alves <palves@redhat.com>
10033
10034 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10035 error instead of EIO.
10036
602e3198
JK
100372013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10038
10039 PR server/15604
10040 * linux-low.c: Include filestuff.h.
10041 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10042 * lynx-low.c: Include filestuff.h.
10043 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10044 * server.c: Include filestuff.h.
10045 (main): Call notice_open_fds.
10046 * spu-low.c: Include filestuff.h.
10047 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10048
96d7229d
LM
100492013-08-22 Luis Machado <lgustavo@codesourcery.com>
10050
10051 * Makefile.in: Explain why ../target and ../nat are not
10052 listed as include file search paths.
10053 (linux-waitpid.o): New object file rule.
10054 * configure.srv (srv_native_linux_obj): New variable.
10055 Replace all occurrences of linux native object files with
10056 $srv_native_linux_obj.
10057 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10058 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10059 (linux_enable_event_reporting): Remove declaration.
10060 (my_waitpid): Moved to common/linux-waitpid.c.
10061 (linux_wait_for_event): Pass ptid when calling
10062 linux_enable_event_reporting.
10063 (linux_supports_tracefork_flag): Remove.
10064 (linux_enable_event_reporting): Likewise.
10065 (linux_tracefork_grandchild): Remove.
10066 (STACK_SIZE): Moved to common/linux-ptrace.c.
10067 (linux_tracefork_child): Remove.
10068 (linux_test_for_tracefork): Remove.
10069 (linux_look_up_symbols): Call linux_supports_traceclone.
10070 (initialize_low): Remove call to linux_test_for_tracefork.
10071 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10072 common/linux-ptrace.h.
10073 (PTRACE_TYPE_ARG4): Likewise.
10074 Include linux-ptrace.h.
10075
32940073
PA
100762013-08-21 Pedro Alves <palves@redhat.com>
10077
10078 * config.in: Renegerate.
10079
33b60d58 100802013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10081
33b60d58
LM
10082 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10083 (SFILES): Remove $(srcdir)/common/target-common.c and
10084 add $(srcdir)/target/waitstatus.c.
10085 (OBS): Remove target-common.o and add waitstatus.o.
10086 (server_h): Remove $(srcdir)/../common/target-common.h and
10087 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10088 and $(srcdir)/../target/waitstatus.h.
10089 (target-common.o): Remove.
10090 (waitstatus.o): New target object file.
10091 * target.h: Do not include target-common.h and
10092 include target/resume.h, target/wait.h and
10093 target/waitstatus.h.
10094
b8e1b30e
LM
100952013-08-13 Luis Machado <lgustavo@codesourcery.com>
10096
10097 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10098 to PTRACE_TYPE_ARG3.
10099 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10100 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10101 PTRACE_TYPE_ARG4.
10102 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10103 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10104
7a60ad40
YQ
101052013-07-27 Jie Zhang <jie@codesourcery.com>
10106 Daniel Jacobowitz <dan@codesourcery.com>
10107 Yao Qi <yao@codesourcery.com>
10108
10109 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10110 (mips-linux-watch.o): New rule.
10111 (mips_linux_watch_h): New variable.
10112 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10113 srv_tgtobj.
10114 * linux-mips-low.c: Include mips-linux-watch.h.
10115 (struct arch_process_info, struct arch_lwp_info): New.
10116 (update_watch_registers_callback): New function.
10117 (mips_linux_new_process, mips_linux_new_thread) New functions.
10118 (mips_linux_prepare_to_resume, mips_insert_point): New
10119 functions.
10120 (mips_remove_point, mips_stopped_by_watchpoint): New
10121 functions.
10122 (rsp_bp_type_to_target_hw_bp_type): New function.
10123 (mips_stopped_data_address): New function.
10124 (the_low_target): Add watchpoint support functions.
10125
de6f69ad
YQ
101262013-07-27 Yao Qi <yao@codesourcery.com>
10127
10128 * i386-low.c: Include break-common.h.
10129 (enum target_hw_bp_type): Remove.
10130
3360c0bf
LM
101312013-07-24 Luis Machado <lgustavo@codesourcery.com>
10132
10133 * Makefile.in (SFILES): /common/target-common.c.
10134 (OBS): Add target-common.o.
10135 (server_h): Add $(srcdir)/../common/target-common.h.
10136 (target-common.o): New target.
10137 * server.c (queue_stop_reply_callback): Free
10138 status string after use.
10139 * target.c (target_waitstatus_to_string): Remove.
10140 * target.h: Include target-common.h.
10141 (resume_kind): Likewise.
10142 (target_waitkind): Likewise.
10143 (target_waitstatus): Likewise.
10144 (TARGET_WNOHANG): Likewise.
10145
bd885420
YQ
101462013-07-04 Yao Qi <yao@codesourcery.com>
10147
10148 * Makefile.in (host_alias): Use @host_noncanonical@.
10149 (target_alias): Use @target_noncanonical@.
10150 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10151 ACX_NONCANONICAL_HOST.
10152 * configure: Regenerated.
10153
10154 Revert:
10155 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10156
10157 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10158 * configure: Rebuild.
10159 * Makefile.in (version_host, version_target): Get from configure.
10160 (version.c): Use $(version_host) and $(version_target).
10161
17ef446e
PA
101622013-07-03 Pedro Alves <palves@redhat.com>
10163
10164 * Makefile.in (config.status): Depend on development.sh.
10165 * acinclude.m4: Include libmcheck.m4.
10166 * configure: Regenerate.
10167
7a9a7487
MG
101682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10169
10170 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10171 attribute inside the parentheses.
10172 (winapi_DebugSetProcessKillOnExit): Ditto.
10173 (winapi_DebugBreakProcess): Ditto.
10174 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10175
49b64de6
MG
101762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10177
10178 * notif.h (notif_event): Add a dummy member to avoid compiler
10179 errors.
10180
d5749ee7
PA
101812013-07-01 Pedro Alves <palves@redhat.com>
10182
10183 * hostio.c (HOSTIO_PATH_MAX): Define.
10184 (require_filename, handle_open, handle_unlink, handle_readlink):
10185 Use it.
10186
d8d2a3ee
PA
101872013-07-01 Pedro Alves <palves@redhat.com>
10188
10189 * server.h: Include "pathmax.h".
10190 * linux-low.c: Don't include sys/param.h.
10191 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10192 MAXPATHLEN.
10193 * win32-low.c: Don't include sys/param.h.
10194 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10195
bc7dea8d
PA
101962013-07-01 Pedro Alves <palves@redhat.com>
10197
10198 * event-loop.c: Don't check HAVE_UNISTD_H before including
10199 <unistd.h>.
10200 * gdbreplay.c: Likewise.
10201 * remote-utils.c: Likewise.
10202 * server.c: Likewise.
10203 * configure.ac: Don't check for unistd.h.
10204 * configure: Regenerate.
10205
d6c2da54
TT
102062013-06-28 Tom Tromey <tromey@redhat.com>
10207
10208 * Makefile.in (version.c): Use version.in, not
10209 common/version.in.
10210
257b6bec
MG
102112013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10212
10213 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10214 * configure: Rebuild.
10215 * Makefile.in (version_host, version_target): Get from configure.
10216 (version.c): Use $(version_host) and $(version_target).
10217
86ebe149
DK
102182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10219
10220 Fix trace-status to output user name without trailing colon.
10221 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10222
f30aa5af
DK
102232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10224
10225 Fix trace-status to output proper start-time and stop-time.
10226 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10227 output start time and stop time in hex as gdb expects.
10228
28a93511
YQ
102292013-06-26 Pedro Alves <pedro@codesourcery.com>
10230
10231 * tracepoint.c (build_traceframe_info_xml): Output trace state
10232 variables present in the trace buffer.
10233
01208463
TT
102342013-06-24 Tom Tromey <tromey@redhat.com>
10235
10236 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10237 create-version.sh.
10238 (version.o): Remove.
10239 * gdbreplay.c: Include version.h.
10240 (version, host_name): Don't declare.
10241 * server.h: Include version.h.
10242 (version, host_name): Don't declare.
10243
760256f9
PA
102442013-06-12 Pedro Alves <palves@redhat.com>
10245
10246 * linux-x86-low.c (linux_is_elf64): Delete global.
10247 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10248 with local linux_pid_exe_is_elf_64_file use.
10249
030031ee
PA
102502013-06-11 Pedro Alves <palves@redhat.com>
10251
10252 * linux-low.c (regset_disabled, disable_regset): New functions.
10253 (regsets_fetch_inferior_registers)
10254 (regsets_store_inferior_registers): Use them.
10255 (initialize_regsets_info); Don't allocate the disabled_regsets
10256 array here.
10257 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10258 comment.
10259
5da6eb0a
PA
102602013-06-11 Pedro Alves <palves@redhat.com>
10261
10262 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10263 xmalloc.
10264
7e5aaa09
PA
102652013-06-11 Pedro Alves <palves@redhat.com>
10266
10267 * linux-x86-low.c (initialize_low_arch): Call
10268 init_registers_x32_avx_linux.
10269
d878444c
JK
102702013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10271
10272 Fix compatibility with Android Bionic.
10273 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10274 it is not empty.
10275
3aee8918
PA
102762013-06-07 Pedro Alves <palves@redhat.com>
10277
5f2b57b5 10278 PR server/14823
3aee8918
PA
10279 * Makefile.in (OBS): Add tdesc.o.
10280 (IPA_OBJS): Add tdesc-ipa.o.
10281 (tdesc-ipa.o): New rule.
10282 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10283 interface.
10284 * linux-low.c (new_inferior): Delete.
10285 (disabled_regsets, num_regsets): Delete.
10286 (linux_add_process): Adjust to set the new per-process
10287 new_inferior flag.
10288 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10289 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10290 was a stop. When calling arch_setup, switch the current inferior
10291 to the thread that got an event.
10292 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10293 (regsets_fetch_inferior_registers)
10294 (regsets_store_inferior_registers): New regsets_info parameter.
10295 Adjust to use it.
10296 (linux_register_in_regsets): New regs_info parameter. Adjust to
10297 use it.
10298 (register_addr, fetch_register, store_register): New usrregs_info
10299 parameter. Adjust to use it.
10300 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10301 parameter regs_info. Adjust to use it.
10302 (linux_fetch_registers): Get the current inferior's regs_info, and
10303 adjust to use it.
10304 (linux_store_registers): Ditto.
10305 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10306 (initialize_low): Don't initialize the target_regsets here. Call
10307 initialize_low_arch.
10308 * linux-low.h (target_regsets): Delete declaration.
10309 (struct regsets_info): New.
10310 (struct usrregs_info): New.
10311 (struct regs_info): New.
10312 (struct process_info_private) <new_inferior>: New field.
10313 (struct linux_target_ops): Delete the num_regs, regmap, and
10314 regset_bitmap fields. New field regs_info.
10315 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10316 * i387-fp.c (num_xmm_registers): Delete.
10317 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10318 calls to new interface.
10319 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10320 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10321 Infer the number of xmm registers from the regcache's target
10322 description.
10323 * i387-fp.h (num_xmm_registers): Delete.
10324 * inferiors.c (add_thread): Don't install the thread's regcache
10325 here.
10326 * proc-service.c (gregset_info): Fetch the current inferior's
10327 regs_info. Adjust to use it.
10328 * regcache.c: Include tdesc.h.
10329 (register_bytes, reg_defs, num_registers)
10330 (gdbserver_expedite_regs): Delete.
10331 (get_thread_regcache): If the thread doesn't have a regcache yet,
10332 create one, instead of aborting gdbserver.
10333 (regcache_invalidate_one): Rename to ...
10334 (regcache_invalidate_thread): ... this.
10335 (regcache_invalidate_one): New.
10336 (regcache_invalidate): Only invalidate registers of the current
10337 process.
10338 (init_register_cache): Add target_desc parameter, and use it.
10339 (new_register_cache): Ditto. Assert the target description has a
10340 non zero registers_size.
10341 (regcache_cpy): Add assertions. Adjust.
10342 (realloc_register_cache, set_register_cache): Delete.
10343 (registers_to_string, registers_from_string): Adjust.
10344 (find_register_by_name, find_regno, find_register_by_number)
10345 (register_cache_size): Add target_desc parameter, and use it.
10346 (free_register_cache_thread, free_register_cache_thread_one)
10347 (regcache_release, register_cache_size): New.
10348 (register_size): Add target_desc parameter, and use it.
10349 (register_data, supply_register, supply_register_zeroed)
10350 (supply_regblock, supply_register_by_name, collect_register)
10351 (collect_register_as_string, collect_register_by_name): Adjust.
10352 * regcache.h (struct target_desc): Forward declare.
10353 (struct regcache) <tdesc>: New field.
10354 (init_register_cache, new_register_cache): Add target_desc
10355 parameter.
10356 (regcache_invalidate_thread): Declare.
10357 (regcache_invalidate_one): Delete declaration.
10358 (regcache_release): Declare.
10359 (find_register_by_number, register_cache_size, register_size)
10360 (find_regno): Add target_desc parameter.
10361 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10362 declarations.
10363 * remote-utils.c: Include tdesc.h.
10364 (outreg, prepare_resume_reply): Adjust.
10365 * server.c: Include tdesc.h.
10366 (gdbserver_xmltarget): Delete declaration.
10367 (get_features_xml, process_serial_event): Adjust.
10368 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10369 declare.
10370 (struct process_info) <tdesc>: New field.
10371 (ipa_tdesc): Declare.
10372 * tdesc.c: New file.
10373 * tdesc.h: New file.
10374 * tracepoint.c: Include tdesc.h.
10375 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10376 (get_context_regcache): Adjust to pass ipa_tdesc down.
10377 (do_action_at_tracepoint): Adjust to get the register cache size
10378 from the context regcache's description.
10379 (traceframe_walk_blocks): Adjust to get the register cache size
10380 from the current trace frame's description.
10381 (traceframe_get_pc): Adjust to get current trace frame's
10382 description and pass it down.
10383 (gdb_collect): Adjust to get the register cache size from the
10384 IPA's description.
10385 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10386 (gdbserver_xmltarget): Delete.
10387 (initialize_low_tracepoint): Set the ipa's target description.
10388 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10389 (initialize_low_tracepoint): Set the ipa's target description.
10390 * linux-x86-low.c: Include tdesc.h.
10391 [__x86_64__] (is_64bit_tdesc): New.
10392 (ps_get_thread_area, x86_get_thread_area): Use it.
10393 (i386_cannot_store_register): Rename to ...
10394 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10395 (i386_cannot_fetch_register): Rename to ...
10396 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10397 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10398 to new interface.
10399 (target_regsets): Rename to ...
10400 (x86_regsets): ... this.
10401 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10402 interface.
10403 (x86_siginfo_fixup): Use is_64bit_tdesc.
10404 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10405 (tdesc_x32_avx_linux, tdesc_x32_linux)
10406 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10407 Declare.
10408 (x86_linux_update_xmltarget): Delete.
10409 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10410 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10411 (AMD64_LINUX_USER64_CS): New.
10412 (x86_linux_read_description): New, based on
10413 x86_linux_update_xmltarget.
10414 (same_process_callback): New.
10415 (x86_arch_setup_process_callback): New.
10416 (x86_linux_update_xmltarget): New.
10417 (x86_regsets_info): New.
10418 (amd64_linux_regs_info): New.
10419 (i386_linux_usrregs_info): New.
10420 (i386_linux_regs_info): New.
10421 (x86_linux_regs_info): New.
10422 (x86_arch_setup): Reimplement.
10423 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10424 (x86_emit_ops): Ditto.
10425 (the_low_target): Adjust. Install x86_linux_regs_info,
10426 x86_cannot_fetch_register, and x86_cannot_store_register.
10427 (initialize_low_arch): New.
10428 * linux-ia64-low.c (tdesc_ia64): Declare.
10429 (ia64_fetch_register): Adjust.
10430 (ia64_usrregs_info, regs_info): New globals.
10431 (ia64_regs_info): New function.
10432 (the_low_target): Adjust.
10433 (initialize_low_arch): New function.
10434 * linux-sparc-low.c (tdesc_sparc64): Declare.
10435 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10436 Adjust.
10437 (sparc_arch_setup): New function.
10438 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10439 (the_low_target): Adjust.
10440 (initialize_low_arch): New function.
10441 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10442 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10443 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10444 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10445 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10446 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10447 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10448 (tdesc_powerpc_isa205_vsx64l): Declare.
10449 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10450 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10451 (ppc_set_pc, ppc_get_hwcap): Adjust.
10452 (ppc_usrregs_info): Forward declare.
10453 (!__powerpc64__) ppc_regmap_adjusted: New global.
10454 (ppc_arch_setup): Adjust to the current process'es target
10455 description.
10456 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10457 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10458 (ppc_store_evrregset): Adjust.
10459 (target_regsets): Rename to ...
10460 (ppc_regsets): ... this, and make static.
10461 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10462 (ppc_regs_info): New function.
10463 (the_low_target): Adjust.
10464 (initialize_low_arch): New function.
10465 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10466 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10467 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10468 (tdesc_s390x_linux64v2): Declare.
10469 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10470 (s390_fill_gregset, s390_store_last_break): Adjust.
10471 (target_regsets): Rename to ...
10472 (s390_regsets): ... this, and make static.
10473 (s390_get_pc, s390_set_pc): Adjust.
10474 (s390_get_hwcap): New target_desc parameter, and use it.
10475 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10476 (s390_arch_setup): Adjust to set the current process'es target
10477 description. Don't adjust the regmap.
10478 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10479 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10480 (regs_info_3264): New globals.
10481 (s390_regs_info): New function.
10482 (the_low_target): Adjust.
10483 (initialize_low_arch): New function.
10484 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10485 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10486 [__mips64] (init_registers_mips_linux)
10487 (init_registers_mips_dsp_linux): Delete defines.
10488 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10489 (have_dsp): New global.
10490 (mips_read_description): New, based on mips_arch_setup.
10491 (mips_arch_setup): Reimplement.
10492 (get_usrregs_info): New function.
10493 (mips_cannot_fetch_register, mips_cannot_store_register)
10494 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10495 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10496 (target_regsets): Rename to ...
10497 (mips_regsets): ... this, and make static.
10498 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10499 (dsp_regs_info, regs_info): New globals.
10500 (mips_regs_info): New function.
10501 (the_low_target): Adjust.
10502 (initialize_low_arch): New function.
10503 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10504 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10505 Declare.
10506 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10507 (arm_read_description): New, with bits factored from
10508 arm_arch_setup.
10509 (arm_arch_setup): Reimplement.
10510 (target_regsets): Rename to ...
10511 (arm_regsets): ... this, and make static.
10512 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10513 (arm_regs_info): New function.
10514 (the_low_target): Adjust.
10515 (initialize_low_arch): New function.
10516 * linux-m68k-low.c (tdesc_m68k): Declare.
10517 (target_regsets): Rename to ...
10518 (m68k_regsets): ... this, and make static.
10519 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10520 (m68k_regs_info): New function.
10521 (m68k_arch_setup): New function.
10522 (the_low_target): Adjust.
10523 (initialize_low_arch): New function.
10524 * linux-sh-low.c (tdesc_sharch): Declare.
10525 (target_regsets): Rename to ...
10526 (sh_regsets): ... this, and make static.
10527 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10528 (sh_regs_info, sh_arch_setup): New functions.
10529 (the_low_target): Adjust.
10530 (initialize_low_arch): New function.
10531 * linux-bfin-low.c (tdesc_bfin): Declare.
10532 (bfin_arch_setup): New function.
10533 (bfin_usrregs_info, regs_info): New globals.
10534 (bfin_regs_info): New function.
10535 (the_low_target): Adjust.
10536 (initialize_low_arch): New function.
10537 * linux-cris-low.c (tdesc_cris): Declare.
10538 (cris_arch_setup): New function.
10539 (cris_usrregs_info, regs_info): New globals.
10540 (cris_regs_info): New function.
10541 (the_low_target): Adjust.
10542 (initialize_low_arch): New function.
10543 * linux-cris-low.c (tdesc_crisv32): Declare.
10544 (cris_arch_setup): New function.
10545 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10546 (cris_regs_info): New function.
10547 (the_low_target): Adjust.
10548 (initialize_low_arch): New function.
10549 * linux-m32r-low.c (tdesc_m32r): Declare.
10550 (m32r_arch_setup): New function.
10551 (m32r_usrregs_info, regs_info): New globals.
10552 (m32r_regs_info): Adjust.
10553 (initialize_low_arch): New function.
10554 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10555 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10556 (tic6x_usrregs_info): Forward declare.
10557 (tic6x_read_description): New function, based on ...
10558 (tic6x_arch_setup): ... this. Reimplement.
10559 (target_regsets): Rename to ...
10560 (tic6x_regsets): ... this, and make static.
10561 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10562 (tic6x_regs_info): New function.
10563 (the_low_target): Adjust.
10564 (initialize_low_arch): New function.
10565 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10566 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10567 (target_regsets): Rename to ...
10568 (xtensa_regsets): ... this, and make static.
10569 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10570 globals.
10571 (xtensa_arch_setup, xtensa_regs_info): New functions.
10572 (the_low_target): Adjust.
10573 (initialize_low_arch): New function.
10574 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10575 (nios2_arch_setup): Set the current process'es tdesc.
10576 (target_regsets): Rename to ...
10577 (nios2_regsets): ... this.
10578 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10579 (nios2_regs_info): New function.
10580 (the_low_target): Adjust.
10581 (initialize_low_arch): New function.
a261b8f5
PA
10582 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10583 (aarch64_arch_setup): Set the current process'es tdesc.
10584 (target_regsets): Rename to ...
10585 (aarch64_regsets): ... this.
10586 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10587 (aarch64_regs_info): New function.
10588 (the_low_target): Adjust.
10589 (initialize_low_arch): New function.
3aee8918
PA
10590 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10591 globals.
10592 (target_regsets): Rename to ...
10593 (tile_regsets): ... this.
10594 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10595 (tile_regs_info): New function.
10596 (tile_arch_setup): Set the current process'es tdesc.
10597 (the_low_target): Adjust.
10598 (initialize_low_arch): New function.
10599 * spu-low.c (tdesc_spu): Declare.
10600 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10601 * win32-arm-low.c (tdesc_arm): Declare.
10602 (arm_arch_setup): New function.
10603 (the_low_target): Install arm_arch_setup instead of
10604 init_registers_arm.
10605 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10606 (init_windows_x86): Rename to ...
10607 (i386_arch_setup): ... this. Set `win32_tdesc'.
10608 (the_low_target): Adjust.
10609 * win32-low.c (win32_tdesc): New global.
10610 (child_add_thread): Don't create the thread cache here.
10611 (do_initial_child_stuff): Set the new process'es tdesc.
10612 * win32-low.h (struct target_desc): Forward declare.
10613 (win32_tdesc): Declare.
10614 * lynx-i386-low.c (tdesc_i386): Declare global.
10615 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10616 * lynx-low.c (lynx_tdesc): New global.
10617 (lynx_add_process): Set the new process'es tdesc.
10618 * lynx-low.h (struct target_desc): Forward declare.
10619 (lynx_tdesc): Declare global.
10620 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10621 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10622 * nto-low.c (nto_tdesc): New global.
10623 (do_attach): Set the new process'es tdesc.
10624 * nto-low.h (struct target_desc): Forward declare.
10625 (nto_tdesc): Declare.
10626 * nto-x86-low.c (tdesc_i386): Declare.
10627 (nto_x86_arch_setup): Set `nto_tdesc'.
10628
b1fbec62
GB
106292013-06-04 Gary Benson <gbenson@redhat.com>
10630
10631 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10632 to qSupported response when appropriate.
10633 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10634 with nonzero-length annex.
10635 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10636 arguments supplied in annex.
10637
d1ec4ce7
DE
106382013-05-31 Doug Evans <dje@google.com>
10639
ac44adcb 10640 PR server/15594
d1ec4ce7
DE
10641 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10642 64 bits in 64-cross-32 environment.
10643
9b25f2d3
PA
106442013-05-28 Pedro Alves <palves@redhat.com>
10645
10646 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10647 (aarch64-without-fpu.c): Delete rule.
10648 * configure.srv (aarch64*-*-linux*): Remove references to
10649 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10650 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10651 declaration.
10652
6740dc9c
PA
106532013-05-24 Pedro Alves <palves@redhat.com>
10654
10655 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10656 instead of strchr/decode_address. Error if the range isn't split
10657 with a ','. Don't assume there's be a ':' in the action.
10658
c2d6af84
PA
106592013-05-23 Yao Qi <yao@codesourcery.com>
10660 Pedro Alves <palves@redhat.com>
10661
10662 * linux-low.c (lwp_in_step_range): New function.
10663 (linux_wait_1): If the thread was range stepping and stopped
10664 outside the stepping range, report the stop to GDB. Otherwise,
10665 continue stepping. Add range stepping debug output.
10666 (linux_set_resume_request): Copy the step range from the resume
10667 request to the lwp.
10668 (linux_supports_range_stepping): New.
10669 (linux_target_ops) <supports_range_stepping>: Set to
10670 linux_supports_range_stepping.
10671 * linux-low.h (struct linux_target_ops)
10672 <supports_range_stepping>: New field.
10673 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10674 * linux-x86-low.c (x86_supports_range_stepping): New.
10675 (the_low_target) <supports_range_stepping>: Set to
10676 x86_supports_range_stepping.
10677 * server.c (handle_v_cont): Handle 'r' action.
10678 (handle_v_requests): Append ";r" if the target supports range
10679 stepping.
10680 * target.h (struct thread_resume) <step_range_start,
10681 step_range_end>: New fields.
10682 (struct target_ops) <supports_range_stepping>:
10683 New field.
10684 (target_supports_range_stepping): New macro.
10685
58794e1a
JB
106862013-05-17 Joel Brobecker <brobecker@adacore.com>
10687
10688 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10689 confusion in comment.
10690
d631c5a7
JB
106912013-05-17 Joel Brobecker <brobecker@adacore.com>
10692
10693 * lynx-low.c (struct process_info_private): New type.
10694 (lynx_add_process): New function.
10695 (lynx_create_inferior, lynx_attach): Replace calls to
10696 add_process by calls to lynx_add_process.
10697 (lynx_resume): If PTID is null, then try using
10698 current_process()->private->last_wait_event_ptid.
10699 Add comments.
10700 (lynx_clear_inferiors): Delete. The contents of that function
10701 has been inlined in lynx_mourn;
10702 (lynx_wait_1): Save the ptid in the process's private data.
10703 (lynx_mourn): Free the process' private data. Replace call
10704 to lynx_clear_inferiors by call to clear_inferiors.
10705
96f7a20f
YQ
107062013-05-17 Yao Qi <yao@codesourcery.com>
10707
10708 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10709 the right place.
10710
db0dfaa0
LM
107112013-05-16 Luis Machado <lgustavo@codesourcery.com>
10712
10713 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10714 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10715 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10716 PT_TEXT_END_ADDR guards. Update comments.
10717 (linux_target_op) <read_offsets>: Conditionally define to
10718 linux_read_offsets if the target is UCLIBC and if it defines
10719 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10720
68f5f838
SL
107212013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10722 Andrew Jenner <andrew@codesourcery.com>
10723
10724 * Makefile.in (SFILES): Add linux-nios2-low.c.
10725 (clean): Add action to delete nios2-linux.c.
10726 (nios2-linux.c): New rule.
10727 * configure.srv: Add nios2*-*-linux*.
10728 * linux-nios2-low.c: New.
10729
1ebff1fd
HAQ
107302013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10731
10732 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10733
f6150862
HZ
107342013-04-25 Hui Zhu <hui@codesourcery.com>
10735
10736 PR gdb/15186
f6150862
HZ
10737 * ax.c (ax_printf): Add fflush.
10738
614c279d
TT
107392013-04-22 Tom Tromey <tromey@redhat.com>
10740
10741 * Makefile.in (SFILES): Add filestuff.c.
10742 (OBS): Add filestuff.o.
10743 (filestuff.o): New target.
10744 * config.in, configure: Rebuild.
10745 * configure.ac: Check for fdwalk, pipe2.
10746
7d4e5717
PA
107472013-04-17 Pedro Alves <palves@redhat.com>
10748
10749 * configure.ac (USE_THREAD_DB): Delete variable.
10750 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10751 Don't AC_SUBST USE_THREAD_DB.
10752 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10753 * config.in, configure: Regenerate.
10754
d5c93e41
PA
107552013-04-16 Pedro Alves <palves@redhat.com>
10756
10757 * linux-low.h (struct lwp_info) <thread_known>: Move under
10758 the USE_THREAD_DB #ifdef.
10759
04f5fe89
PA
107602013-04-16 Pedro Alves <palves@redhat.com>
10761
10762 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10763 (linux-low.o): Delete rule.
10764 * linux-low.h: Always include "gdb_thread_db.h" instead of
10765 conditionally including thread_db.h.
10766 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10767 HAVE_THREAD_DB_H.
10768
480b27bf
JK
107692013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10770
10771 * Makefile.in (install-only): Fix make install regression.
10772
43662968
JK
107732013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10774
10775 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10776 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10777 installation.
10778 * gdbserver.1: Remove.
10779
3e74e146
PA
107802013-03-22 Pedro Alves <palves@redhat.com>
10781
10782 * linux-low.c (handle_extended_wait): Don't call
10783 linux_enable_event_reporting.
10784
a8347a2a
TT
107852013-03-15 Tony Theodore <tonyt@logyst.com>
10786
10787 PR build/9098:
10788 * Makefile.in (SHELL): Use @SHELL@.
10789
eeb56fa7
SDJ
107902013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10791
10792 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10793 compiler warning.
10794
4fa7e2ff
JB
107952013-03-13 Joel Brobecker <brobecker@adacore.com>
10796
10797 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10798 Remove extraneous NULL element.
10799
8ddb1965
YQ
108002013-03-13 Yao Qi <yao@codesourcery.com>
10801
10802 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10803 'V' block in trace frame.
10804
9accd112
MM
108052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10806
10807 * target.h (struct target_ops): Add btrace ops.
10808 (target_supports_btrace): New macro.
10809 (target_enable_btrace): New macro.
10810 (target_disable_btrace): New macro.
10811 (target_read_btrace): New macro.
10812 * gdbthread.h (struct thread_info): Add btrace field.
10813 * server.c: Include btrace-common.h.
10814 (handle_btrace_general_set): New function.
10815 (handle_btrace_enable): New function.
10816 (handle_btrace_disable): New function.
10817 (handle_general_set): Call handle_btrace_general_set.
10818 (handle_qxfer_btrace): New function.
10819 (struct qxfer qxfer_packets[]): Add btrace entry.
10820 * inferiors.c (remove_thread): Disable btrace.
10821 * linux-low: Include linux-btrace.h.
10822 (linux_low_enable_btrace): New function.
10823 (linux_low_read_btrace): New function.
10824 (linux_target_ops): Add btrace ops.
10825 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10826 Add srv_linux_btrace=yes.
10827 (x86_64-*-linux*): Add linux-btrace.o.
10828 Add srv_linux_btrace=yes.
10829 * configure.ac: Define HAVE_LINUX_BTRACE.
10830 * config.in: Regenerated.
10831 * configure: Regenerated.
10832
5cc22e4c
MM
108332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10834
10835 * server.c (handle_qxfer): Preserve error message if -3 is
10836 returned.
10837 (qxfer): Document the -3 return value.
10838
7c97f91e
MM
108392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10840
10841 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10842 (linux_btrace_h): New variable.
10843 (linux-btrace.o): New rule.
10844
be9a119c 108452013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10846 Hafiz Abid Qadeer <abidh@codesourcery.com>
10847
10848 * tracepoint.c (trace_buffer_size): New global.
10849 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10850 (init_trace_buffer): Change to one-argument function. Allocate
10851 trace buffer memory.
10852 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10853 handle QTBuffer:size packet.
10854 (cmd_bigqtbuffer_size): New function.
10855 (initialize_tracepoint): Call init_trace_buffer with
10856 DEFAULT_TRACE_BUFFER_SIZE.
10857 * server.c (handle_query): Add QTBuffer:size in the
10858 supported packets.
10859
e64f7499
YQ
108602013-03-07 Yao Qi <yao@codesourcery.com>
10861
10862 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10863 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10864 of -1.
10865 (cmd_qtsp): Adjust condition. Do post increment.
10866 Set cur_action and cur_step_action back to 0.
10867
f0ae6fc3
PA
108682013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10869
10870 PR server/15236
10871 * linux-low.c (linux_write_memory): Return early success if LEN is
10872 zero.
10873
b5b0b0af
CV
108742013-03-05 Corinna Vinschen <vinschen@redhat.de>
10875
334ad4a8 10876 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10877
589bc927
TT
108782013-02-28 Tom Tromey <tromey@redhat.com>
10879
10880 * configure.ac: Invoke AC_SYS_LARGEFILE.
10881 * configure, config.in: Rebuild.
10882
dfe07582
CV
108832013-02-28 Corinna Vinschen <vinschen@redhat.com>
10884
10885 * win32-low.c: Throughout, fix format strings and casts of
10886 printf-like functions to avoid type related warnings on all
10887 platforms.
10888 (get_child_debug_event): Print dwDebugEventCode as hex since
10889 that's how it's usually documented.
10890
736cd585
YQ
108912013-02-28 Yao Qi <yao@codesourcery.com>
10892
10893 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10894 pulongest.
10895
e1f58301
JW
108962013-02-27 Jiong Wang <jiwang@tilera.com>
10897
10898 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10899 (reg-tilegx32.c): New rule.
10900 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10901 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10902 different register info initializer according to elf class.
10903 (init_registers_tilgx32): New function. The tilegx32 register info
10904 initializer.
10905 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10906 (tile_store_gregset): Likewise.
10907
d171ca78
YQ
109082013-02-27 Yao Qi <yao@codesourcery.com>
10909
10910 * server.c (process_point_options): Print debug message when
10911 debug_threads is true.
10912
282bbdf3
YQ
109132013-02-26 Yao Qi <yao@codesourcery.com>
10914
10915 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10916
aca22551
PA
109172013-02-19 Pedro Alves <palves@redhat.com>
10918 Kai Tietz <ktietz@redhat.com>
10919
10920 PR gdb/15161
10921
10922 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10923 instead of strtoul to extract address from packet.
10924 (process_serial_event) <'z'>: Likewise.
10925
4f3cee1c
YQ
109262013-02-18 Yao Qi <yao@codesourcery.com>
10927
10928 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10929
8e1d55a3
PA
109302013-02-14 Pedro Alves <palves@redhat.com>
10931
10932 Plug memory leak.
10933
10934 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10935 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10936
458820da
PA
109372013-02-14 Pedro Alves <palves@redhat.com>
10938
10939 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10940
baea0dae
PA
109412013-02-14 Pedro Alves <palves@redhat.com>
10942
10943 * tracepoint.c (save_string): Delete.
10944 (add_tracepoint_action): Use savestring instead of save_string.
10945
0b1afbb3
PA
109462013-02-12 Pedro Alves <palves@redhat.com>
10947
10948 * linux-xtensa-low.c: Ditto.
10949 * xtensa-xtregs.c: Ditto.
10950
8a4ac37e
PA
109512013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10952
10953 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10954 thread_db.
10955
148de6bb
MS
109562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10957
10958 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10959 aarch64_num_wp_regs and aarch64_num_bp_regs to
10960 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10961
55fac6e0
MS
109622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10963
10964 * linux-aarch64-low.c (ps_get_thread_area): Replace
10965 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10966
176eb98c
MS
109672013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10968 Marcus Shawcroft <marcus.shawcroft@arm.com>
10969 Nigel Stephens <nigel.stephens@arm.com>
10970 Yufeng Zhang <yufeng.zhang@arm.com>
10971
10972 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10973 (aarch64.c, aarch64-without-fpu.c): New targets.
10974 * configure.srv (aarch64*-*-linux*): New.
10975 * linux-aarch64-low.c: New file.
10976
56f7af9c
MS
109772013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10978
43aaf8b6 10979 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10980 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10981 (dequeue_one_deferred_signal, linux_resume_one_thread)
10982 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10983 (linux_tracefork_grandchild, linux_test_for_tracefork)
10984 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10985 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10986 where the argument is 0.
10987
60f662b0
YQ
109882013-01-25 Yao Qi <yao@codesourcery.com>
10989
10990 * event-loop.c: Include "queue.h".
10991 (gdb_event_p): New typedef.
10992 (struct gdb_event) <next_event>: Remove.
10993 (event_queue): Change to QUEUE(gdb_event_p).
10994 (async_queue_event): Remove.
10995 (gdb_event_xfree): New.
10996 (initialize_event_loop): New.
10997 (process_event): Use API from QUEUE.
10998 (wait_for_event): Likewise.
10999 * server.c (main): Call initialize_event_loop.
11000 * server.h (initialize_event_loop): Declare.
11001
5ae4861a
YQ
110022013-01-18 Yao Qi <yao@codesourcery.com>
11003
11004 * ax.h (struct eval_agent_expr_context): New.
11005 (gdb_eval_agent_expr): Update declaration.
11006 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11007 TFRAME. Add new argument CTX.
11008 * server.h (struct eval_agent_expr_context): Declare.
11009 (agent_mem_read, agent_tsv_read): Update declaration.
11010 (agent_mem_read_string): Likewise.
11011 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11012 (add_traceframe_block): Add new argument TPOINT.
11013 Increase TPOINT->traceframe_usage.
11014 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11015 eval_tracepoint_agent_expr.
11016 (condition_true_at_tracepoint): Likewise.
11017 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11018 (agent_mem_read_string, agent_tsv_read): Likewise.
11019
85e00e85
YQ
110202013-01-16 Yao Qi <yao@codesourcery.com>
11021
11022 * linux-low.c (linux_resume_one_lwp): Don't check
11023 'lwp->bp_reinsert != 0'.
11024
4039cf45
JB
110252013-01-07 Joel Brobecker <brobecker@adacore.com>
11026 Pedro Alves <palves@redhat.com>
11027
11028 * lynx-low.c (ptrace_request_to_str): Define a temporary
11029 macro and use it to simplify this function's implementation.
11030
9044dee2
JB
110312013-01-07 Joel Brobecker <brobecker@adacore.com>
11032
11033 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11034 sets errno.
11035
e6352c8f
JB
110362013-01-07 Joel Brobecker <brobecker@adacore.com>
11037
11038 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11039
50681a27
JB
110402013-01-07 Joel Brobecker <brobecker@adacore.com>
11041
11042 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11043
3f6e77ef
JB
110442013-01-07 Joel Brobecker <brobecker@adacore.com>
11045
11046 * lynx-low.c (lynx_resume): Use the resume_info parameter
11047 to determine the ptid for the lynx_ptrace call, unless
11048 it is equal to minus_one_ptid, in which case we use the
11049 ptid of the current_inferior.
11050 (lynx_wait_1): After having received a thread create/exit
11051 event, resume the inferior's execution using the signaling
11052 thread's ptid, rather than the old ptid.
11053
7fda33ae
JB
110542013-01-07 Joel Brobecker <brobecker@adacore.com>
11055
11056 * lynx-low.c (lynx_resume): Delete variable ret.
11057
b9786c74
JB
110582013-01-01 Joel Brobecker <brobecker@adacore.com>
11059
11060 * gdbreplay.c (gdbreplay_version): Update copyright year.
11061 * server.c (gdbserver_version): Likewise.
11062
8b93d60f
JB
110632012-12-17 Joel Brobecker <brobecker@adacore.com>
11064
11065 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11066 new thread.
11067
037335a7
JB
110682012-12-17 Joel Brobecker <brobecker@adacore.com>
11069
11070 * lynx-low.c (ptrace_request_to_str): Add handling for
11071 PTRACE_GETTRACESIG.
11072
52d4cbd8
JB
110732012-12-17 Joel Brobecker <brobecker@adacore.com>
11074
11075 * lynx-low.c (lynx_attach): Delete variable new_process.
11076
ab8f6ca9
JB
110772012-12-17 Joel Brobecker <brobecker@adacore.com>
11078
11079 * lynx-low.c (lynx_create_inferior): Delete variable
11080 new_process.
11081
78cbc024
JB
110822012-12-17 Joel Brobecker <brobecker@adacore.com>
11083
11084 * lynx-low.c (ptrace_request_to_str): Do not handle
11085 PTRACE_GETTHREADLIST if this macro does not exist.
11086
14a00470
YQ
110872012-12-15 Yao Qi <yao@codesourcery.com>
11088
11089 * Makefile.in (OBS): Add notif.o.
11090 * notif.c, notif.h: New.
11091 * server.c: Include "notif.h".
11092 (struct vstop_notif) <next>: Remove.
11093 <base>: New field.
11094 (queue_stop_reply): Update.
11095 (push_event, send_next_stop_reply): Remove.
11096 (discard_queued_stop_replies): Update.
11097 (notif_stop): New variable.
11098 (handle_v_stopped): Remove.
11099 (handle_v_requests): Don't call handle_v_stopped. Call
11100 handle_ack_notif instead.
11101 (queue_stop_reply_callback): Call notif_event_enque instead
11102 of queue_stop_reply.
11103 (handle_status): Don't call send_next_stop_reply, call
11104 notif_write_event instead.
11105 (kill_inferior_callback): Likewise.
11106 (detach_or_kill_inferior_callback): Likewise.
11107 (main): Call initialize_notif.
11108 (process_serial_event): Call QUEUE_is_empty.
11109 (handle_target_event): Call notif_push instead of push event.
11110 * server.h (push_event): Remove declaration.
11111
61c125b9
TT
111122012-12-10 Tom Tromey <tromey@redhat.com>
11113
11114 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11115 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11116 macros.
11117 (.c.o): Rewrite.
11118 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11119 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11120 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11121 (amd64-linux-ipa.o, ax.o): Rewrite.
11122 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11123 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11124 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11125 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11126 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11127 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11128 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11129 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11130 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11131 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11132 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11133 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11134 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11135 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11136 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11137 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11138 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11139 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11140 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11141 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11142 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11143 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11144 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11145 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11146 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11147 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11148 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11149 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11150 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11151 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11152 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11153 (reg-tilegx.o): Remove.
11154 (all_object_files): New macro.
11155 Include .deps files.
11156 * aclocal.m4, configure: Rebuild.
11157 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11158 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11159 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11160
e90e9ad9
TT
111612012-12-05 Tom Tromey <tromey@redhat.com>
11162
11163 PR gdb/14917:
11164 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11165
02d403bf 111662012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11167
11168 * configure.ac: Check for linux/perf_event.h.
11169 * config.in: Regenerated.
11170 * configure: Regenerated.
11171
0270a750
PA
111722012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11173
11174 * hostio.c (handle_readlink): Decrease buffer size
11175 parameter passed to readlink by one byte.
11176
8c29b58e
YQ
111772012-11-26 Yao Qi <yao@codesourcery.com>
11178
11179 * configure.ac (build_warnings): Append '-Wempty-body'.
11180 * configure: Regenerated.
11181 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11182 body.
11183
8bdce1ff
PM
111842012-11-15 Pierre Muller <muller@sourceware.org>
11185
11186 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11187 * config.in: Regenerate.
11188 * configure: Regenerate.
11189 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11190 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11191 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11192 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11193 header.
11194 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11195 instead of <sys/wait.h> header.
11196 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11197
02d403bf 111982012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11199
11200 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11201 (various make rules): Remove -DGDBSERVER
11202
fbd5db48
YQ
112032012-11-09 Yao Qi <yao@codesourcery.com>
11204
11205 * spu-low.c (current_ptid): Move it to ..
11206 * gdbthread.h: ... here. New.
11207 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11208 * server.c (myresume, process_serial_event): Likewise.
11209 * thread-db.c (thread_db_find_new_threads): Likewise.
11210 * tracepoint.c (run_inferior_command): Likewise.
11211
b3dc46ff
AB
112122012-10-01 Andrew Burgess <aburgess@broadcom.com>
11213
11214 * server.c (handle_search_memory_1): Include access length in
11215 warning message.
11216
07c04788
HPN
112172012-09-05 Michael Brandt <michael.brandt@axis.com>
11218
11219 * linux-crisv32-low.c: Fix compile errors.
11220
918d227b
YQ
112212012-09-04 Yao Qi <yao@codesourcery.com>
11222
11223 * tracepoint.c (cmd_qtsv): Adjust debug message.
11224 Don't check CUR_TPOINT.
11225
18c1b81a
YQ
112262012-08-28 Yao Qi <yao@codesourcery.com>
11227
11228 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11229 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11230 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11231 Remove declarations of xmalloc, xreallloc, xstrdup and
11232 freeargv.
11233 * Makefile.in (libiberty_h): New.
11234 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11235 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11236
dc82f37b
YQ
112372012-08-23 Yao Qi <yao@codesourcery.com>
11238
11239 * server.h: Remove declaration of 'xsnprintf'.
11240
406b1477
KS
112412012-08-22 Keith Seitz <keiths@redhat.com>
11242
11243 * server.h: Include build-gnulib-gbserver/config.h.
11244 * gdbreplay.c: Likewise.
11245
e6712ff1
DE
112462012-08-08 Doug Evans <dje@google.com>
11247
11248 * Makefile.in (SFILES): Add gdb_vecs.c.
11249 (OBS): Add gdb_vecs.o.
11250 (gdb_vecs_h, host_defs_h): New variables.
11251 (thread-db.o): Add $(gdb_vecs_h) dependency.
11252 (gdb_vecs.o): New rule.
11253 * thread-db.c: #include "gdb_vecs.h".
11254 (thread_db_load_search): Use a vector to iterate over path elements.
11255 Handle text appearing after "$pdir".
11256
11257 * configure.ac: Add check for strstr.
11258 * config.in: Regenerate.
11259 * configure: Regenerate.
11260
7c3270ae
UW
112612012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11262
11263 * hostio.c (handle_pread): If pread fails, fall back to attempting
11264 lseek/read.
11265 (handle_pwrite): Likewise for pwrite.
11266
b62e2b27
UW
112672012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11268
11269 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11270 between unsupported TYPE and unimplementable ADDR/LEN combination.
11271 (arm_insert_point): Act on new return value.
11272
78a99e91
PA
112732012-07-31 Pedro Alves <palves@redhat.com>
11274
11275 * server.c (process_point_options): Only skip tokens if we find
11276 one that is unrecognized. Don't treat 'X' specially while
11277 skipping unrecognized tokens.
11278
fcf303ab
UW
112792012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11280
11281 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11282 to 4-byte-align HW breakpoint addresses for Thumb.
11283
7255706c
YQ
112842012-07-27 Yao Qi <yao@codesourcery.com>
11285
11286 PR remote/14161.
11287
11288 * server.h: Declare gdb_agent_about_to_close.
11289 * target.c (kill_inferior): Include "agent.h".
11290 New. Send command 'kill'.
11291 * target.h (kill_inferior): Removed macro.
11292 * tracepoint.c (gdb_agent_about_to_close): New.
11293 (gdb_agent_helper_thread): Handle command 'close'.
11294 Wait endlessly until the inferior stops.
11295 Install gdb_agent_remove_socket to atexit hook.
11296 (agent_socket_name): New static variable.
11297 (gdb_agent_socket_init): Replace local variable 'name' with
11298 'agent_socket_name'.
11299 (gdb_agent_remove_socket): New.
11300
5a3f286f
YQ
113012012-07-27 Yao Qi <yao@codesourcery.com>
11302
11303 * server.c (process_point_options): Stop at 'X' when parsing.
11304
961bd387
ME
113052012-07-19 Michael Eager <eager@eagercon.com>
11306
a261b8f5 11307 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11308 to hw_execute.
11309 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11310 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11311 hardware breakpoint.
11312
aa7c7447
JK
113132012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11314
11315 * gdbserver/linux-low.c (initialize_low): Call
11316 linux_ptrace_init_warnings.
11317
7f216e7c
DE
113182012-07-02 Doug Evans <dje@google.com>
11319
11320 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11321 pointer to int.
11322
d3ce09f5
SS
113232012-07-02 Stan Shebs <stan@codesourcery.com>
11324
11325 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11326 (ax.o): Add it to build rule.
11327 (ax-ipa.o): Ditto.
11328 (OBS): Add format.o.
11329 (IPA_OBS): Add format.o.
11330 * server.c (handle_query): Claim support for breakpoint commands.
11331 (process_point_options): Add command case.
11332 (process_serial_event): Leave running if there are printfs in
11333 effect.
11334 * mem-break.h (any_persistent_commands): Declare.
11335 (add_breakpoint_commands): Declare.
11336 (gdb_no_commands_at_breakpoint): Declare.
11337 (run_breakpoint_commands): Declare.
11338 * mem-break.c (struct point_command_list): New struct.
11339 (struct breakpoint): New field command_list.
11340 (any_persistent_commands): New function.
11341 (add_commands_to_breakpoint): New function.
11342 (add_breakpoint_commands): New function.
11343 (gdb_no_commands_at_breakpoint): New function.
11344 (run_breakpoint_commands): New function.
11345 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11346 locally.
11347 * ax.c: Include format.h.
11348 (ax_printf): New function.
11349 (gdb_eval_agent_expr): Add printf opcode.
11350
2f8f6aed
YQ
113512012-06-13 Yao Qi <yao@codesourcery.com>
11352
11353 * server.c (start_inferior): Remove duplicated writes to fields
11354 'last_resume_kind' and 'last_status' of 'current_inferior'.
11355
0c9070b3
YQ
113562012-06-12 Yao Qi <yao@codesourcery.com>
11357 Pedro Alves <palves@redhat.com>
11358
11359 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11360 comment.
11361 * server.c (handle_v_cont): Extend comment.
11362
c52daf70
YQ
113632012-06-11 Yao Qi <yao@codesourcery.com>
11364
11365 * linux-low.c (linux_attach): Add 'static'.
11366
d38bbb0a
YQ
113672012-06-06 Yao Qi <yao@codesourcery.com>
11368
11369 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11370
89dc0afd
JK
113712012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11372
11373 Fix gcc -flto compilation warning.
11374 * server.c (main): Make variable multi_mode and attach volatile.
11375
75f62ce7
TJB
113762012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11377
11378 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11379 if the platform doesn't know about it.
11380
65f479b6
PA
113812012-05-30 Jeff Kenton <jkenton@tilera.com>
11382
11383 * Makefile.in (SFILES): Add linux-tile-low.c.
11384 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11385 * configure.srv: Handle tilegx-*-linux*.
11386 * linux-tile-low.c: New file.
11387
0c5bf5a9
JK
113882012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11389
11390 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11391
a493e3e2
PA
113922012-05-24 Pedro Alves <palves@redhat.com>
11393
11394 PR gdb/7205
11395
43aaf8b6 11396 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11397
2ea28649
PA
113982012-05-24 Pedro Alves <palves@redhat.com>
11399
11400 PR gdb/7205
11401
11402 Replace target_signal with gdb_signal throughout.
11403
8d409d16
MR
114042012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11405
11406 * linux-low.c (linux_store_registers): Avoid the copying sequence
11407 when no data has been retrieved by ptrace.
11408
23512c01
MGD
114092012-05-22 Will Deacon <will.deacon@arm.com>
11410
11411 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11412 Include asm/ptrace.h.
11413 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11414 already defined.
11415
4934b29e
MR
114162012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11417
11418 * linux-low.c (linux_store_registers): Don't re-retrieve data
11419 with ptrace that has already been obtained from /proc. Always
11420 copy any data retrieved with ptrace to the buffer supplied.
11421
bde24c0a
PA
114222012-05-11 Yao Qi <yao@codesourcery.com>
11423 Pedro Alves <palves@redhat.com>
11424
11425 * linux-low.c (enum stopping_threads_kind): New.
11426 (stopping_threads): Change type to `enum stopping_threads_kind'.
11427 (handle_extended_wait): If stopping and suspending threads, leave
11428 the new_lwp suspended too.
11429 (linux_wait_for_event): Adjust.
11430 (stop_all_lwps): Set `stopping_threads' to
11431 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11432 whether we're suspending threads or just stopping them. Assert no
11433 recursion happens.
11434
623b6bdf
YQ
114352012-04-29 Yao Qi <yao@codesourcery.com>
11436
11437 * server.h: Move some code to ...
11438 * gdbthread.h: ... here. New.
11439 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11440 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11441 (nto-low.o, win32-low.o): Likewise.
11442 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11443 * regcache.c, remote-utils.c, server.c: Likewise.
11444 * target.c, tracepoint.c, win32-low.c: Likewise.
11445
f15f9948
TJB
114462012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11447
11448 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11449 (PTRACE_ARG4_TYPE): Likewise.
11450 (PTRACE_XFER_TYPE): Likewise.
11451 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11452 ptrace to PTRACE_ARG3_TYPE.
11453 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11454 (PTRACE_ARG4_TYPE): Likewise.
11455 (PTRACE_XFER_TYPE): Likewise.
11456 (linux_detach_one_lwp): Cast fourth argument of
11457 ptrace to long then PTRACE_ARG4_TYPE.
11458 (regsets_fetch_inferior_registers): Cast third argument of
11459 ptrace to long then PTRACE_ARG3_TYPE.
11460 (regsets_store_inferior_registers): Likewise.
11461
38ea300a
PA
114622012-04-20 Pedro Alves <palves@redhat.com>
11463
11464 * configure: Regenerate.
11465
c971b7fa
PA
114662012-04-19 Pedro Alves <palves@redhat.com>
11467
43aaf8b6 11468 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11469 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11470 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11471 (all, install-only, uninstall, clean-info, all-lib, clean): No
11472 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11473 (maintainer-clean realclean distclean): Use subdir_do.
11474 (subdir_do): New.
11475 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11476 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11477 * acinclude.m4: Include acx_configure_dir.m4.
11478 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11479 calls. Call AC_PROG_RANLIB. Configure gnulib using
11480 ACX_CONFIGURE_DIR.
11481 (GNULIB): New.
11482 (GNULIB_STDINT_H): Adjust.
11483 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11484 * gdbreplay.c: Include build-gnulib/config.h.
11485 * server.h: Likewise.
11486 * aclocal.m4: Regenerate.
11487 * config.in: Regenerate.
11488 * configure: Regenerate.
c971b7fa 11489
809277f8
PA
114902012-04-19 Pedro Alves <palves@redhat.com>
11491
11492 * Makefile.in (LIBGNU, INCGNU): Adjust.
11493 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11494 (all, install-only, uninstall, clean-info, all-lib, clean)
11495 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11496 * configure.ac: Adjust AC_OUTPUT output.
11497 * aclocal.m4: Regenerate.
11498 * configure: Regenerate.
11499
fd9bb8b8
PA
115002012-04-19 Pedro Alves <palves@redhat.com>
11501
11502 * Makefile.in (generated_files): New.
11503 (server_h): Remove the explicit dependency on config.h, and depend
11504 on $generated_files.
11505
1c298c66
PA
115062012-04-19 Pedro Alves <palves@redhat.com>
11507
11508 * Makefile.in (INCGNU): Add -Ignulib.
11509
57c4b50b
PA
115102012-04-19 Pedro Alves <palves@redhat.com>
11511
11512 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11513 (INCGNU): ... this, and spell out -I here.
11514 (GNULIB_LIB): Rename to ...
11515 (LIBGNU): ... this.
11516 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11517
1030e047
PA
115182012-04-19 Pedro Alves <palves@redhat.com>
11519
11520 * config.in: Regenerate.
11521
447d4319
PA
115222012-04-19 Pedro Alves <palves@redhat.com>
11523
11524 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11525 * server.h (memmem): Remove declaration.
11526 * config.in: Regenerate.
11527 * configure: Regenerate.
11528
aad9eab9
YQ
115292012-04-19 Yao Qi <yao@codesourcery.com>
11530
11531 * Makefile.in (SFILES): Add common/vec.c.
11532 (OBS): Add vec.o.
11533 (vec.o): New rule.
11534
3e10640f
YQ
115352012-04-19 Yao Qi <yao@codesourcery.com>
11536
11537 * remote-utils.c (prepare_resume_reply): Replace with macro
11538 target_core_of_thread.
11539 * server.c (handle_qxfer_threads_proper): Likewise.
11540 * target.h (traget_core_of_thread): New macro.
11541
71622373
PA
115422012-04-18 Pedro Alves <palves@redhat.com>
11543
11544 * aclocal.m4: Regenerate.
11545 * configure: Regenerate.
11546
80d26939
YQ
115472012-04-16 Yao Qi <yao@codesourcery.com>
11548
11549 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11550 duplicated on address.
11551
42476b70
YQ
115522012-04-16 Yao Qi <yao@codesourcery.com>
11553
11554 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11555 (struct tracepoint_action_ops) <send>: New field.
11556 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11557 (agent_expr_send, x_tracepoint_action_send): New.
11558 (l_tracepoint_action_send): New.
11559 (cmd_qtdp): Download and install tracepoint
11560 according to `use_agent'.
11561 (run_inferior_command): Add one more parameter `len'.
11562 Update callers.
11563 (tracepoint_send_agent): New.
11564 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11565
7bc83639
YQ
115662012-04-16 Yao Qi <yao@codesourcery.com>
11567
11568 * tracepoint.c (download_tracepoints): Moved to ...
11569 (cmd_qtstart): ... here.
11570
5f18041e
YQ
115712012-04-14 Yao Qi <yao@codesourcery.com>
11572
11573 * tracepoint.c: Include inttypes.h.
11574 (struct collect_memory_action): Use sized types.
11575 (struct tracepoint): Likewise.
11576 (cmd_qtdp, stop_tracing): Update print specifiers.
11577 (cmd_qtp, response_tracepoint): Likewise.
11578 (collect_data_at_tracepoint): Likewise.
11579 (collect_data_at_step): Likewise.
11580
55a8c076
YQ
115812012-04-14 Yao Qi <yao@codesourcery.com>
11582
11583 Import gnulib module inttypes.
11584 * aclocal.m4, config.in, configure: Regenerated.
11585
dc750257
YQ
115862012-04-14 Yao Qi <yao@codesourcery.com>
11587
11588 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11589 Makefile and config.status at last.
11590
0ab5faf9
YQ
115912012-04-13 Yao Qi <yao@codesourcery.com>
11592
11593 * tracepoint.c: Include stdint.h unconditionally.
11594
18f5fd81
TJB
115952012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11596
11597 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11598 on BFD_HAVE_SYS_PROCFS_TYPE.
11599 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11600 * configure: Regenerate.
11601 * config.in: Likewise.
11602
4d47af5c
L
116032012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11604
11605 * Makefile.in (clean): Also remove x32.c x32-linux.c
11606 x32-avx.c x32-avx-linux.c.
11607 (x32.o): New target.
11608 (x32.c): Likewise.
11609 (x32-linux.o): Likewise.
11610 (x32-linux.c): Likewise.
11611 (x32-avx.o): Likewise.
11612 (x32-avx.c): Likewise.
11613 (x32-avx-linux.o): Likewise.
11614 (x32-avx-linux.c): Likewise.
11615
11616 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11617 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11618 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11619 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11620 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11621 i386/x32-avx-linux.xml.
11622
11623 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11624 (init_registers_x32_avx_linux): Likwise.
11625 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11626 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11627
ecedbe58
PA
116282012-04-13 Pedro Alves <palves@redhat.com>
11629
11630 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11631 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11632 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11633 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11634 the sub-make.
11635
c92b5177
L
116362012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11637
11638 * linux-x86-low.c (compat_x32_clock_t): New.
11639 (compat_x32_siginfo_t): Likewise.
11640 (compat_x32_siginfo_from_siginfo): Likewise.
11641 (siginfo_from_compat_x32_siginfo): Likewise.
11642 (linux_is_elf64): Likewise.
11643 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11644 and siginfo_from_compat_x32_siginfo for x32.
11645 (x86_arch_setup): Set linux_is_elf64.
11646
214d508e
L
116472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11648
11649 PR gdb/13969
11650 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11651 e_machine field.
11652 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11653 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11654 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11655 compatible with process.
11656
c9a1864a
YQ
116572012-04-12 Yao Qi <yao@codesourcery.com>
11658
11659 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11660 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11661 (install-only, install-info, clean): Handle sub dir gnulib.
11662 (all-lib, am--refresh): New targets.
11663 (memmem.o): Remove target.
11664 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11665 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11666 (AC_REPLACE_FUNCS): Remove memmem.
11667 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11668 (AC_OUTPUT): Generate Makefile in gnulib/.
11669 * aclocal.m4, config.in, configure: Regenerated.
11670
367ba2c2
MR
116712012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11672
11673 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11674
9d236627
PA
116752012-04-05 Pedro Alves <palves@redhat.com>
11676
11677 -Werror=strict-aliasing
11678
11679 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11680 pointer.
11681
111217b3
PA
116822012-04-04 Pedro Alves <palves@redhat.com>
11683
11684 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11685 (sparc_store_gregset_from_stack, sparc_store_gregset)
11686 (sparc_breakpoint_at): Fix formatting.
11687
8365dcf5
TJB
116882012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11689
11690 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11691 are available.
11692 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11693 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11694 * config.in: Regenerate.
11695 * configure: Likewise.
11696
689cc2ae
PA
116972012-03-29 Pedro Alves <palves@redhat.com>
11698
11699 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11700 Correct ptrace arguments.
11701
c14dfd32
PA
117022012-03-28 Pedro Alves <palves@redhat.com>
11703
11704 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11705 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11706 (IA64_FR1_REGNUM): New defines.
11707 (ia64_fetch_register): New.
11708 (the_low_target): Install it.
11709 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11710 field.
11711 * linux-low.c (linux_fetch_registers): Try the
11712 the_low_target.fetch_register hook first.
11713
11714 * linux-arm-low.c (the_low_target): Adjust.
11715 * linux-bfin-low.c (the_low_target): Adjust.
11716 * linux-cris-low.c (the_low_target): Adjust.
11717 * linux-crisv32-low.c (the_low_target): Adjust.
11718 * linux-m32r-low.c (the_low_target): Adjust.
11719 * linux-m68k-low.c (the_low_target): Adjust.
11720 * linux-mips-low.c (the_low_target): Adjust.
11721 * linux-ppc-low.c (the_low_target): Adjust.
11722 * linux-s390-low.c (the_low_target): Adjust.
11723 * linux-sh-low.c (the_low_target): Adjust.
11724 * linux-sparc-low.c (the_low_target): Adjust.
11725 * linux-tic6x-low.c (the_low_target): Adjust.
11726 * linux-x86-low.c (the_low_target): Adjust.
11727 * linux-xtensa-low.c (the_low_target): Adjust.
11728
63c88e13
PA
117292012-03-26 Pedro Alves <palves@redhat.com>
11730
11731 * server.c (handle_qxfer_libraries): Don't bail early if
11732 the_target->qxfer_libraries_svr4 is not NULL.
11733
fb723180
PA
117342012-03-26 Pedro Alves <palves@redhat.com>
11735
11736 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11737
0afae3cf
PA
117382012-03-23 Pedro Alves <palves@redhat.com>
11739
11740 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11741 "library-list-svr4" element's start tag when the the DSO list is
11742 empty.
11743
485f1ee4
PA
117442012-03-23 Pedro Alves <palves@redhat.com>
11745
11746 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11747 a variable whose type size is the same as the inferior's pointer
11748 size.
11749
a5362b9a
TS
117502012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11751
11752 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11753 struct siginfo.
11754 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11755 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11756 * linux-low.h: Include <signal.h>.
11757 (struct siginfo): Remove forward declaration.
11758 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11759 struct siginfo.
11760
d226c142
MF
117612012-03-21 Mike Frysinger <vapier@gentoo.org>
11762
11763 * .gitignore: Ignore more files.
11764
122f36ef
PA
117652012-03-19 Pedro Alves <palves@redhat.com>
11766 Jan Kratochvil <jan.kratochvil@redhat.com>
11767
11768 * server.c (cont_thread, general_thread): Add describing comments.
11769 (start_inferior): Clear `cont_thread'.
11770 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11771 of a process.
11772
fc3e5175
YQ
117732012-03-15 Yao Qi <yao@codesourcery.com>
11774
11775 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11776 handling to ...
11777 (cmd_qtdp): ... here.
11778
8d0d92cd
YQ
117792012-03-15 Yao Qi <yao@codesourcery.com>
11780
11781 * tracepoint.c (struct tracepoint_action_ops): New.
11782 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11783 (m_tracepoint_action_download): New.
11784 (r_tracepoint_action_download): New.
11785 (x_tracepoint_action_download): New.
11786 (l_tracepoint_action_download): New.
11787 (add_tracepoint_action): Install `action->ops' according type.
11788 (download_tracepoint_1): Move code `download' function pointer
11789 of various tracepoint_action_ops.
11790
87b0bb13
JK
117912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11792
11793 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11794 linux_ptrace_attach_warnings.
11795
5f572dec
JK
117962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11797
11798 * Makefile.in (linux-ptrace.o): New.
11799 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11800 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11801 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11802 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11803 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11804 of these targets.
11805 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11806
f4647387
YQ
118072012-03-08 Yao Qi <yao@codesourcery.com>
11808 Pedro Alves <palves@redhat.com>
11809
11810 Fix PR server/13392.
11811 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11812 offset of JMP insn.
11813 * tracepoint.c (remove_tracepoint): New.
11814 (cmd_qtdp): Call remove_tracepoint when failed to install.
11815
9b224c5e
PA
118162012-03-07 Pedro Alves <palves@redhat.com>
11817
11818 * linux-low.c (get_detach_signal): New.
11819 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11820 Pass on pending signals to PTRACE_DETACH. Check the result of the
11821 ptrace call.
11822 * server.c (program_signals, program_signals_p): New.
11823 (handle_general_set): Handle QProgramSignals.
11824 * server.h (program_signals, program_signals_p): Declare.
11825
e237a7e2
JK
118262012-03-05 Pedro Alves <palves@redhat.com>
11827 Jan Kratochvil <jan.kratochvil@redhat.com>
11828
11829 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11830 New comment why.
11831
5808517f
YQ
118322012-03-03 Yao Qi <yao@codesourcery.com>
11833
11834 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11835 agent_look_up_symbols.
11836
58b4daa5
YQ
118372012-03-03 Yao Qi <yao@codesourcery.com>
11838
11839 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11840 (linux-x86-low.o): Likewise.
11841 * server.h: Remove in_process_agent_loaded.
11842 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11843 common/agent.c.
11844 Update callers.
11845
8ffcbaaf
YQ
118462012-03-03 Yao Qi <yao@codesourcery.com>
11847
11848 * tracepoint.c (gdb_agent_capability): New global.
11849 (in_process_agent_loaded_ust): Renamed to
11850 `in_process_agent_supports_ust'.
11851 Update callers.
11852 (in_process_agent_supports_ust): Call agent_capability_check.
11853 (clear_installed_tracepoints): Assert that agent supports
11854 agent.
11855
d1feda86
YQ
118562012-03-03 Yao Qi <yao@codesourcery.com>
11857
11858 * linux-low.c (linux_supports_agent): New.
11859 (linux_target_ops): Initialize field `supports_agent' with
11860 linux_supports_agent.
11861 * target.h (struct target_ops) <supports_agent>: New.
11862 (target_supports_agent): New macro.
11863 * server.c (handle_general_set): Handle packet 'QAgent'.
11864 (handle_query): Send `QAgent+'.
11865 * Makefile.in (server.o): Depends on agent.h.
11866
2fa291ac
YQ
118672012-03-03 Yao Qi <yao@codesourcery.com>
11868
11869 * Makefile.in (OBS): Add agent.o.
11870 Add new rule for agent.o.
11871 Track dependence of tracepoint.c on agent.h.
11872 * tracepoint.c (run_inferior_command_1):
11873 (run_inferior_command): Call agent_run_command.
11874 (gdb_ust_connect_sync_socket): Deleted. Move it to
11875 common/agent.c.
11876 (resume_thread, stop_thread): Likewise.
11877 (gdb_ust_socket_init): Renamed to ...
11878 (gdb_agent_socket_init): ... New.
11879 (gdb_ust_thread): Renamed to ...
11880 (gdb_agent_helper_thread): ... New.
11881 (gdb_ust_init): Move some code to ...
11882 (gdb_agent_init): ... here. New.
11883 [HAVE_UST]: Call gdb_ust_init.
11884 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11885 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11886 * config.in, configure: Regenerated.
11887
05044653
PA
118882012-03-02 Pedro Alves <palves@redhat.com>
11889
11890 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11891 * linux-low.c (struct simple_pid_list): New.
11892 (stopped_pids): New a struct simple_pid_list pointer.
11893 (add_to_pid_list, pull_pid_from_list): New.
11894 (handle_extended_wait): Don't assume the first signal new children
11895 report is SIGSTOP. Adjust call to pull_pid_from_list.
11896 (linux_wait_for_lwp): Adjust.
11897
8d00225b
YQ
118982012-03-02 Yao Qi <yao@codesourcery.com>
11899
11900 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11901 debug log.
11902
19560ba5
YQ
119032012-03-02 Yao Qi <yao@codesourcery.com>
11904
11905 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11906 `stop_pc' and `tpoint'. Update caller.
11907
1faeff08
MR
119082012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11909
11910 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11911 * linux-low.c (use_linux_regsets): New macro.
11912 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11913 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11914 (linux_register_in_regsets): New function.
11915 (usr_fetch_inferior_registers): Skip registers covered by
11916 regsets.
11917 (usr_store_inferior_registers): Likewise.
11918 (usr_fetch_inferior_registers): New macro.
11919 (usr_store_inferior_registers): Likewise.
11920 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11921 (linux_store_registers): Likewise.
11922 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11923 prototype.
11924 (init_registers_mips64_dsp_linux): Likewise.
11925 (init_registers_mips_linux): New macro.
11926 (init_registers_mips_dsp_linux): Likewise.
11927 (mips_dsp_num_regs): Likewise.
11928 (DSP_BASE, DSP_CONTROL): New fallback macros.
11929 (mips_base_regs): New macro.
11930 (mips_regmap): Use it. Fix the size.
11931 (mips_dsp_regmap): New variable.
11932 (mips_dsp_regset_bitmap): Likewise.
11933 (mips_arch_setup): New function.
11934 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11935 than mips_regmap.
11936 (mips_cannot_store_register): Likewise.
11937 (the_low_target): Update .arch_setup, .num_regs and .regmap
11938 initializers. Add .regset_bitmap initializer.
11939 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11940 initializer.
11941 * linux-bfin-low.c (the_low_target): Likewise.
11942 * linux-cris-low.c (the_low_target): Likewise.
11943 * linux-crisv32-low.c (the_low_target): Likewise.
11944 * linux-ia64-low.c (the_low_target): Likewise.
11945 * linux-m32r-low.c (the_low_target): Likewise.
11946 * linux-m68k-low.c (the_low_target): Likewise.
11947 * linux-ppc-low.c (the_low_target): Likewise.
11948 * linux-s390-low.c (the_low_target): Likewise.
11949 * linux-sh-low.c (the_low_target): Likewise.
11950 * linux-sparc-low.c (the_low_target): Likewise.
11951 * linux-tic6x-low.c (the_low_target): Likewise.
11952 * linux-x86-low.c (the_low_target): Likewise.
11953 * linux-xtensa-low.c (the_low_target): Likewise.
11954 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11955 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11956 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11957 srv_xmlfiles.
11958 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11959 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11960
c03e6ccc
YQ
119612012-02-29 Yao Qi <yao@codesourcery.com>
11962 Pedro Alves <palves@redhat.com>
11963
11964 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11965 `step_over_finished' is true.
11966
644cebc9
PA
119672012-02-27 Pedro Alves <palves@redhat.com>
11968
11969 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11970 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11971
c14d7ab2
PA
119722012-02-27 Pedro Alves <palves@redhat.com>
11973
11974 PR server/9684
11975 * linux-low.c (pid_is_stopped): New.
11976 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11977
412c89dd
LM
119782012-02-25 Luis Machado <lgustavo@codesourcery.com>
11979
11980 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11981 of conditions.
11982
b745defe
MR
119832012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11984
11985 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11986
9f3a5c85
LM
119872012-02-24 Luis Machado <lgustavo@codesourcery>
11988
11989 * server.c (handle_query): Advertise support for target-side
11990 breakpoint condition evaluation.
11991 (process_point_options): New function.
11992 (process_serial_event): When inserting a breakpoint, check for
11993 a target-side condition that should be evaluated.
11994
11995 * mem-break.c: Include regcache.h and ax.h.
11996 (point_cond_list_t): New data structure.
11997 (breakpoint) <cond_list>: New field.
11998 (find_gdb_breakpoint_at): Make non-static.
11999 (delete_gdb_breakpoint_at): Clear any target-side
12000 conditions.
12001 (clear_gdb_breakpoint_conditions): New function.
12002 (add_condition_to_breakpoint): Likewise.
12003 (add_breakpoint_condition): Likewise.
12004 (gdb_condition_true_at_breakpoint): Likewise.
12005 (gdb_breakpoint_here): Return result directly instead
12006 of going through a local variable.
12007
12008 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12009 (clear_gdb_breakpoint_conditions): Likewise.
12010 (add_breakpoint_condition): Likewise.
12011 (gdb_condition_true_at_breakpoint): Likewise.
12012
12013 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12014 (need_step_over_p): Take target-side breakpoint condition into
12015 consideration.
12016
5e1dc496
LM
120172012-02-24 Luis Machado <lgustavo@codesourcery>
12018
12019 * server.h: Include tracepoint.h.
12020 (agent_mem_read, agent_get_trace_state_variable_value,
12021 agent_set_trace_state_variable_value,
12022 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12023 get_set_tsv_func_addr): New prototypes.
12024
12025 * ax.h: New include file.
12026 * ax.c: New source file.
12027
12028 * tracepoint.c: Include ax.h.
12029 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12030 agent_expr, eval_result_type): Move to ax.h.
12031 (parse_agent_expr): Rename to ...
12032 (gdb_parse_agent_expr): ... this, make it non-static and move
12033 to ax.h.
12034 (unparse_agent_expr) Rename to ...
12035 (gdb_unparse_agent_expr): ... this, make it non-static and move
12036 to ax.h.
12037 (eval_agent_expr): Rename to ...
12038 (eval_tracepoint_agent_expr): ... this.
12039 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12040 forward declarations.
12041 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12042 (agent_get_trace_state_variable_value): New function.
12043 (agent_set_trace_state_variable_value): New function.
12044 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12045 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12046 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12047 (condition_true_at_tracepoint): Likewise.
12048 (parse_agent_expr): Rename to ...
12049 (gdb_parse_agent_expr): ... this and move to ax.c.
12050 (unparse_agent_expr): Rename to ...
12051 (gdb_unparse_agent_expr): ... this and move to ax.c.
12052 (gdb_agent_op_name): Move to ax.c.
12053 (eval_agent_expr): Rename to ...
12054 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12055 and move to ax.c.
12056 (eval_tracepoint_agent_expr): New function.
12057 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12058 non-static.
5e1dc496
LM
12059 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12060 ax.c.
12061 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12062 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12063 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12064 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12065 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12066 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12067 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12068 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12069 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12070 (compile_bytecodes): Remove forward declaration.
12071 (is_goto_target): Move to ax.c.
12072 (compile_bytecodes): Move to ax.c and call
12073 agent_get_trace_state_variable_value (...) and
12074 agent_set_trace_state_variable_value (...).
12075
12076 * Makefile.in: Update ax.c and IPA dependencies.
12077
277e4e52
PA
120782012-02-24 Pedro Alves <palves@redhat.com>
12079
12080 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12081 (cmd_bigqtbuffer_circular): ... this. Only handle
12082 'QTBuffer:circular:'.
12083 (handle_tracepoint_general_set): Adjust.
12084
bf4c19f7
YQ
120852012-02-16 Yao Qi <yao@codesourcery.com>
12086
12087 * inferiors.c: Move code to ...
12088 * dll.c: .... here. New.
12089 * server.h: Declare clear_dlls.
12090 * Makefile.in (SFILES): Add dll.c.
12091 (OBS): Add dll.o
12092 (dll.o): New rule.
12093
d73f2619
YQ
120942012-02-11 Yao Qi <yao@codesourcery.com>
12095
12096 * server.c: (handle_monitor_command): Add a new parameter
12097 `own_buf'.
12098 (handle_query): Update caller.
12099
f8255c2a
JB
121002012-02-09 Joel Brobecker <brobecker@adacore.com>
12101
12102 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12103 * configure, config.in: Regenerate.
12104 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12105 is not defined.
12106
da84f473
PA
121072012-02-02 Pedro Alves <palves@redhat.com>
12108
12109 Try SIGKILL first, then PTRACE_KILL.
12110 * linux-low.c (linux_kill_one_lwp): New.
12111 (linux_kill_one_lwp): Rename to ...
12112 (kill_one_lwp_callback): ... this. Use the new
12113 linux_kill_one_lwp.
12114
e886a173
PA
121152012-02-02 Pedro Alves <palves@redhat.com>
12116
12117 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12118 inferior.
12119
be07f1a2
PA
121202012-01-27 Pedro Alves <palves@redhat.com>
12121
12122 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12123 (elf_64_file_p): Make static.
12124 (linux_pid_exe_is_elf_64_file): New.
12125 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12126 Delete declarations.
12127 (linux_pid_exe_is_elf_64_file): Declare.
12128 * linux-x86-low.c (x86_arch_setup): Use
12129 linux_pid_exe_is_elf_64_file.
12130
d8301ad1
JK
121312012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12132
12133 * linux-low.c (linux_wait_for_event_1): Rename to ...
12134 (linux_wait_for_event): ... here and merge it with former
12135 linux_wait_for_event - new variable wait_ptid, use it.
12136 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12137
01b17894
PA
121382012-01-23 Pedro Alves <palves@redhat.com>
12139
12140 * server.c (main): Avoid yet another case of infinite loop while
12141 detaching/killing after a longjmp.
12142
e825046f
JK
121432012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12144
12145 Code cleanup.
12146 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12147
b9e7b9c3
UW
121482012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12149
12150 * hostio.c (handle_readlink): New function.
12151 (handle_vFile): Call it to handle "vFile:readlink" packets.
12152
901f9912
UW
121532012-01-20 Pedro Alves <palves@redhat.com>
12154 Ulrich Weigand <ulrich.weigand@linaro.org>
12155
12156 * server.c (handle_v_requests): Only support vAttach and vRun to
12157 start multiple processes when in extended protocol mode.
12158
fc1ab1a0
PA
121592012-01-17 Pedro Alves <palves@redhat.com>
12160
12161 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12162 memalign plus mprotect to allocate the scratch buffer.
12163
7d5d4e98
PA
121642012-01-13 Pedro Alves <palves@redhat.com>
12165
12166 * server.c (attach_inferior): Clear `cont_thread'.
12167
f128d5e9
PA
121682012-01-13 Pedro Alves <palves@redhat.com>
12169
12170 * server.c (main): Avoid infinite loop while detaching/killing
12171 after a longjmp.
12172
06db92f0
DE
121732012-01-09 Doug Evans <dje@google.com>
12174
12175 * server.c (start_inferior): Set last_ptid in --wrapper case.
12176
32d92999
YQ
121772012-01-06 Yao Qi <yao@codesourcery.com>
12178
12179 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12180 defined.
12181 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12182
5e0a92a9
YQ
121832012-01-04 Yao Qi <yao@codesourcery.com>
12184
12185 * tracepoint.c (cmd_qtdp): Print debug message
12186 for static tracepoint.
12187
ae639e8c
YQ
121882012-01-04 Yao Qi <yao@codesourcery.com>
12189
12190 * tracepoint.c (trace_vdebug): Differentiate debug message
12191 between gdbserver and IPA.
12192
f72429c5
YQ
121932012-01-03 Yao Qi <yao@codesourcery.com>
12194
12195 * tracepoint.c (tracepoint_was_hit): Don't collect for
12196 static tracepoint.
12197
12c3e59c
JB
121982012-01-02 Joel Brobecker <brobecker@adacore.com>
12199
12200 * terminal.h: Reformat copyright header.
12201
67827812
JB
122022012-01-02 Joel Brobecker <brobecker@adacore.com>
12203
12204 * server.c (gdbserver_version): Update copyright year.
12205 * gdbreplay.c (gdbreplay_version): Likewise.
12206
3e52c33d
JK
122072011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12208
12209 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12210
12211 Revert:
12212 2011-12-18 Hui Zhu <teawater@gmail.com>
12213 * linux-low.c (linux_create_inferior): Save return value to ret.
12214
66f1260e
HZ
122152011-12-18 Hui Zhu <teawater@gmail.com>
12216
12217 * linux-low.c (linux_create_inferior): Save return value to ret.
12218
e77616d7
DE
122192011-12-16 Doug Evans <dje@google.com>
12220
e7b06c57
DE
12221 * linux-low.c (linux_create_inferior): If stdio connection,
12222 redirect stdin from /dev/null, stdout to stderr.
12223 * remote-utils.c (remote_is_stdio): New static global.
12224 (remote_connection_is_stdio): New function.
12225 (remote_prepare): Handle stdio connection.
12226 (remote_open): Ditto.
12227 (remote_close): Don't close stdin for stdio connections.
12228 (read_prim,write_prim): New functions. Replace all calls to
12229 read/write to these.
12230 * server.c (main): Watch for "-" argument. Move call to
12231 remote_prepare before start_inferior.
12232 * server.h (STDIO_CONNECTION_NAME): New macro.
12233 (remote_connection_is_stdio): Declare.
12234
e77616d7
DE
12235 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12236 in debugging output.
12237
82067193
YQ
122382011-12-15 Yao Qi <yao@codesourcery.com>
12239
12240 * tracepoint.c: Include sys/syscall.h.
12241 (gdb_ust_thread): Remove preprocessor conditional.
12242
82bfbe7e
PA
122432011-12-14 Pedro Alves <pedro@codesourcery.com>
12244
12245 * linux-low.c (linux_detach_one_lwp): Call
12246 the_low_target.prepare_to_resume before detaching.
12247
712c6575
YQ
122482011-12-14 Yao Qi <yao@codesourcery.com>
12249
12250 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12251 of write.
12252
d54d1edf
YQ
122532011-12-14 Yao Qi <yao@codesourcery.com>
12254
12255 * i386-low.c (i386_low_stopped_data_address): Initialize local
12256 variable `control'.
12257
6210a125
PA
122582011-12-13 Pedro Alves <pedro@codesourcery.com>
12259
12260 PR remote/13492
12261
12262 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12263 DR_CONTROL unless necessary. Extend comments.
12264 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12265 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12266
2ece8244
YQ
122672011-12-13 Yao Qi <yao@codesourcery.com>
12268
12269 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12270 macros.
12271 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12272
784867a5
JK
122732011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12274
12275 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12276 Print new debug message for such case.
12277
6bf36717
JK
122782011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12279
12280 Fix overlapping memcpy.
12281 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12282 the read_inferior_memory transfer.
12283 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12284 write_inferior_memory transfer.
12285 (set_fast_tracepoint_jump): New variable buf. Use it for the
12286 read_inferior_memory and write_inferior_memory transfers.
12287 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12288 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12289 Use it for the write_inferior_memory transfer.
12290 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12291 buffers.
12292
50275556
MR
122932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12294
12295 * linux-low.c (fetch_register, store_register): Make code
12296 consistent, fix formatting.
12297
7325beb4
MR
122982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12299
12300 * linux-low.c (usr_store_inferior_registers): Factor out code
12301 to handle individual registers into...
12302 (store_register): ... this new function.
12303
c642a434
UW
123042011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12305
12306 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12307 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12308 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12309 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12310 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12311 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12312 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12313 (srv_xmlfiles): Add new XML files.
12314
12315 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12316 and <sys/uio.h>.
12317 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12318 (init_registers_s390_linux32v1): Add prototype.
12319 (init_registers_s390_linux32v2): Likewise.
12320 (init_registers_s390_linux64v1): Likewise.
12321 (init_registers_s390_linux64v2): Likewise.
12322 (init_registers_s390x_linux64v1): Likewise.
12323 (init_registers_s390x_linux64v2): Likewise.
12324 (s390_num_regs): Increment to 52.
12325 (s390_regmap): Add orig_r2 register.
12326 (s390_num_regs_3264): Increment to 68.
12327 (s390_regmap_3264): Add orig_r2 register.
12328 (s390_collect_ptrace_register): Handle orig_r2 register.
12329 (s390_supply_ptrace_register): Likewise.
12330 (s390_fill_last_break): New function.
12331 (s390_store_last_break): Likewise.
12332 (s390_fill_system_call): New function.
12333 (s390_store_system_call): Likewise.
12334 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12335 register sets.
12336 (s390_check_regset): New function.
12337 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12338 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12339 Update target_regsets for available register sets.
12340
2268b414
JK
123412011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12342 Jan Kratochvil <jan.kratochvil@redhat.com>
12343
12344 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12345 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12346 New.
12347 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12348 * linux-low.h (struct process_info_private): New member r_debug.
12349 * server.c (handle_qxfer_libraries): Call
12350 the_target->qxfer_libraries_svr4.
12351 (handle_qxfer_libraries_svr4): New function.
12352 (qxfer_packets): New entry "libraries-svr4".
12353 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12354 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12355 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12356 PACKET_qXfer_libraries_svr4.
12357
d6db1fab
UW
123582011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12359
12360 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12361 PSW address/mask between 8-byte and 16-byte formats.
12362 (s390_supply_ptrace_register): Likewise.
12363 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12364 basic addressing mode bit.
12365
242f5f1c
SS
123662011-11-24 Stan Shebs <stan@codesourcery.com>
12367
12368 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12369
f196051f
SS
123702011-11-17 Stan Shebs <stan@codesourcery.com>
12371
12372 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12373 (tracing_start_time): New global.
12374 (tracing_stop_time): New global.
12375 (tracing_user_name): New global.
12376 (tracing_notes): New global.
12377 (tracing_stop_note): New global.
12378 (cmd_qtstart): Set traceframe_usage, start_time.
12379 (stop_tracing): Set stop_time.
12380 (cmd_qtstatus): Report additional status.
12381 (cmd_qtp): New function.
12382 (handle_tracepoint_query): Call it.
12383 (cmd_qtnotes): New function.
12384 (handle_tracepoint_general_set): Call it.
12385 (get_timestamp): Rename from tsv_get_timestamp.
12386
405f8e94
SS
123872011-11-14 Stan Shebs <stan@codesourcery.com>
12388 Kwok Cheung Yeung <kcy@codesourcery.com>
12389
12390 * linux-x86-low.c (small_jump_insn): New.
12391 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12392 trampoline and error message, build a trampoline and issue a small
12393 jump instruction to it.
12394 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12395 trampoline and error message.
12396 (x86_get_min_fast_tracepoint_insn_len): New.
12397 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12398 * linux-low.h (struct linux_target_ops): Add arguments to
12399 install_fast_tracepoint_jump_pad operation, add new operation.
12400 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12401 arguments.
12402 (linux_get_min_fast_tracepoint_insn_len): New function.
12403 (linux_target_op): Add new operation.
12404 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12405 (gdb_trampoline_buffer_end): Ditto.
12406 (gdb_trampoline_buffer_error): Ditto.
12407 (struct ipa_sym_addresses): Add fields for new IPA variables.
12408 (symbol_list): Add entries for new IPA variables.
12409 (struct tracepoint): Add fields to hold the address range of the
12410 trampoline used by the tracepoint.
12411 (trampoline_buffer_head): New static variable.
12412 (trampoline_buffer_tail): Ditto.
12413 (claim_trampoline_space): New function.
12414 (have_fast_tracepoint_trampoline_buffer): New function.
12415 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12416 structure.
12417 (install_fast_tracepoint): Ditto, also add error buffer argument.
12418 (cmd_qtminftpilen): New function.
12419 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12420 (fast_tracepoint_from_trampoline_address): New function.
12421 (fast_tracepoint_collecting): Handle trampoline as part of jump
12422 pad space.
12423 (set_trampoline_buffer_space): New function.
12424 (initialize_tracepoint): Initialize new IPA variables.
12425 * target.h (struct target_ops): Add arguments to
12426 install_fast_tracepoint_jump_pad operation, add new
12427 get_min_fast_tracepoint_insn_len operation.
12428 (target_get_min_fast_tracepoint_insn_len): New.
12429 (install_fast_tracepoint_jump_pad): Add arguments.
12430 * server.h (IPA_BUFSIZ): Define.
12431 * linux-i386-ipa.c: Include extra header files.
12432 (initialize_fast_tracepoint_trampoline_buffer): New function.
12433 (initialize_low_tracepoint): Call it.
12434 * server.h (set_trampoline_buffer_space): Declare.
12435 (claim_trampoline_space): Ditto.
12436 (have_fast_tracepoint_trampoline_buffer): Ditto.
12437
1e4d1764
YQ
124382011-11-14 Yao Qi <yao@codesourcery.com>
12439
12440 * server.c (handle_query): Handle InstallInTrace for qSupported.
12441 * tracepoint.c (add_tracepoint): Sort list.
12442 (install_tracepoint, download_tracepoint): New.
12443 (cmd_qtdp): Call them to install and download tracepoints.
12444 (sort_tracepoints): Removed.
12445 (cmd_qtstart): Update.
12446
5c73ff4e
YQ
124472011-11-14 Yao Qi <yao@codesourcery.com>
12448
12449 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12450 * mem-break.h: Declare.
12451 * tracepoint.c (cmd_qtstart): Move some code to ...
12452 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12453 New.
12454 (download_tracepoints): Move some code to ...
12455 (download_tracepoint_1): ... here. New.
12456
86a30030
YQ
124572011-11-08 Yao Qi <yao@codesourcery.com>
12458
12459 * remote-utils.c (relocate_instruction): A comment fix.
12460
8d26e50c
JB
124612011-11-07 Joel Brobecker <brobecker@adacore.com>
12462
12463 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12464 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12465 dr_status_mirror and dr_control_mirror from debug_reg_state.
12466 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12467 (i386_initial_stuff): Remove use of deleted globals.
12468 (i386_get_thread_context, i386_set_thread_context,
12469 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12470 from debug_reg_state.
12471
a59306a3
YQ
124722011-11-05 Yao Qi <yao@codesourcery.com>
12473
12474 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12475 address as TPOINT's.
12476
3065dfb6
SS
124772011-11-02 Stan Shebs <stan@codesourcery.com>
12478
12479 * tracepoint.c (agent_mem_read_string): New function.
12480 (eval_agent_expr): Call it for tracenz.
12481 * server.c (handle_query): Report support for tracenz.
12482
fd0d8c7c
YQ
124832011-11-02 Yao Qi <yao@codesourcery.com>
12484
12485 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12486
609086b1
YQ
124872011-11-02 Yao Qi <yao@codesourcery.com>
12488
12489 * target.h: Fix a typo in comment.
12490
b9fd1791
PA
124912011-10-31 Pedro Alves <pedro@codesourcery.com>
12492
12493 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12494 clobber the breakpoints' shadows with fast tracepoint jumps.
12495 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12496 * target.c (write_inferior_memory): Also pass MYADDR down to
12497 check_mem_write.
12498
03583c20
UW
124992011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12500
12501 * configure.ac: Check support for personality routine.
12502 * configure: Regenerate.
12503 * config.in: Likewise.
12504 * linux-low.c: Include <sys/personality.h>.
12505 Define ADDR_NO_RANDOMIZE if necessary.
12506 (linux_create_inferior): Disable address space randomization when
12507 forking inferior, if requested.
12508 (linux_supports_disable_randomization): New function.
12509 (linux_target_ops): Install it.
12510 * server.h (disable_randomization): Declare.
12511 * server.c (disable_randomization): New global variable.
12512 (handle_general_set): Handle QDisableRandomization.
12513 (handle_query): Likewise for qSupported.
12514 (main): Support --disable-randomization and --no-disable-randomization
12515 command line arguments.
12516 * target.h (struct target_ops): Add supports_disable_randomization.
12517 (target_supports_disable_randomization): New macro.
12518
723b724b
MF
125192011-09-29 Mike Frysinger <vapier@gentoo.org>
12520
12521 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12522 ifdef check.
12523 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12524 [!PT_GETDSBT] (target_loadmap): New definition.
12525 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12526 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12527 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12528 and PT_GETDSBT to LINUX_LOADMAP.
12529 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12530 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12531
55329a5c 125322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12533
12534 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12535 (arm_linux_hwbp_cap): New static variable.
12536 (arm_linux_get_hwbp_cap): Replace by ...
12537 (arm_linux_init_hwbp_cap): ... this new function.
12538 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12539 (arm_linux_get_hw_watchpoint_count): Likewise.
12540 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12541 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12542 (arm_prepare_to_resume): Use perror_with_name instead of error.
12543
55329a5c 125442011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12545
12546 * linux-arm-low.c: Include <signal.h>.
12547 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12548 (struct arm_linux_hwbp_cap): New data type.
12549 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12550 (struct arm_linux_hw_breakpoint): New data type.
12551 (MAX_BPTS, MAX_WPTS): Define.
12552 (struct arch_process_info, struct arch_lwp_info): New data types.
12553 (arm_linux_get_hwbp_cap): New function.
12554 (arm_linux_get_hw_breakpoint_count): Likewise.
12555 (arm_linux_get_hw_watchpoint_count): Likewise.
12556 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12557 (arm_hwbp_control_initialize): Likewise.
12558 (arm_hwbp_control_is_enabled): Likewise.
12559 (arm_hwbp_control_is_initialized): Likewise.
12560 (arm_hwbp_control_disable): Likewise.
12561 (arm_linux_hw_breakpoint_equal): Likewise.
12562 (arm_linux_hw_point_initialize): Likewise.
12563 (struct update_registers_data): New data structure.
12564 (update_registers_callback: New function.
12565 (arm_insert_point): Likewise.
12566 (arm_remove_point): Likewise.
12567 (arm_stopped_by_watchpoint): Likewise.
12568 (arm_stopped_data_address): Likewise.
12569 (arm_new_process): Likewise.
12570 (arm_new_thread): Likewise.
12571 (arm_prepare_to_resume): Likewise.
12572 (the_low_target): Register arm_insert_point, arm_remove_point,
12573 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12574 arm_new_thread, and arm_prepare_to_resume.
12575
6b9801d4
SS
125762011-09-15 Stan Shebs <stan@codesourcery.com>
12577
12578 * server.h (struct emit_ops): Add compare-goto fields.
12579 * tracepoint.c (gdb_agent_op_sizes): New table.
12580 (emit_eq_goto): New function.
12581 (emit_ne_goto): New function.
12582 (emit_lt_goto): New function.
12583 (emit_le_goto): New function.
12584 (emit_gt_goto): New function.
12585 (emit_ge_goto): New function.
12586 (is_goto_target): New function.
12587 (compile_bytecodes): Recognize special cases of compare-goto
12588 combinations and call specialized emitters for them.
12589 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12590 (amd64_emit_ne_goto): New function.
12591 (amd64_emit_lt_goto): New function.
12592 (amd64_emit_le_goto): New function.
12593 (amd64_emit_gt_goto): New function.
12594 (amd64_emit_ge_goto): New function.
12595 (amd64_emit_ops): Add the new functions.
12596 (i386_emit_eq_goto): New function.
12597 (i386_emit_ne_goto): New function.
12598 (i386_emit_lt_goto): New function.
12599 (i386_emit_le_goto): New function.
12600 (i386_emit_gt_goto): New function.
12601 (i386_emit_ge_goto): New function.
12602 (i386_emit_ops): Add the new functions.
12603
bf15cbda
SS
126042011-09-08 Stan Shebs <stan@codesourcery.com>
12605
12606 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12607 (i386_emit_epilogue): Restore %ebx.
12608
943ca1dd
JZ
126092011-08-31 Jie Zhang <jzhang918@gmail.com>
12610
12611 * server.c (step_thread): Remove definition.
12612 (process_serial_event): Don't handle Hs.
12613 * server.h (step_thread): Remove declaration.
12614 * target.c (set_desired_inferior): Remove use of step_thread.
12615
e3deef73
LM
126162011-08-24 Luis Machado <lgustavo@codesourcery.com>
12617
12618 * linux-low.c: Include linux-procfs.h.
12619 (linux_attach_lwp_1): Update comments.
12620 (linux_attach): Scan for existing threads when attaching to a
12621 process that is the tgid.
12622 * Makefile.in: Update dependencies.
12623
13da1c97
LM
126242011-08-24 Luis Machado <lgustavo@codesourcery.com>
12625
12626 * configure.srv: Add linux-procfs.o dependencies.
12627
881127c9
YQ
126282011-08-14 Yao Qi <yao@codesourcery.com>
12629
12630 * target.h (struct target_ops): Fix indent.
12631 * win32-low.c (win32_target_ops): Fix comment.
12632
58dbd541
YQ
126332011-08-14 Andrew Jenner <andrew@codesourcery.com>
12634 Yao Qi <yao@codesourcery.com>
12635
12636 * Makefile.in (clean): Remove tic6x-*.c files.
12637 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12638 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12639 (tic6x-c64xp-linux.c): Likewise.
12640 * configure.srv: Add support for tic6x-*-uclinux.
12641 * linux-tic6x-low.c: New.
12642 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12643
78d85199
YQ
126442011-08-14 Andrew Stubbs <ams@codesourcery.com>
12645 Yao Qi <yao@codesourcery.com>
12646
12647 * target.h (struct target_ops): Add read_loadmap.
12648 * linux-low.c (struct target_loadseg): New type.
12649 (struct target_loadmap): New type.
12650 (linux_read_loadmap): New function.
12651 (linux_target_ops): Add linux_read_loadmap.
12652 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12653 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12654 to NULL.
78d85199 12655
a959a88d
EZ
126562011-08-05 Eli Zaretskii <eliz@gnu.org>
12657
12658 * win32-low.c: Include <stdint.h>.
12659
1ced966e
PA
126602011-07-22 Pedro Alves <pedro@codesourcery.com>
12661
12662 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12663 to the inferior here.
12664 (i386_remove_aligned_watchpoint): Ditto.
12665 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12666 fit part of the watchpoint in the debug registers.
12667 (i386_update_inferior_debug_regs): New.
12668 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12669 registers, and only update the inferior on success.
12670 (i386_low_remove_watchpoint): Ditto.
12671
d26e3629
KY
126722011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12673
12674 * linux-low.c (compare_ints, unique, list_threads, show_process,
12675 linux_core_of_thread): Delete.
12676 (linux_target_ops): Change linux_core_of_thread to
12677 linux_common_core_of_thread.
12678 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12679 * utils.c (malloc_failure): Change type of argument.
12680 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12681 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12682 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12683 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12684 (IPA_OBJS): Add common-utils-ipa.o.
12685 (ptid_h, linux_osdata_h): New macros.
12686 (server_h): Add common/common-utils.h, common/xml-utils.h,
12687 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12688 common/ptid.h.
12689 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12690 ptid.o, buffer.o): New rules.
12691 (linux-low.o): Add common/linux-osdata.h as a dependency.
12692 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12693 * configure.ac: Add AC_HEADER_DIRENT check.
12694 * config.in: Regenerate.
12695 * configure: Regenerate.
12696 * remote-utils.c (xml_escape_text): Delete.
12697 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12698 buffer_xml_printf): Move to common/buffer.c.
12699 * server.c (main): Remove call to initialize_inferiors.
12700 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12701 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12702 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12703 internal_error, gdb_assert, gdb_assert_fail): Delete.
12704 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12705 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12706 common/buffer.h.
12707 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12708 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12709 initialize_inferiors): Delete.
12710
2275a1a7
PA
127112011-07-20 Pedro Alves <pedro@codesourcery.com>
12712
12713 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12714 symbol error.
12715
0a5b1e09
PA
127162011-05-31 Pedro Alves <pedro@codesourcery.com>
12717
12718 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12719 assertion.
12720 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12721
6938fd34
YQ
127222011-05-26 Yao Qi <yao@codesourcery.com>
12723
12724 * Makefile.in (thread-db.o): Track dependence to
12725 common/gdb_thread_db.h.
12726 * thread-db.c: include gdb_thread_db.h from right place.
12727
b481f9e0
TT
127282011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12729
12730 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12731 __FILE__ and __LINE__ to internal_error.
12732
98a5dd13
DE
127332011-05-13 Doug Evans <dje@google.com>
12734
12735 * thread-db.c (try_thread_db_load_from_sdir): New function.
12736 (try_thread_db_load_from_dir): New function.
12737 (thread_db_load_search): Handle $sdir, ignore $pdir.
12738 Remove trying of system directories if search of
12739 libthread-db-search-path fails, that is now done via $sdir.
12740
d248b706
KY
127412011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12742
12743 * server.c (handle_query): Add EnableDisableTracepoints to the list
12744 of supported features.
43aaf8b6 12745 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12746 tracepoints.
43aaf8b6
PA
12747 (cmd_qtenable_disable): New.
12748 (cmd_qtstart): Install tracepoints even if disabled.
12749 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12750 receiving a QTEnable or QTDisable packet.
12751 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12752 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12753 tracepoints.
12754 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12755
84e578fb
DE
127562011-05-10 Doug Evans <dje@google.com>
12757
12758 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12759
71f55dd8
DE
127602011-05-04 Doug Evans <dje@google.com>
12761
12762 * linux-low.c (linux_join): Skip process lookup.
12763 * spu-low.c (spu_join): Ditto.
12764 * server.c (join_inferiors_callback): Delete.
12765 (process_serial_event): For 'D' packet (detach) call join_inferior
12766 directly.
12767
4d393d60
JM
127682011-05-04 Joseph Myers <joseph@codesourcery.com>
12769
12770 * README: Don't mention xscale*-*-linux*.
12771 * configure.srv (xscale*-*-linux*): Don't handle target.
12772
b00ad6ff
NF
127732011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12774
12775 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12776 casting pointers.
12777 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12778 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12779 (i386_emit_void_call_2): Likewise.
12780
af96c192
YQ
127812011-04-26 Yao Qi <yao@codesourcery.com>
12782
43aaf8b6
PA
12783 * linux-low.c: Move common macros to linux-ptrace.h.
12784 Include linux-ptrace.h.
af96c192
YQ
12785 * Makefile.in (linux_ptrace_h): New.
12786 (linux-low.o): Depends on linux-ptrace.h.
12787
03f2bd59
JK
127882011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12789
12790 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12791 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12792 (remote_prepare): New function with most of the TCP code from ...
12793 (remote_open): ... here. Detect PORT here unconditionally. Move also
12794 setting transport_is_reliable.
12795 * server.c (run_once): New variable.
12796 (gdbserver_usage): Document it.
12797 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12798 the first run if RUN_ONCE.
12799 * server.h (run_once, remote_prepare): New declarations.
12800
7a9dd1b2
TT
128012011-04-19 Tom Tromey <tromey@redhat.com>
12802
12803 * win32-low.c (handle_load_dll): Remove duplicate "the".
12804
81239425
PM
128052011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12806
12807 Remove support for old Cygwin 1.5 versions.
12808 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12809 function to avoid warning.
12810 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12811 warning.
12812
9e0627f1
PM
128132011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12814
12815 * gdbserver/server.h (Macro _): Define it if not available.
12816
588eebee
MS
128172011-03-14 Michael Snyder <msnyder@vmware.com>
12818
348af9f7 12819 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12820
43f70d4c
JB
128212011-03-10 Joel Brobecker <brobecker@adacore.com>
12822
12823 * Makefile.in (maintainer-clean realclean distclean): Remove
12824 "make ... subdir_do" command.
12825
348af9f7
MS
128262011-03-10 Michael Snyder <msnyder@vmware.com>
12827
12828 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12829
12830 * server.c (handle_v_run): Free alloced buffer on early return.
12831
e637a4f5
YQ
128322011-03-09 Yao Qi <yao@codesourcery.com>
12833
12834 Revert:
12835 2011-03-04 Yao Qi <yao@codesourcery.com>
12836
12837 * Makefile.in: Remove GNU make feature --directory.
12838
12839 2011-03-05 Yao Qi <yao@codesourcery.com>
12840
12841 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12842 (subdir_do): New make target. Copied from gdb/Makefile.
12843 (maintainer-clean, realclean, distclean, clean): Call corresponding
12844 make targets in common/Makefile.
12845
12846 2011-02-11 Yao Qi <yao@codesourcery.com>
12847
12848 * configure.ac: Call AC_PROG_RANLIB.
12849 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12850 * configure: Regenerate.
12851
e6edda56
JK
128522011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12853
12854 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12855
e5141119
JB
128562011-03-06 Yao Qi <yao@codesourcery.com>
12857
12858 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12859
64794aa4
JB
128602011-03-05 Yao Qi <yao@codesourcery.com>
12861
12862 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12863 (subdir_do): New make target. Copied from gdb/Makefile.
12864 (maintainer-clean, realclean, distclean, clean): Call corresponding
12865 make targets in common/Makefile.
12866
7a762829
YQ
128672011-03-04 Yao Qi <yao@codesourcery.com>
12868
12869 * Makefile.in: Remove GNU make feature --directory.
12870
348af9f7
MS
128712011-03-04 Michael Snyder <msnyder@vmware.com>
12872
12873 * server.c (queue_stop_reply): Call xmalloc not malloc.
12874
128752011-03-02 Michael Snyder <msnyder@vmware.com>
12876
12877 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12878
9f72fee2
MS
128792011-02-28 Michael Snyder <msnyder@vmware.com>
12880
588eebee
MS
12881 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12882 (cmd_qtframe): Ditto.
12883 (cmd_qtbuffer): Ditto.
12884 (cmd_bigqtbuffer): Ditto.
12885
9f72fee2
MS
12886 * utils.c (decimal2str): Initialize 'width' to nine, then
12887 don't mess with it.
12888
8040bd49
UW
128892011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12890
12891 * hostio.c (require_data): Free *data, not data.
12892
7e52cbd0
JK
128932011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12894
12895 * hostio.c (require_data): Use free, not xfree.
12896
9130f83e
MS
128972011-02-27 Michael Snyder <msnyder@vmware.com>
12898
4b812f4e
MS
12899 * server.c (handle_query): Discard unused value.
12900
9130f83e
MS
12901 * hostio.c (require_data): Free malloc memory before returning
12902 error.
12903
69d37113
MS
129042011-02-26 Michael Snyder <msnyder@vmware.com>
12905
12906 * linux-low.c (list_threads): Call closedir for dirent.
12907
35f5825a
MS
129082011-02-27 Michael Snyder <msnyder@vmware.com>
12909
2a589cef
MS
12910 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12911 a case statement falls through.
12912
0adea5f7
MS
12913 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12914
35f5825a
MS
12915 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12916 in comparison.
12917
238f1c74
MS
129182011-02-26 Michael Snyder <msnyder@vmware.com>
12919
12920 * utils.c (decimal2str): Eliminate dead code and dead param.
12921 (pulongest): Drop dead param from call to decimal2str.
12922 (plongest): Ditto.
12923
633ff500
JB
129242011-02-24 Joel Brobecker <brobecker@adacore.com>
12925
12926 Revert the following patch (not approved yet):
12927 2011-02-21 Hui Zhu <teawater@gmail.com>
12928 * tracepoint.c (tp_printf): New function.
12929 (eval_agent_expr): Handle gdb_agent_op_printf.
12930
f9c6ff72
HZ
129312011-02-21 Hui Zhu <teawater@gmail.com>
12932
12933 * tracepoint.c (tp_printf): New function.
12934 (eval_agent_expr): Handle gdb_agent_op_printf.
12935
94d5e490
TT
129362011-02-18 Tom Tromey <tromey@redhat.com>
12937
12938 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12939 (tracepoint.o): Likewise.
12940 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12941 (gdb_agent_op_names): Likewise.
12942
c7f96d2b
TT
129432011-02-18 Tom Tromey <tromey@redhat.com>
12944
12945 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12946 gdb_agent_op_rot>: New constants.
12947 (gdb_agent_op_names): Add pick and roll.
12948 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12949 cases.
12950
0feedb2c
JK
129512011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12952
12953 * aclocal.m4: Regenerated with aclocal-1.11.1.
12954
b3b9301e
PA
129552011-02-14 Pedro Alves <pedro@codesourcery.com>
12956
12957 * server.c (handle_qxfer_traceframe_info): New.
12958 (qxfer_packets): Register "traceframe-info".
12959 (handle_query): Report support for qXfer:traceframe-info:read+.
12960 * tracepoint.c (match_blocktype): New.
12961 (traceframe_find_block_type): Rename to ...
12962 (traceframe_walk_blocks): ... this. Add callback filter argument,
12963 and use it.
12964 (traceframe_find_block_type): New, reimplemented on top of
12965 traceframe_walk_blocks.
12966 (build_traceframe_info_xml): New.
12967 (traceframe_read_info): New.
12968 * server.h (traceframe_read_info): Declare.
12969
4f3e6fb7
YQ
129702011-02-11 Yao Qi <yao@codesourcery.com>
12971
12972 * configure.ac: Call AC_PROG_RANLIB.
12973 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12974 * configure: Regenerate.
12975
764880b7
PA
129762011-02-07 Pedro Alves <pedro@codesourcery.com>
12977
12978 * server.c (gdb_read_memory): Change return semantics to allow
12979 partial transfers.
12980 (handle_search_memory_1): Adjust.
12981 (process_serial_event) <'m' packet>: Handle partial transfers.
12982 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12983
1c79eb8a
PA
129842011-01-28 Pedro Alves <pedro@codesourcery.com>
12985
12986 * regcache.c (init_register_cache): Initialize
12987 regcache->register_status.
12988 (free_register_cache): Release regcache->register_status.
12989 (regcache_cpy): Copy register_status.
12990 (registers_to_string): Print 'x's for unavailable registers.
12991 (supply_register): Mark the register's status valid or
12992 unavailable, depending on whether a buffer was passed in or not.
12993 (supply_register_zeroed): New.
12994 (supply_regblock): Mark the registers' status valid or
12995 unavailable, depending on whether a buffer was passed in or not.
12996 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12997 (struct regcache): New `register_status' field.
12998 (supply_register_zeroed): Declare.
12999 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13000 supply_register_zeroed, rather than passing a NULL buffer to
13001 supply_register.
13002 * tracepoint.c (fetch_traceframe_registers): Update comment.
13003
85724a0e
PA
130042011-01-28 Pedro Alves <pedro@codesourcery.com>
13005
13006 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13007 buffer explicit.
13008
d08aafef
PA
130092011-01-25 Pedro Alves <pedro@codesourcery.com>
13010
13011 * server.h (decode_xfer_write): Change prototype.
13012 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13013 and don't extract the annex here.
13014 * server.c (decode_xfer_read): Remove `annex' parameter,
13015 and don't extract the annex here.
13016 (decode_xfer): New.
13017 (struct qxfer): New.
13018 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13019 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13020 (handle_qxfer_statictrace): New functions, abstracted out from
13021 handle_query, and made to use the struct qxfer interface.
13022 (handle_threads_qxfer_proper): Rename to ...
13023 (handle_qxfer_threads_proper): ... this.
13024 (handle_threads_qxfer): Rename to ...
13025 (handle_qxfer_threads): ... this. Adjust.
13026 (qxfer_packets): New array.
13027 (handle_qxfer): New function.
13028 (handle_query): Use handle_qxfer.
13029
493e2a69
MS
130302011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13031
13032 * gdbreplay.c: Shorten lines of >= 80 columns.
13033 * linux-low.c: Ditto.
13034 * linux-ppc-low.c: Ditto.
13035 * linux-s390-low.c: Ditto.
13036 * linux-sparc-low.c: Ditto.
13037 * linux-x86-low.c: Ditto.
13038 * linux-xtensa-low.c: Ditto.
13039 * mem-break.c: Ditto.
13040 * nto-low.c: Ditto.
13041 * regcache.h: Ditto.
13042 * remote-utils.c: Ditto.
13043 * server.c: Ditto.
13044 * server.h: Ditto.
13045 * thread-db.c: Ditto.
13046 * tracepoint.c: Ditto.
13047 * utils.c: Ditto.
13048 * win32-low.h: Ditto.
13049
44944448
JB
130502011-01-05 Joel Brobecker <brobecker@adacore.com>
13051
13052 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13053 update.
13054
71ce852c
JB
130552011-01-01 Joel Brobecker <brobecker@adacore.com>
13056
13057 * server.c (gdbserver_version): Update copyright year in version
13058 output.
13059 * gdbreplay.c (gdbreplay_version): Ditto.
13060
eb826dc6
MF
130612010-12-29 Jie Zhang <jie.zhang@analog.com>
13062
13063 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13064 * linux-bfin-low.c: New file.
13065 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13066 PT_DATA_ADDR for BFIN targets.
13067 * Makefile.in (SFILES): Add linux-bfin-low.c.
13068 (clean): Remove reg-bfin.c.
13069 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13070 * README: Mention supported Blackfin targets.
13071
39ab222a
MF
130722010-12-23 Mike Frysinger <vapier@gentoo.org>
13073
13074 * .gitignore: New file.
13075
a1f2ce7d
MF
130762010-11-16 Mike Frysinger <vapier@gentoo.org>
13077
13078 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13079
f474844c
JZ
130802010-10-22 Jie Zhang <jie@codesourcery.com>
13081
13082 * Makefile.in: Add FLAGS_TO_PASS variable.
13083 (install): Remove dependency of install-only and recursively
13084 invoke make for install-only.
13085
f1048712
DE
130862010-10-04 Doug Evans <dje@google.com>
13087
13088 * Makefile.in (uninstall): Use $(DESTDIR).
13089
b53a1623
PA
130902010-09-24 Pedro Alves <pedro@codesourcery.com>
13091
e6ee044d
PA
13092 PR gdb/11842
13093
b53a1623
PA
13094 * linux-x86-low.c (compat_siginfo_from_siginfo)
13095 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13096 si_code is < 0. Check for si_code == SI_TIMER before checking for
13097 si_code < 0.
13098
fa1bd1e4
JB
130992010-09-13 Joel Brobecker <brobecker@adacore.com>
13100
13101 * lynx-i386-low.c: New file.
13102 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13103
47fac8f8
JB
131042010-09-13 Joel Brobecker <brobecker@adacore.com>
13105
13106 * lynx-low.c (ptrace_request_to_str): Remove handling for
13107 request values that have been removed in LynxOS 5.x.
13108
1adfc54d
JB
131092010-09-13 Joel Brobecker <brobecker@adacore.com>
13110
13111 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13112 <ptrace.h>
13113
c2a66c29
NS
131142010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13115
13116 * configure.ac: Add --enable-inprocess-agent option.
13117 * configure: Rebuilt.
13118
32fcada3
YQ
131192010-09-06 Yao Qi <yao@codesourcery.com>
13120
13121 * linux-low.c (linux_kill): Remove unused variable.
13122 (linux_stabilize_threads): Likewise.
13123 * server.c (start_inferior): Likewise.
13124 (queue_stop_reply_callback): Likewise.
13125 * tracepoint.c (do_action_at_tracepoint): Likewise.
13126
0cccb683
YQ
131272010-09-06 Yao Qi <yao@codesourcery.com>
13128
13129 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13130 on return.
13131
423ec54c
JK
131322010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13133
13134 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13135
12ac6819
PA
131362010-09-06 Pedro Alves <pedro@codesourcery.com>
13137
13138 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13139 "$(IPA_DEPFILES)".
13140
8ed54b31
JB
131412010-09-01 Joel Brobecker <brobecker@adacore.com>
13142
13143 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13144 gdbserver/lynx-ppc-low.c: New files.
13145 * Makefile.in (lynx_low_h): New variable.
13146 (lynx-low.o, lynx-ppc-low.o): New rules.
13147 * configure.ac: On LynxOS, link with -lnetinet.
13148 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13149 * configure: regenerate.
13150
bb0116a4
JB
131512010-09-01 Joel Brobecker <brobecker@adacore.com>
13152
13153 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13154 * configure.ac: Add check for vasprintf and vsnprintf.
13155 * configure, config.in: Regenerate.
13156 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13157
a778ab81 131582010-09-01 Joel Brobecker <brobecker@adacore.com>
13159
13160 * gdbreplay.c: Move include of alloca.h up, next to include of
13161 malloc.h.
13162 * server.h: Add include of malloc.h.
13163 * mem-break.c: Remove include of malloc.h.
13164 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13165
8b034a19 131662010-09-01 Joel Brobecker <brobecker@adacore.com>
13167
13168 * Makefile.in (memmem.o): Build with -Wno-error.
13169
131702010-09-01 Joel Brobecker <brobecker@adacore.com>
13171
13172 * utils.c (xsnprintf): Make non-static.
13173 * server.h: Add xsnprintf declaration.
13174 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13175 replace calls to snprintf by calls to xsnprintf throughout.
13176
131772010-09-01 Joel Brobecker <brobecker@adacore.com>
13178
13179 * configure.ac: Add configure check for alloca.
13180 * configure, config.in: Regenerate.
13181 * server.h: Include alloca.h if it exists.
13182 * gdbreplay.c: Include alloca.h if it exists.
13183
1a981360
PA
131842010-08-28 Pedro Alves <pedro@codesourcery.com>
13185
13186 * linux-low.c (__SIGRTMIN): Define if not already defined.
13187 (linux_create_inferior): Check for __ANDROID__ rather than
13188 __SIGRTMIN.
13189 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13190 are already deferred.
13191 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13192 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13193 stopped and already has a pending signal to report.
13194 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13195 a pending signal to report or is moving out of a jump pad.
13196 (linux_init_signals): Check for __ANDROID__ rather than
13197 __SIGRTMIN.
13198
b4d51a55
PA
131992010-08-28 Pedro Alves <pedro@codesourcery.com>
13200
13201 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13202 debug_threads check. Avoid a linear search when not doing debug
13203 output.
13204
ec48365d
PA
132052010-08-27 Pedro Alves <pedro@codesourcery.com>
13206
13207 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13208 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13209 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13210 (process_event): Change local fd's type to gdb_fildes_t.
13211 (create_file_handler): Adjust prototype.
13212 (delete_file_handler): Adjust prototype.
13213 (handle_file_event): Adjust prototype. Use pfildes.
13214 (create_file_event): Adjsut prototype.
13215 * remote-utils.c (remote_desc, listen_desc): Change type to
13216 gdb_fildes_t.
13217 * server.h: New gdb_fildes_t typedef.
13218 [USE_WIN32API]: Include winsock2.h.
13219 (delete_file_handler, add_file_handler): Adjust prototypes.
13220 (pfildes): Declare.
13221 * utils.c (pfildes): New.
13222
854d88f0
PA
132232010-08-27 Pedro Alves <pedro@codesourcery.com>
13224
13225 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13226 * configure: Regenerate.
13227
0146f85b
PA
132282010-08-27 Pedro Alves <pedro@codesourcery.com>
13229
13230 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13231 (linux_done_accessing_memory): ... this.
13232 (linux_target_ops): Adjust.
13233 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13234 * nto-low.c (nto_target_ops): Adjust comment.
13235 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13236 * spu-low.c (spu_target_ops): Adjust comment.
13237 * target.h (target_ops): Rename unprepare_to_access_memory field
13238 to done_accessing_memory.
13239 (unprepare_to_access_memory): Rename to ...
13240 (done_accessing_memory): ... this.
13241
90d74c30
PA
132422010-08-26 Pedro Alves <pedro@codesourcery.com>
13243
13244 * linux-low.c (linux_prepare_to_access_memory): New.
13245 (linux_unprepare_to_access_memory): New.
13246 (linux_target_ops): Install them.
13247 * server.c (read_memory): Rename to ...
13248 (gdb_read_memory): ... this. Use
13249 prepare_to_access_memory/prepare_to_access_memory.
13250 (write_memory): Rename to ...
13251 (gdb_write_memory): ... this. Use
13252 prepare_to_access_memory/prepare_to_access_memory.
13253 (handle_search_memory_1): Adjust.
13254 (process_serial_event): Adjust.
13255 * target.h (struct target_ops): New fields
13256 prepare_to_access_memory and unprepare_to_access_memory.
13257 (prepare_to_access_memory, unprepare_to_access_memory): New.
13258 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13259 prepare_to_access_memory/prepare_to_access_memory.
13260 * nto-low.c (nto_target_ops): Adjust.
13261 * spu-low.c (spu_target_ops): Adjust.
13262 * win32-low.c (win32_target_ops): Adjust.
13263
fd467969
PA
132642010-08-26 Pedro Alves <pedro@codesourcery.com>
13265
13266 * Makefile.in (WARN_CFLAGS): Get it from configure.
13267 (WERROR_CFLAGS): New.
13268 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13269 * configure.ac: Introduce --enable-werror, which adds -Werror to
13270 the compiler command line. Enabled by default. Disable with
13271 --disable-werror. Add -Wdeclaration-after-statement
13272 Wpointer-arith and -Wformat-nonliteral to warning flags.
13273 * configure: Regenerate.
13274
331e2f5f
PA
132752010-08-26 Pedro Alves <pedro@codesourcery.com>
13276
13277 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13278
e581f2b4
PA
132792010-08-26 Pedro Alves <pedro@codesourcery.com>
13280
13281 * gdbreplay.c (remote_error): New.
13282 (gdbchar): New.
13283 (expect): Use gdbchar. Check for error reading from GDB.
13284 Clarify sync error output.
13285 (play): Check for errors writing to GDB.
13286 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13287 * remote-utils.c (getpkt): Check for errors writing to the remote
13288 descriptor.
13289
3c11dd79
PA
132902010-08-25 Pedro Alves <pedro@codesourcery.com>
13291
13292 * linux-low.c (linux_wait_1): Move non-debugging code out of
13293 `debug_threads' control.
13294
d20a8ad9
PA
132952010-08-25 Pedro Alves <pedro@codesourcery.com>
13296
13297 * linux-low.c (linux_wait_1): Don't set last_status here.
13298 * server.c (push_event, queue_stop_reply_callback): Assert we're
13299 not pushing a TARGET_WAITKIND_IGNORE event.
13300 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13301 (myresume, handle_target_event): Set the thread's last_resume_kind
13302 and last_status from the target returned status.
13303
964e4306
PA
133042010-08-25 Pedro Alves <pedro@codesourcery.com>
13305
13306 PR threads/10729
13307
13308 * linux-x86-low.c (update_debug_registers_callback): New.
13309 (i386_dr_low_set_addr): Use it.
13310 (i386_dr_low_get_addr): New.
13311 (i386_dr_low_set_control): Use update_debug_registers_callback.
13312 (i386_dr_low_get_control): New.
13313 (i386_dr_low_get_status): Adjust.
13314 * linux-low.c (linux_stop_lwp): New.
13315 * linux-low.h (linux_stop_lwp): Declare.
13316
13317 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13318 argument instead of a i386_debug_reg_state.
13319 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13320 a i386_debug_reg_state.
13321 (i386_insert_aligned_watchpoint): Adjust.
13322 (i386_remove_aligned_watchpoint): Adjust.
13323 (i386_low_stopped_data_address): Read the debug registers from the
13324 inferior instead of from the mirrors.
13325 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13326 (i386_dr_low_get_addr): Declare.
13327 (i386_dr_low_get_control): Declare.
13328 (i386_dr_low_get_status): Change prototype.
13329
13330 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13331 (i386_dr_low_get_addr): New.
13332 (i386_dr_low_get_control): New.
13333 (i386_dr_low_get_status): Adjust prototype. Return
13334 dr_status_mirror.
13335 (i386_initial_stuff): Clear dr_status_mirror and
13336 dr_control_mirror.
13337 (i386_get_thread_context): Adjust.
13338 (i386_set_thread_context): Adjust.
13339 (i386_thread_added): Adjust.
13340
5f21a75b
PA
133412010-08-24 Pedro Alves <pedro@codesourcery.com>
13342
13343 * linux-low.h (linux_thread_area): Delete declaration.
13344
3e4c1235
TS
133452010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13346
13347 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13348 after its termination.
13349
1971b033
PA
133502010-08-09 Pedro Alves <pedro@codesourcery.com>
13351
13352 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13353 (gdb_wants_all_stopped): Delete.
13354 (linux_wait_1): Don't call them.
13355 * server.c (handle_v_cont): Tag all threads as want-stopped.
13356 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13357 stopped as "client-wants-stopped".
13358
310444ac
PA
133592010-07-31 Pedro Alves <pedro@codesourcery.com>
13360
13361 * Makefile.in (signals_h): New.
13362 (server_h): Depend on it.
13363 (server.o): Don't depend on $(signals_def).
13364 (signals.o): Depend on $(signals_def).
13365
a19cae16
JK
133662010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13367
13368 * Makefile.in (signals_def): New.
13369 (server_h): Append include/gdb/signals.h and signals_def.
13370 (server.o): Append signals_def.
13371
30d50328
JK
133722010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13373
13374 * server.c (handle_target_event): Use target_signal_to_host for
13375 resume_info.sig initialization.
13376 * target.h (struct thread_resume) <sig>: New comment.
13377
5c3216e2
OS
133782010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13379
c6f46ca0
OS
13380 * server.c (handle_query): strcpy() the returned string from paddress()
13381 instead of sprintf().
5c3216e2
OS
13382 * utils.c (paddress): Return phex_nz().
13383
6bd31874
JB
133842010-07-07 Joel Brobecker <brobecker@adacore.com>
13385
13386 * server.c (handle_v_cont): Call mourn_inferior if process
13387 just exited.
13388 (myresume): Likewise.
13389
0fb4aa4b
PA
133902010-07-01 Pedro Alves <pedro@codesourcery.com>
13391
13392 Static tracepoints, and integration with UST.
13393
13394 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13395 * mem-break.c (uninsert_all_breakpoints)
13396 (reinsert_all_breakpoints): New.
13397 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13398 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13399 (gdb_agent_ust_loaded, helper_thread_id)
13400 (gdb_agent_helper_thread_id): New macros.
13401 (struct ipa_sym_addresses): Add addr_ust_loaded,
13402 addr_helper_thread_id, addr_cmd_buf.
13403 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13404 (in_process_agent_loaded_ust): New.
13405 (write_e_ust_not_loaded): New.
13406 (maybe_write_ipa_ust_not_loaded): New.
13407 (struct collect_static_trace_data_action): New.
13408 (enum tracepoint_type) <static_tracepoint>: New.
13409 (struct tracepoint) <handle>: Mention static tracepoints.
13410 (struct static_tracepoint_ctx): New.
13411 (CMD_BUF_SIZE): New.
13412 (add_tracepoint_action): Handle static tracepoint actions.
13413 (unprobe_marker_at): New.
13414 (clear_installed_tracepoints): Handle static tracepoints.
13415 (cmd_qtdp): Handle static tracepoints.
13416 (probe_marker_at): New.
13417 (cmd_qtstart): Handle static tracepoints.
13418 (response_tracepoint): Handle static tracepoints.
13419 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13420 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13421 (get_context_regcache): Handle static tracepoints.
13422 (do_action_at_tracepoint): Handle static tracepoint actions.
13423 (traceframe_find_block_type): Handle static trace data blocks.
13424 (traceframe_read_sdata): New.
13425 (download_tracepoints): Download static tracepoint actions.
13426 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13427 (GDB_PROBE_NAME): New.
13428 (ust_ops): New.
13429 (GET_UST_SYM): New.
13430 (USTF): New.
13431 (dlsym_ust): New.
13432 (ust_marker_to_static_tracepoint): New.
13433 (gdb_probe): New.
13434 (collect_ust_data_at_tracepoint): New.
13435 (gdb_ust_probe): New.
13436 (UNIX_PATH_MAX, SOCK_DIR): New.
13437 (gdb_ust_connect_sync_socket): New.
13438 (resume_thread, stop_thread): New.
13439 (run_inferior_command): New.
13440 (init_named_socket): New.
13441 (gdb_ust_socket_init): New.
13442 (cstr_to_hexstr): New.
13443 (next_st): New.
13444 (first_marker, next_marker): New.
13445 (response_ust_marker): New.
13446 (cmd_qtfstm, cmd_qtsstm): New.
13447 (unprobe_marker_at, probe_marker_at): New.
13448 (cmd_qtstmat, gdb_ust_thread): New.
13449 (gdb_ust_init): New.
13450 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13451 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13452 (ST_REGENTRY): New.
13453 (x86_64_st_collect_regmap): New.
13454 (X86_64_NUM_ST_COLLECT_GREGS): New.
13455 (AMD64_RIP_REGNUM): New.
13456 (supply_static_tracepoint_registers): New.
13457 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13458 (ST_REGENTRY): New.
13459 (i386_st_collect_regmap): New.
13460 (i386_NUM_ST_COLLECT_GREGS): New.
13461 (supply_static_tracepoint_registers): New.
13462 * server.c (handle_query): Handle qXfer:statictrace:read.
13463 <qSupported>: Report support for StaticTracepoints, and
13464 qXfer:statictrace:read features.
13465 * server.h (traceframe_read_sdata)
13466 (supply_static_tracepoint_registers): Declare.
13467 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13468 (unpack_varlen_hex): Include in IPA build.
13469 * Makefile.in (ustlibs, ustinc): New.
13470 (IPA_OBJS): Add remote-utils-ipa.o.
13471 ($(IPA_LIB)): Link -ldl and -lpthread.
13472 (UST_CFLAGS): New.
13473 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13474 * config.in, configure: Regenerate.
13475
9e4344e5
PA
134762010-06-20 Ian Lance Taylor <iant@google.com>
13477 Pedro Alves <pedro@codesourcery.com>
13478
13479 * linux-x86-low.c (always_true): Delete.
13480 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13481 trying to fool the compiler with always_true.
13482
c6beb2cb
PA
134832010-06-20 Pedro Alves <pedro@codesourcery.com>
13484
13485 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13486 conditions in gdbserver.
13487
d2ed6730
UW
134882010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13489
13490 * spu-low.c (spu_read_memory): Wrap around local store limit.
13491 (spu_write_memory): Likewise.
13492
4e29fb54
PA
134932010-06-15 Pedro Alves <pedro@codesourcery.com>
13494
13495 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13496 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13497 LONGEST uses.
13498 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13499 uses.
13500 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13501 uses with LONGEST uses.
13502
6a271cae
PA
135032010-06-14 Stan Shebs <stan@codesourcery.com>
13504 Pedro Alves <pedro@codesourcery.com>
13505
13506 Bytecode compiler.
13507
13508 * linux-x86-low.c: Include limits.h.
13509 (add_insns): New.
13510 (always_true): New.
13511 (EMIT_ASM): New.
13512 (EMIT_ASM32): New.
13513 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13514 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13515 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13516 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13517 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13518 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13519 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13520 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13521 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13522 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13523 (amd64_emit_void_call_2): New.
13524 (amd64_emit_ops): New.
13525 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13526 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13527 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13528 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13529 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13530 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13531 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13532 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13533 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13534 (i386_emit_stack_adjust, i386_emit_int_call_1)
13535 (i386_emit_void_call_2): New.
13536 (i386_emit_ops): New.
13537 (x86_emit_ops): New.
13538 (the_low_target): Install x86_emit_ops.
13539 * server.h (struct emit_ops): New.
13540 (get_raw_reg_func_addr): Declare.
13541 (current_insn_ptr, emit_error): Declare.
13542 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13543 (set_trace_state_variable_value): New defines.
13544 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13545 addr_get_trace_state_variable_value and
13546 addr_set_trace_state_variable_value.
13547 (symbol_list): New fields for get_raw_reg,
13548 get_trace_state_variable_value and set_trace_state_variable_value.
13549 (condfn): New typedef.
13550 (struct tracepoint): New field `compiled_cond'.
13551 (do_action_at_tracepoint): Clear compiled_cond.
13552 (get_trace_state_variable_value, set_trace_state_variable_value):
13553 Export in the IPA.
13554 (condition_true_at_tracepoint): If there's a compiled condition,
13555 run that.
13556 (current_insn_ptr, emit_error): New globals.
13557 (struct bytecode_address): New.
13558 (get_raw_reg_func_addr): New.
13559 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13560 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13561 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13562 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13563 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13564 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13565 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13566 (compile_tracepoint_condition, compile_bytecodes): New.
13567 * target.h (emit_ops): Forward declare.
13568 (struct target_ops): New field emit_ops.
13569 (target_emit_ops): New.
13570 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13571 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13572 * linux-low.c (linux_emit_ops): New.
13573 (linux_target_ops): Install it.
13574 * linux-low.h (struct linux_target_ops): New field emit_ops.
13575
92b72907
UW
135762010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13577
13578 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13579 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13580
fa593d66
PA
135812010-06-01 Pedro Alves <pedro@codesourcery.com>
13582 Stan Shebs <stan@codesourcery.com>
13583
13584 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13585 (all): Depend on $(extra_libraries).
13586 (install-only): Install the IPA.
13587 (IPA_OBJS, IPA_LIB): New.
13588 (clean): Remove the IPA lib.
13589 (IPAGENT_CFLAGS): New.
13590 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13591 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13592 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13593 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13594 * configure.ac: Check for atomic builtins support in the compiler.
13595 (IPA_DEPFILES, extra_libraries): Define.
13596 * configure.srv (ipa_obj): Add description.
13597 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13598 (i[34567]86-*-linux*): Set ipa_obj.
13599 (x86_64-*-linux*): Set ipa_obj.
13600 * linux-low.c (stabilizing_threads): New.
13601 (supports_fast_tracepoints): New.
13602 (linux_detach): Stabilize threads before detaching.
13603 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13604 the lwp is either not stabilizing, or is moving out of a jump pad.
13605 (linux_fast_tracepoint_collecting): New.
13606 (maybe_move_out_of_jump_pad): New.
13607 (enqueue_one_deferred_signal): New.
13608 (dequeue_one_deferred_signal): New.
13609 (linux_wait_for_event_1): If moving out of a jump pad, defer
13610 pending signals to later.
13611 (linux_stabilize_threads): New.
13612 (linux_wait_1): Check if threads need moving out of jump pads, and
13613 do it if so.
13614 (stuck_in_jump_pad_callback): New.
13615 (move_out_of_jump_pad_callback): New.
13616 (lwp_running): New.
13617 (linux_resume_one_lwp): Handle moving out of jump pads.
13618 (linux_set_resume_request): Dequeue deferred signals.
13619 (need_step_over_p): Also step over fast tracepoint jumps.
13620 (start_step_over): Also uninsert fast tracepoint jumps.
13621 (finish_step_over): Also reinsert fast tracepoint jumps.
13622 (linux_install_fast_tracepoint_jump): New.
13623 (linux_target_ops): Install linux_stabilize_threads and
13624 linux_install_fast_tracepoint_jump_pad.
13625 * linux-low.h (linux_target_ops) <get_thread_area,
13626 install_fast_tracepoint_jump_pad>: New fields.
13627 (struct lwp_info) <collecting_fast_tracepoint,
13628 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13629 (linux_get_thread_area): Declare.
13630 * linux-x86-low.c (jump_insn): New.
13631 (x86_get_thread_area): New.
13632 (append_insns): New.
13633 (push_opcode): New.
13634 (amd64_install_fast_tracepoint_jump_pad): New.
13635 (i386_install_fast_tracepoint_jump_pad): New.
13636 (x86_install_fast_tracepoint_jump_pad): New.
13637 (the_low_target): Install x86_get_thread_area and
13638 x86_install_fast_tracepoint_jump_pad.
13639 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13640 (struct fast_tracepoint_jump): New.
13641 (fast_tracepoint_jump_insn): New.
13642 (fast_tracepoint_jump_shadow): New.
13643 (find_fast_tracepoint_jump_at): New.
13644 (fast_tracepoint_jump_here): New.
13645 (delete_fast_tracepoint_jump): New.
13646 (set_fast_tracepoint_jump): New.
13647 (uninsert_fast_tracepoint_jumps_at): New.
13648 (reinsert_fast_tracepoint_jumps_at): New.
13649 (set_breakpoint_at): Use write_inferior_memory.
13650 (uninsert_raw_breakpoint): Use write_inferior_memory.
13651 (check_mem_read): Mask out fast tracepoint jumps.
13652 (check_mem_write): Mask out fast tracepoint jumps.
13653 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13654 (set_fast_tracepoint_jump): Declare.
13655 (delete_fast_tracepoint_jump)
13656 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13657 (reinsert_fast_tracepoint_jumps_at): Declare.
13658 * regcache.c: Don't compile many functions when building the
13659 in-process agent library.
13660 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13661 the register buffer in the heap.
13662 (free_register_cache): If the register buffer isn't owned by the
13663 regcache, don't free it.
13664 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13665 pre-existing register caches.
13666 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13667 type.
13668 (convert_ascii_to_int): : Constify `from' parameter type.
13669 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13670 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13671 the needed buffer in-place.
13672 (relocate_instruction): New.
13673 * server.c (handle_query) <qSymbols>: If the target supports
13674 tracepoints, give it a chance of looking up symbols. Report
13675 support for fast tracepoints.
13676 (handle_status): Stabilize threads.
13677 (process_serial_event): Adjust.
13678 * server.h (struct fast_tracepoint_jump): Forward declare.
13679 (struct process_info) <fast_tracepoint_jumps>: New field.
13680 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13681 (decode_X_packet, decode_M_packet): Adjust.
13682 (relocate_instruction): Declare.
13683 (in_process_agent_loaded): Declare.
13684 (tracepoint_look_up_symbols): Declare.
13685 (struct fast_tpoint_collect_status): Declare.
13686 (fast_tracepoint_collecting): Declare.
13687 (force_unlock_trace_buffer): Declare.
13688 (handle_tracepoint_bkpts): Declare.
13689 (initialize_low_tracepoint)
13690 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13691 * target.h (struct target_ops) <stabilize_threads,
13692 install_fast_tracepoint_jump_pad>: New fields.
13693 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13694 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13695 [HAVE_STDINT_H]: Include stdint.h.
13696 (trace_debug_1): Rename to ...
13697 (trace_vdebug): ... this.
13698 (trace_debug): Rename to ...
13699 (trace_debug_1): ... this. Add `level' parameter.
13700 (trace_debug): New.
13701 (ATTR_USED, ATTR_NOINLINE): New.
13702 (IP_AGENT_EXPORT): New.
13703 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13704 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13705 (about_to_request_buffer_space, trace_buffer_is_full)
13706 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13707 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13708 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13709 (traceframe_write_count, traceframes_created)
13710 (trace_state_variables)
13711 New renaming defines.
13712 (struct ipa_sym_addresses): New.
13713 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13714 (symbol_list): New.
13715 (ipa_sym_addrs): New.
13716 (all_tracepoint_symbols_looked_up): New.
13717 (in_process_agent_loaded): New.
13718 (write_e_ipa_not_loaded): New.
13719 (maybe_write_ipa_not_loaded): New.
13720 (tracepoint_look_up_symbols): New.
13721 (debug_threads) [IN_PROCESS_AGENT]: New.
13722 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13723 (UNKNOWN_SIDE_EFFECTS): New.
13724 (stop_tracing): New.
13725 (flush_trace_buffer): New.
13726 (stop_tracing_bkpt): New.
13727 (flush_trace_buffer_bkpt): New.
13728 (read_inferior_integer): New.
13729 (read_inferior_uinteger): New.
13730 (read_inferior_data_pointer): New.
13731 (write_inferior_data_pointer): New.
13732 (write_inferior_integer): New.
13733 (write_inferior_uinteger): New.
13734 (struct collect_static_trace_data_action): Delete.
13735 (enum tracepoint_type): New.
13736 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13737 <actions_str, step_actions, step_actions_str>: Only include in
13738 GDBserver.
fa593d66
PA
13739 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13740 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13741 (tracepoints): Use IP_AGENT_EXPORT.
13742 (last_tracepoint): Don't include in the IPA.
13743 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13744 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13745 (alloced_trace_state_variables): New.
13746 (trace_state_variables): Use IP_AGENT_EXPORT.
13747 (traceframe_t): Delete unused variable.
13748 (circular_trace_buffer): Don't include in the IPA.
13749 (trace_buffer_start): Delete.
13750 (struct trace_buffer_control): New.
13751 (trace_buffer_free): Delete.
13752 (struct ipa_trace_buffer_control): New.
13753 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13754 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13755 New.
13756 (trace_buffer_ctrl): New.
13757 (TRACE_BUFFER_CTRL_CURR): New.
13758 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13759 Reimplement as macros.
13760 (trace_buffer_wrap): Delete.
13761 (traceframe_write_count, traceframe_read_count)
13762 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13763 (struct tracepoint_hit_ctx) <type>: New field.
13764 (struct fast_tracepoint_ctx): New.
13765 (memory_barrier): New.
13766 (cmpxchg): New.
13767 (record_tracepoint_error): Update atomically in the IPA.
13768 (clear_inferior_trace_buffer): New.
13769 (about_to_request_buffer_space): New.
13770 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13771 updating the same buffer.
13772 (add_tracepoint): Default the tracepoint's type to trap
13773 tracepoint, and orig_size to -1.
13774 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13775 internal variables.
13776 (create_trace_state_variable): New parameter `gdb'. Handle it.
13777 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13778 (cmd_qtdp): Handle fast tracepoints.
13779 (cmd_qtdv): Adjust.
13780 (max_jump_pad_size): New.
13781 (gdb_jump_pad_head): New.
13782 (get_jump_space_head): New.
13783 (claim_jump_space): New.
13784 (sort_tracepoints): New.
13785 (MAX_JUMP_SIZE): New.
13786 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13787 IPA.
13788 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13789 support. Upload fast traceframes, and delete internal IPA
13790 breakpoints.
13791 (stop_tracing_handler): New.
13792 (flush_trace_buffer_handler): New.
13793 (cmd_qtstop): Upload fast tracepoints.
13794 (response_tracepoint): Handle fast tracepoints.
13795 (tracepoint_finished_step): Upload fast traceframes. Set the
13796 tracepoint hit context's tracepoint type.
13797 (handle_tracepoint_bkpts): New.
13798 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13799 type. Add comment about fast tracepoints.
13800 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13801 non-existing action_str field.
13802 (get_context_regcache): Handle fast tracepoints.
13803 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13804 to the regcache.
13805 (fast_tracepoint_from_jump_pad_address): New.
13806 (fast_tracepoint_from_ipa_tpoint_address): New.
13807 (collecting_t): New.
13808 (force_unlock_trace_buffer): New.
13809 (fast_tracepoint_collecting): New.
13810 (collecting): New.
13811 (gdb_collect): New.
13812 (write_inferior_data_ptr): New.
13813 (target_tp_heap): New.
13814 (target_malloc): New.
13815 (download_agent_expr): New.
13816 (UALIGN): New.
13817 (download_tracepoints): New.
13818 (download_trace_state_variables): New.
13819 (upload_fast_traceframes): New.
13820 (IPA_FIRST_TRACEFRAME): New.
13821 (IPA_NEXT_TRACEFRAME_1): New.
13822 (IPA_NEXT_TRACEFRAME): New.
13823 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13824 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13825 (gdb_jump_pad_buffer_end): New.
13826 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13827 (initialize_tracepoint): Adjust.
13828 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13829 buffer. Initialize the low module.
13830 * utils.c (PREFIX, TOOLNAME): New.
13831 (malloc_failure): Use PREFIX.
13832 (error): In the IPA, an error causes an exit.
13833 (fatal, warning): Use PREFIX.
13834 (internal_error): Use TOOLNAME.
13835 (NUMCELLS): Increase to 10.
13836 * configure, config.in: Regenerate.
13837
d149dd1d
PA
138382010-06-01 Pedro Alves <pedro@codesourcery.com>
13839
13840 * server.c (handle_query) <qSupported>: Do two passes over the
13841 qSupported string to avoid nesting strtok.
13842
f6528abd
JK
138432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13844
13845 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13846 (CDEPS): New.
13847 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13848 -Wl,--dynamic-list.
13849 * configure: Regenerate.
13850 * proc-service.list: New.
13851
ca2a87a0
JK
138522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13853
13854 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13855 New comment.
13856
363a6e9f
OS
138572010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13858
13859 * gdbreplay.c (remote_open): Check error return from socket() call by
13860 its equality to -1 not by it being negative.
13861 * remote-utils.c (remote_open): Likewise.
13862
d23b6cb1
PA
138632010-05-23 Pedro Alves <pedro@codesourcery.com>
13864
13865 * config.h: Regenerate.
13866
28d3cf85
MK
138672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13868
13869 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13870 doesn't provide PTRACE_GET_THREAD_AREA.
13871
fea36a59
MK
138722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13873
13874 * linux-m68k-low.c: Include <asm/ptrace.h>
13875 (ps_get_thread_area): Implement.
13876
24b066ba
DE
138772010-05-03 Doug Evans <dje@google.com>
13878
13879 * event-loop.c (struct callback_event): New struct.
13880 (callback_list): New global.
13881 (append_callback_event, delete_callback_event): New functions.
13882 (process_callback): New function.
13883 (start_event_loop): Call it.
13884 * remote-utils.c (NOT_SCHEDULED): Define.
13885 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13886 moved out of readchar.
13887 (readchar): Rewrite. Call reschedule before returning.
13888 (reset_readchar): New function.
13889 (remote_close): Call it.
13890 (process_remaining, reschedule): New functions.
13891 * server.h (callback_handler_func): New typedef.
13892 (append_callback_event, delete_callback_event): Declare.
13893
9836d6ea
PA
138942010-05-03 Pedro Alves <pedro@codesourcery.com>
13895
13896 * proc-service.c (ps_pglobal_lookup): Use
13897 thread_db_look_up_one_symbol.
13898 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13899 parameter. Use it instead of all_symbols_looked_up.
13900 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13901 field.
13902 (all_symbols_looked_up): Don't declare.
13903 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13904 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13905 field.
13906 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13907 Set all_symbols_looked_up here.
13908 (thread_db_look_up_one_symbol): New.
13909 (thread_db_get_tls_address): Adjust.
13910 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13911 thread_db object on the heap, and tentatively set it in the
13912 process structure.
13913 (thread_db_init): Don't set all_symbols_looked_up here.
13914 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13915
7984d532
PA
139162010-05-03 Pedro Alves <pedro@codesourcery.com>
13917
13918 * linux-low.c (linux_kill, linux_detach): Adjust.
13919 (status_pending_p_callback): Remove redundant statement. Check
13920 for !TARGET_WAITIKIND_IGNORE, instead of
13921 TARGET_WAITKIND_STOPPED.
13922 (handle_tracepoints): Make sure LWP is locked. Adjust.
13923 (linux_wait_for_event_1): Adjust.
13924 (linux_cancel_breakpoints): New.
13925 (unsuspend_one_lwp): New.
13926 (unsuspend_all_lwps): New.
13927 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13928 (send_sigstop_callback): Change return type to int, add new
13929 `except' parameter and handle it.
13930 (suspend_and_send_sigstop_callback): New.
13931 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13932 pass them down. If SUSPEND, also increment the lwp's suspend
13933 count.
13934 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13935 (need_step_over_p): Don't consider suspended LWPs.
13936 (start_step_over): Adjust.
13937 (proceed_one_lwp): Change return type to int, add new `except'
13938 parameter and handle it.
13939 (unsuspend_and_proceed_one_lwp): New.
13940 (proceed_all_lwps): Use find_inferior instead of
13941 for_each_inferior.
13942 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13943 also decrement the suspend count of LWPs. Pass `except' down,
13944 instead of hacking its suspend count.
13945 (linux_pause_all): Add `freeze' parameter. Adjust.
13946 (linux_unpause_all): New.
13947 (linux_target_ops): Install linux_unpause_all.
13948 * server.c (handle_status): Adjust.
13949 * target.h (struct target_ops): New fields `unpause_all' and
13950 `cancel_breakpoints'. Add new parameter to `pause_all'.
13951 (pause_all): Add new `freeze' parameter.
13952 (unpause_all): New.
13953 (cancel_breakpoints): New.
13954 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13955 cancel breakpoints.
13956 (cmd_qtstart): Pause threads.
13957 (stop_tracing): Pause threads, and cancel breakpoints.
13958 * win32-low.c (win32_target_ops): Adjust.
13959
e471f25b
PA
139602010-05-03 Pedro Alves <pedro@codesourcery.com>
13961
13962 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13963 the inferior right away from here...
13964 (linux_wait_1): ... to here, and adjust to check the thread's
13965 last_resume_kind instead of the lwp's step or stop_expected flags.
13966
1915ef4f
PA
139672010-05-02 Pedro Alves <pedro@codesourcery.com>
13968
13969 * README: Use consistent `GDB' and `GDBserver' spellings.
13970
f9e39928
PA
139712010-05-02 Pedro Alves <pedro@codesourcery.com>
13972
13973 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13974 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13975 (linux_detach_one_lwp): Assume the lwp is stopped.
13976 (any_thread_of): Delete.
13977 (linux_detach): Stop all lwps here. Don't blindly delete all
13978 breakpoints.
13979 (delete_lwp_callback): New.
13980 (linux_mourn): Delete all lwps of the process that is gone.
13981 (linux_wait_1): Don't delete the last lwp of the process here.
13982 * mem-break.h (mark_breakpoints_out): Declare.
13983 * mem-break.c (mark_breakpoints_out): New.
13984 (free_all_breakpoints): Use it.
13985 * server.c (handle_target_event): If the process is gone, mark
13986 breakpoints out.
13987 * thread-db.c (struct thread_db) <create_bp>: New field.
13988 (thread_db_enable_reporting): Fix prototype. Store a thread event
13989 breakpoint reference in the thread_db struct.
13990 (thread_db_load_search): Clear the thread_db object.
13991 (try_thread_db_load_1): Ditto.
13992 (switch_to_process): New.
13993 (disable_thread_event_reporting): Use it.
13994 (remove_thread_event_breakpoints): New.
13995 (thread_db_detach, thread_db_mourn): Use it.
13996
1e7fc18c
PA
139972010-05-01 Pedro Alves <pedro@codesourcery.com>
13998
13999 * linux-low.c (linux_enable_event_reporting): New.
14000 (linux_wait_for_event_1, handle_extended_wait): Use it.
14001
02fc4de7
PA
140022010-04-30 Pedro Alves <pedro@codesourcery.com>
14003
14004 * linux-low.c (linux_kill_one_lwp, linux_kill)
14005 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14006 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14007 SIGSTOP even if the LWP is stopped.
14008 (send_sigstop_callback): New.
14009 (stop_all_lwps): Use send_sigstop_callback instead.
14010 (linux_resume_one_thread): Adjust.
14011 (proceed_one_lwp): Still proceed an LWP that the client has
14012 requested to stop, if we haven't reported it as stopped yet. Make
14013 sure that LWPs the client want stopped, have a pending SIGSTOP.
14014
bc3b5632
DE
140152010-04-26 Doug Evans <dje@google.com>
14016
ae1ada35
DE
14017 * server.c (handle_general_set): Make static.
14018
bc3b5632
DE
14019 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14020 Print received char after testing for error/eof instead of before.
14021 (input_interrupt): Tweak comment.
14022
65730243
DE
140232010-04-23 Doug Evans <dje@google.com>
14024
14025 * server.c (start_inferior): Print inferior argv if --debug.
14026
a8ae7dc0
AR
140272010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14028
14029 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14030 * nto-x86-low.c: Include server.h
14031
1c07cc19
PM
140322010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14033
14034 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14035 be consistent with other sources of this directory.
14036 (init_registers_amd64): Correct name of source file of this function
14037 in the comment.
14038
e0a61e09
PM
140392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14040
14041 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14042 64-bit executables.
14043
54709339
PM
140442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14045
14046 * win32-i386-low.c: Add 64-bit support.
14047 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14048 (init_registers_amd64): Declare.
14049 (mappings): Add 64-bit version of array.
14050 (init_windows_x86): New function.
14051 (the_low_target): Change init_arch field to init_windows_x86.
14052
e8f0053d
PM
140532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14054
14055 * win32-low.c: Adapt to support also 64-bit architecture.
14056 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14057 (get_image_name): Use SIZE_T type for local variable `done'.
14058 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14059 (toolhelp_get_dll_name): Idem.
14060 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14061 Use uintptr_t typecast to avoid warning.
14062 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14063 (handle_exception): Use phex_nz to avoid warning.
14064 (win32_wait): Remove unused local variable `process'.
14065
c481e77e
PM
140662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14067
14068 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14069 `amd64-avx.o'.
14070
12ea4b69
PM
140712010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14072
14073 * configure.ac: Use `ws2_32' library for srv_mingw.
14074 * configure: Regenerate.
14075 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14076 * remote-utils.c: Likewise.
14077
f6d1620c
L
140782010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14079
14080 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14081 if __x86_64__ is defined.
14082
8e642873
PM
140832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14084
14085 * configure: Regenerate.
14086
711e434b
PM
140872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14088
14089 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14090 * target.h (target_ops): New get_tib_address field.
14091 * win32-low.h (win32_thread_info): Add thread_local_base field.
14092 * win32-low.c (child_add_thread): Add tlb argument.
14093 Set thread_local_base field to TLB.
14094 (get_child_debug_event): Adapt to child_add_thread change.
14095 (win32_get_tib_address): New function.
14096 (win32_target_ops): Set get_tib_address field to
14097 win32_get_tib_address.
14098 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14099
505106cd
PA
141002010-04-12 Pedro Alves <pedro@codesourcery.com>
14101
505106cd
PA
14102 * linux-low.c (linux_mourn): Also remove the process.
14103 * server.c (handle_target_event): Don't remove the process here.
14104 * nto-low.c (nto_mourn): New.
14105 (nto_target_ops): Install it.
14106 * spu-low.c (spu_mourn): New.
14107 (spu_target_ops): Install it.
14108 * win32-low.c (win32_mourn): New.
14109 (win32_target_ops): Install it.
14110
e8470a06
PA
141112010-04-12 Pedro Alves <pedro@codesourcery.com>
14112
14113 * server.h (buffer_xml_printf): Remove redundant `;'.
14114
45ba0d02
PA
141152010-04-12 Pedro Alves <pedro@codesourcery.com>
14116
14117 * regcache.c (set_register_cache): Invalidate regcaches before
14118 changing the register cache layout.
14119 (regcache_invalidate_one): Allow a NULL regcache.
14120 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14121 regcaches before changing the register cache layout or the target
14122 regsets.
14123
59e04013
L
141242010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14125
14126 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14127 variable warning on Linux/x86-64.
14128
8336d594
PA
141292010-04-11 Pedro Alves <pedro@codesourcery.com>
14130
14131 GDBserver disconnected tracing support.
14132
14133 * linux-low.c (linux_remove_process): Delete.
14134 (add_lwp): Don't set last_resume_kind here.
14135 (linux_kill): Use `mourn'.
14136 (linux_detach): Use `thread_db_detach', and `mourn'.
14137 (linux_mourn): New.
14138 (linux_attach_lwp_1): Adjust comment.
14139 (linux_attach): last_resume_kind moved the thread_info; adjust.
14140 (status_pending_p_callback): Adjust.
14141 (linux_wait_for_event_1): Adjust.
14142 (count_events_callback, select_singlestep_lwp_callback)
14143 (select_event_lwp_callback, cancel_breakpoints_callback)
14144 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14145 (proceed_one_lwp): Adjust.
14146 (linux_async): Add debug output.
14147 (linux_thread_stopped): New.
14148 (linux_pause_all): New.
14149 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14150 linux_pause_all.
14151 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14152 (thread_db_free): Delete declaration.
14153 (thread_db_detach, thread_db_mourn): Declare.
14154 * thread-db.c (thread_db_init): Use thread_db_mourn.
14155 (thread_db_free): Delete, split in two.
14156 (disable_thread_event_reporting): New.
14157 (thread_db_detach): New.
14158 (thread_db_mourn): New.
14159
14160 * server.h (struct thread_info) <last_resume_kind>: New field.
14161 <attached>: Add comment.
14162 <gdb_detached>: New field.
14163 (handler_func): Change return type to int.
14164 (handle_serial_event, handle_target_event): Ditto.
14165 (gdb_connected): Declare.
14166 (tracing): Delete.
14167 (disconnected_tracing): Declare.
14168 (stop_tracing): Declare.
14169
14170 * server.c (handle_query) <qSupported>: Report support for
14171 disconnected tracing.
14172 (queue_stop_reply_callback): Account for running threads.
14173 (gdb_wants_thread_stopped): New.
14174 (gdb_wants_all_threads_stopped): New.
14175 (gdb_reattached_process): New.
14176 (handle_status): Clear the `gdb_detached' flag of all processes.
14177 In all-stop, stop all threads.
14178 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14179 (process_serial_event): If the remote connection breaks, or if an
14180 exit was forced with "monitor exit", force an event loop exit.
14181 Handle disconnected tracing on detach.
14182 (handle_serial_event): Adjust.
14183 (handle_target_event): If GDB isn't connected, forward events back
14184 to the inferior, unless the last process exited, in which case,
14185 exit gdbserver. Adjust interface.
14186
14187 * remote-utils.c (remote_open): Don't block in accept. Instead
14188 register an event loop source on the listen socket file
14189 descriptor. Refactor bits into ...
14190 (listen_desc): ... this new global.
14191 (gdb_connected): ... this new function.
14192 (enable_async_notification): ... this new function.
14193 (handle_accept_event): ... this new function.
14194 (remote_close): Clear remote_desc.
14195
14196 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14197
14198 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14199 New fields.
14200 (mourn_inferior): Define.
14201 (target_process_qsupported): Avoid the dangling else problem.
14202 (thread_stopped): Define.
14203 (pause_all): Define.
14204 (target_waitstatus_to_string): Declare.
14205 * target.c (target_waitstatus_to_string): New.
14206
14207 * tracepoint.c (tracing): Make extern.
14208 (disconnected_tracing): New.
14209 (stop_tracing): Make extern. Handle tracing stops due to GDB
14210 disconnecting.
14211 (cmd_qtdisconnected): New.
14212 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14213 (handle_tracepoint_general_set): Handle QTDisconnected.
14214
14215 * event-loop.c (event_handler_func): Change return type to int.
14216 (process_event): Bail out if the event handler wants the event
14217 loop to stop.
14218 (handle_file_event): Ditto.
14219 (start_event_loop): Bail out if the event handler wants the event
14220 loop to stop.
14221
14222 * nto-low.c (nto_target_ops): Adjust.
14223 * spu-low.c (spu_wait): Don't remove the process here.
14224 (spu_target_ops): Adjust.
14225 * win32-low.c (win32_wait): Don't remove the process here.
14226 (win32_target_ops): Adjust.
14227
5d267c4c
PA
142282010-04-11 Pedro Alves <pedro@codesourcery.com>
14229
14230 * regcache.c (realloc_register_cache): Invalidate inferior's
14231 regcache before recreating it.
14232
623ccd72
PA
142332010-04-09 Pedro Alves <pedro@codesourcery.com>
14234
14235 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14236
219f2f23
PA
142372010-04-09 Stan Shebs <stan@codesourcery.com>
14238 Pedro Alves <pedro@codesourcery.com>
14239
14240 * server.h (LONGEST): New.
14241 (struct thread_info) <while_stepping>: New field.
14242 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14243 Declare.
14244 (initialize_tracepoint, handle_tracepoint_general_set)
14245 (handle_tracepoint_query, tracepoint_finished_step)
14246 (tracepoint_was_hit, release_while_stepping_state_list):
14247 (current_traceframe): Declare.
14248 * server.c (handle_general_set): Handle tracepoint packets.
14249 (read_memory): New.
14250 (write_memory): New.
14251 (handle_search_memory_1): Use read_memory.
14252 (handle_query): Report support for conditional tracepoints, trace
14253 state variables, and tracepoint sources. Handle tracepoint
14254 queries.
14255 (main): Initialize the tracepoints module.
14256 (process_serial_event): Handle traceframe reads/writes.
14257
14258 * linux-low.c (handle_tracepoints): New.
14259 (linux_wait_1): Call it.
14260 (linux_resume_one_lwp): Handle while-stepping.
14261 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14262 (linux_target_ops): Install them.
14263 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14264 New field.
14265 * linux-x86-low.c (x86_supports_tracepoints): New.
14266 (the_low_target). Install it.
14267
14268 * mem-break.h (delete_breakpoint): Declare.
14269 * mem-break.c (delete_breakpoint): Make external.
14270
14271 * target.h (struct target_ops): Add `supports_tracepoints',
14272 `read_pc', and `write_pc' fields.
14273 (target_supports_tracepoints): Define.
14274 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14275 (phex_nz): New.
14276
14277 * regcache.h (struct regcache) <registers_owned>: New field.
14278 (init_register_cache, regcache_cpy): Declare.
14279 (regcache_read_pc, regcache_write_pc): Declare.
14280 (register_cache_size): Declare.
14281 (supply_regblock): Declare.
14282 * regcache.c (init_register_cache): New.
14283 (new_register_cache): Use it.
14284 (regcache_cpy): New.
14285 (register_cache_size): New.
14286 (supply_regblock): New.
14287 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14288
219f2f23
PA
14289 * tracepoint.c: New.
14290
14291 * Makefile.in (OBS): Add tracepoint.o.
14292 (tracepoint.o): New rule.
14293
3a13a53b
L
142942010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14295
14296 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14297 (i386-mmx.o): New.
14298 (i386-mmx.c): Likewise.
14299 (i386-mmx-linux.o): Likewise.
14300 (i386-mmx-linux.c): Likewise.
14301
14302 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14303 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14304 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14305 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14306
14307 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14308 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14309 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14310
1570b33e
L
143112010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14312
14313 * Makefile.in (clean): Updated.
14314 (i386-avx.o): New.
14315 (i386-avx.c): Likewise.
14316 (i386-avx-linux.o): Likewise.
14317 (i386-avx-linux.c): Likewise.
14318 (amd64-avx.o): Likewise.
14319 (amd64-avx.c): Likewise.
14320 (amd64-avx-linux.o): Likewise.
14321 (amd64-avx-linux.c): Likewise.
14322
14323 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14324 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14325 (srv_amd64_regobj): Add amd64-avx.o.
14326 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14327 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14328 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14329 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14330 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14331 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14332 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14333
14334 * i387-fp.c: Include "i386-xstate.h".
14335 (i387_xsave): New.
14336 (i387_cache_to_xsave): Likewise.
14337 (i387_xsave_to_cache): Likewise.
14338 (x86_xcr0): Likewise.
14339
14340 * i387-fp.h (i387_cache_to_xsave): Likewise.
14341 (i387_xsave_to_cache): Likewise.
14342 (x86_xcr0): Likewise.
14343
14344 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14345 * linux-crisv32-low.c (target_regsets): Likewise.
14346 * linux-m68k-low.c (target_regsets): Likewise.
14347 * linux-mips-low.c (target_regsets): Likewise.
14348 * linux-ppc-low.c (target_regsets): Likewise.
14349 * linux-s390-low.c (target_regsets): Likewise.
14350 * linux-sh-low.c (target_regsets): Likewise.
14351 * linux-sparc-low.c (target_regsets): Likewise.
14352 * linux-xtensa-low.c (target_regsets): Likewise.
14353
14354 * linux-low.c: Include <sys/uio.h>.
14355 (regsets_fetch_inferior_registers): Support nt_type.
14356 (regsets_store_inferior_registers): Likewise.
14357 (linux_process_qsupported): New.
14358 (linux_target_ops): Add linux_process_qsupported.
14359
14360 * linux-low.h (regset_info): Add nt_type.
14361 (linux_target_ops): Add process_qsupported.
14362
14363 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14364 and <sys/uio.h>.
14365 (init_registers_i386_avx_linux): New.
14366 (init_registers_amd64_avx_linux): Likewise.
14367 (xmltarget_i386_linux_no_xml): Likewise.
14368 (xmltarget_amd64_linux_no_xml): Likewise.
14369 (PTRACE_GETREGSET): Likewise.
14370 (PTRACE_SETREGSET): Likewise.
14371 (x86_fill_xstateregset): Likewise.
14372 (x86_store_xstateregset): Likewise.
14373 (use_xml): Likewise.
14374 (x86_linux_update_xmltarget): Likewise.
14375 (x86_linux_process_qsupported): Likewise.
14376 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14377 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14378 init_registers_i386_linux here. Call
14379 x86_linux_update_xmltarget.
14380 (the_low_target): Add x86_linux_process_qsupported.
14381
14382 * server.c (handle_query): Call target_process_qsupported.
14383
14384 * target.h (target_ops): Add process_qsupported.
14385 (target_process_qsupported): New.
14386
fc7238bb
PA
143872010-04-03 Pedro Alves <pedro@codesourcery.com>
14388
14389 * inferiors.c (add_thread): Set last_status kind to
14390 TARGET_WAITKIND_IGNORE.
14391 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14392 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14393 (linux_wait_1): Move `thread' local definition to block that uses
14394 it. Don't NULL initialize `event_child'.
14395 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14396 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14397 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14398
bdabb078
PA
143992010-04-01 Pedro Alves <pedro@codesourcery.com>
14400
14401 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14402 an extended waitstatus, or by a watchpoint.
14403 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14404 thread was stepping or has been stopped by a watchpoint.
14405
d3bbe7a0
PA
144062010-04-01 Pedro Alves <pedro@codesourcery.com>
14407
14408 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14409 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14410 of another, then delete the previous, and validate all
14411 breakpoints.
14412 (validate_inserted_breakpoint): New.
14413 (delete_disabled_breakpoints): New.
14414 (validate_breakpoints): New.
14415 (check_mem_read): Validate breakpoints before trusting their
14416 shadow. Delete disabled breakpoints.
14417 (check_mem_write): Validate breakpoints before trusting they
14418 should be inserted. Delete disabled breakpoints.
14419 * mem-break.h (validate_breakpoints):
14420 * server.c (handle_query): Validate breakpoints when we see a
14421 qSymbol query.
14422
8b07ae33
PA
144232010-04-01 Pedro Alves <pedro@codesourcery.com>
14424
14425 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14426 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14427 if we could tell there's a GDB breakpoint at stop_pc.
14428 (need_step_over_p): Don't do a step over if we find a GDB
14429 breakpoint at the resume PC.
14430
14431 * mem-break.c (struct raw_breakpoint): New.
14432 (enum bkpt_type): New type `gdb_breakpoint'.
14433 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14434 fields. New field `raw'.
14435 (find_raw_breakpoint_at): New.
14436 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14437 breakpoint instead.
14438 (set_breakpoint_at): Adjust.
14439 (delete_raw_breakpoint): New.
14440 (release_breakpoint): New.
14441 (delete_breakpoint): Rename to...
14442 (delete_breakpoint_1): ... this. Add proc parameter. Use
14443 release_breakpoint. Return ENOENT.
14444 (delete_breakpoint): Reimplement.
14445 (find_breakpoint_at): Delete.
14446 (find_gdb_breakpoint_at): New.
14447 (delete_breakpoint_at): Delete.
14448 (set_gdb_breakpoint_at): New.
14449 (delete_gdb_breakpoint_at): New.
14450 (gdb_breakpoint_here): New.
14451 (set_reinsert_breakpoint): Use release_breakpoint.
14452 (uninsert_breakpoint): Rename to ...
14453 (uninsert_raw_breakpoint): ... this.
14454 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14455 (reinsert_raw_breakpoint): Change parameter type to
14456 raw_breakpoint.
14457 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14458 instead.
14459 (check_breakpoints): Adjust. Use release_breakpoint.
14460 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14461 (breakpoint_inserted_here): Ditto.
14462 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14463 Don't trust the breakpoint's shadow if it is not inserted.
14464 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14465 (delete_all_breakpoints): Adjust.
14466 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14467 use delete_breakpoint_1.
14468
14469 * mem-break.h (breakpoints_supported): Delete declaration.
14470 (set_gdb_breakpoint_at): Declare.
14471 (gdb_breakpoint_here): Declare.
14472 (delete_breakpoint_at): Delete.
14473 (delete_gdb_breakpoint_at): Declare.
14474
14475 * server.h (struct raw_breakpoint): Forward declare.
14476 (struct process_info): New field `raw_breakpoints'.
14477
14478 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14479 breakpoints.
14480
6bf5e0ba
PA
144812010-03-24 Pedro Alves <pedro@codesourcery.com>
14482
14483 * linux-low.c (status_pending_p_callback): Fix comment.
14484 (linux_wait_for_event_1): Move most of the internal breakpoint
14485 handling from here...
14486 (linux_wait_1): ... to here.
14487 (count_events_callback): New.
14488 (select_singlestep_lwp_callback): New.
14489 (select_event_lwp_callback): New.
14490 (cancel_breakpoints_callback): New.
14491 (select_event_lwp): New.
14492 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14493 priority to all LWPs that have had events that should be reported
14494 to the client. Cancel breakpoints when about to reporting the
14495 event to the client, not while stopping lwps. No longer cancel
14496 finished single-steps here.
14497 (cancel_finished_single_step): Delete.
14498 (cancel_finished_single_steps): Delete.
14499
414a389f
PA
145002010-03-24 Pedro Alves <pedro@codesourcery.com>
14501
14502 * mem-break.c (enum bkpt_type): New.
14503 (struct breakpoint): New field `type'.
14504 (set_breakpoint_at): Change return type to struct breakpoint
14505 pointer. Set type to `other_breakpoint' by default.
14506 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14507 in the breakpoint list.
14508 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14509 (reinsert_breakpoint): Rename to ...
14510 (reinsert_raw_breakpoint): ... this.
14511 (reinsert_breakpoints_at): Adjust.
14512 * mem-break.h (struct breakpoint): Declare.
14513 (set_breakpoint_at): Change return type to struct breakpoint
14514 pointer.
14515
2280c721
PA
145162010-03-24 Pedro Alves <pedro@codesourcery.com>
14517
14518 * server.c (handle_query): Assign, not compare.
14519
d50171e4
PA
145202010-03-24 Pedro Alves <pedro@codesourcery.com>
14521
14522 Teach linux gdbserver to step-over-breakpoints.
14523
14524 * linux-low.c (can_hardware_single_step): New.
14525 (supports_breakpoints): New.
14526 (handle_extended_wait): If stopping threads, read the stop pc of
14527 the new cloned LWP.
14528 (get_pc): New.
14529 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14530 low target doesn't support retrieving the PC.
14531 (add_lwp): Set last_resume_kind to resume_continue.
14532 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14533 (linux_attach): Don't clear stop_expected. Set the lwp's
14534 last_resume_kind to resume_stop.
14535 (linux_detach_one_lwp): Don't check for removed breakpoints.
14536 (check_removed_breakpoint): Delete.
14537 (status_pending_p): Rename to ...
14538 (status_pending_p_callback): ... this. Don't check for removed
14539 breakpoints. Don't consider threads that are stopped from GDB's
14540 perspective.
14541 (linux_wait_for_lwp): Always read the stop_pc here.
14542 (cancel_breakpoint): New.
14543 (step_over_bkpt): New global.
14544 (linux_wait_for_event_1): Implement stepping over breakpoints.
14545 (gdb_wants_lwp_stopped): New.
14546 (gdb_wants_all_stopped): New.
14547 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14548 single-step traps here. Store the thread's last reported target
14549 wait status.
14550 (send_sigstop): Don't clear stop_expected. Always set it,
14551 instead.
14552 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14553 (cancel_finished_single_step): New.
14554 (cancel_finished_single_steps): New.
14555 (wait_for_sigstop): Don't cancel finished single-step traps here.
14556 (linux_resume_one_lwp): Don't check for removed breakpoints.
14557 Don't set `step' on non-hardware step archs.
14558 (linux_set_resume_request): Ignore resume_stop requests if already
14559 stopping or stopped. Set the lwp's last_resume_kind.
14560 (resume_status_pending_p): Don't check for removed breakpoints.
14561 (need_step_over_p): New.
14562 (start_step_over): New.
14563 (finish_step_over): New.
14564 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14565 requests. Clear the thread's last reported target waitstatus.
14566 Don't use the `suspended' flag. Don't consider pending breakpoints.
14567 (linux_resume): Start a step-over if necessary.
14568 (proceed_one_lwp): New.
14569 (proceed_all_lwps): New.
14570 (unstop_all_lwps): New.
14571 * linux-low.h (struct lwp_info): Rewrite comment for the
14572 `suspended' flag. Add the `stop_pc' field. Delete the
14573 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14574 Add `'last_resume_kind' and `need_step_over' fields.
14575 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14576 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14577 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14578 (set_raw_breakpoint_at): New.
14579 (set_breakpoint_at): Rewrite to use it.
14580 (reinsert_breakpoint_handler): Delete.
14581 (set_reinsert_breakpoint): New.
14582 (reinsert_breakpoint_by_bp): Delete.
14583 (delete_reinsert_breakpoints): New.
14584 (uninsert_breakpoint): Rewrite.
14585 (uninsert_breakpoints_at): New.
14586 (reinsert_breakpoint): Rewrite.
14587 (reinsert_breakpoints_at): New.
14588 (check_breakpoints): Rewrite.
14589 (breakpoint_here): New.
14590 (breakpoint_inserted_here): New.
14591 (check_mem_read): Adjust.
14592 * mem-break.h (breakpoints_supported, breakpoint_here)
14593 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14594 (reinsert_breakpoint_by_bp): Delete declaration.
14595 (delete_reinsert_breakpoints): Declare.
14596 (reinsert_breakpoint): Delete declaration.
14597 (reinsert_breakpoints_at): Declare.
14598 (uninsert_breakpoint): Delete declaration.
14599 (uninsert_breakpoints_at): Declare.
14600 (check_breakpoints): Adjust prototype.
14601 * server.h: Adjust include order.
14602 (struct thread_info): Declare here. Add a `last_status' field.
14603
30ba68cb
MS
146042010-03-23 Michael Snyder <msnyder@vmware.com>
14605
14606 * server.c (crc32): New function.
14607 (handle_query): Add handling for 'qCRC:' request.
14608
b9a881c2
PA
146092010-03-23 Pedro Alves <pedro@codesourcery.com>
14610
14611 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14612 lwp had been stopped by a watchpoint.
14613
e92d13d5
PA
146142010-03-16 Pedro Alves <pedro@codesourcery.com>
14615
14616 * server.h (internal_error): Declare.
14617 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14618 * utils.c (internal_error): New function.
14619
64daa791
AS
146202010-03-15 Andreas Schwab <schwab@redhat.com>
14621
14622 * configure.srv: Fix typo setting srv_regobj.
14623
f52cd8cd
PA
146242010-03-15 Pedro Alves <pedro@codesourcery.com>
14625
14626 * linux-low.c (fetch_register): Avoid passing a non string literal
14627 format to `error'.
14628 (usr_store_inferior_registers): Ditto.
14629
93ae6fdc
PA
146302010-03-14 Pedro Alves <pedro@codesourcery.com>
14631
14632 * linux-low.c (linux_write_memory): Bail out early if peeking
14633 memory failed.
14634
c3adc08c
PA
146352010-03-14 Pedro Alves <pedro@codesourcery.com>
14636
14637 * linux-low.h (struct lwp_info): New fields
14638 `stopped_by_watchpoint' and `stopped_data_address'.
14639 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14640 here, and cache them in the lwp object.
14641 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14642 directly.
14643 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14644 field.
14645 (linux_stopped_by_watchpoint): Rewrite.
14646 (linux_stopped_data_address): Rewrite.
14647
bce522a2
PA
146482010-03-06 Simo Melenius <simo.melenius@iki.fi>
14649
14650 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14651 switching the current inferior, not before.
14652
90884b2b
L
146532010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14654
14655 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14656 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14657 i386-linux.c and amd64-linux.c.
14658 (reg-i386.o): Removed.
14659 (reg-i386.c): Likewise.
14660 (reg-i386-linux.o): Likewise.
14661 (reg-i386-linux.c): Likewise.
14662 (reg-x86-64.o): Likewise.
14663 (reg-x86-64.c): Likewise.
14664 (reg-x86-64-linux.o): Likewise.
14665 (reg-x86-64-linux.c): Likewise.
14666 (i386.o): New.
14667 (i386.c): Likewise.
14668 (i386-linux.o): Likewise.
14669 (i386-linux.c): Likewise.
14670 (amd64.o): Likewise.
14671 (amd64.c): Likewise.
14672 (amd64-linux.o): Likewise.
14673 (amd64-linux.c): Likewise.
14674
14675 * configure.srv (srv_i386_regobj): New.
14676 (srv_i386_linux_regobj): Likewise.
14677 (srv_amd64_regobj): Likewise.
14678 (srv_amd64_linux_regobj): Likewise.
14679 (srv_i386_32bit_xmlfiles): Likewise.
14680 (srv_i386_64bit_xmlfiles): Likewise.
14681 (srv_i386_xmlfiles): Likewise.
14682 (srv_amd64_xmlfiles): Likewise.
14683 (srv_i386_linux_xmlfiles): Likewise.
14684 (srv_amd64_linux_xmlfiles): Likewise.
14685 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14686 srv_xmlfiles to $srv_i386_xmlfiles.
14687 (i[34567]86-*-mingw32ce*): Likewise.
14688 (i[34567]86-*-mingw*): Likewise.
14689 (i[34567]86-*-nto*): Likewise.
14690 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14691 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14692 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14693 (x86_64-*-linux*): Likewise.
14694
14695 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14696 (init_registers_amd64_linux): New.
14697 (x86_arch_setup): Replace init_registers_x86_64_linux with
14698 init_registers_amd64_linux.
14699
193f13e6
MK
147002010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14701
14702 * configure.ac: Check for libdl. If it is not available link against
14703 static libthread_db.
14704 * configure: Regenerate.
14705
85d721b8
PA
147062010-02-22 Pedro Alves <pedro@codesourcery.com>
14707
14708 PR9605
14709
14710 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14711 handing a read watchpoint.
14712 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14713
6076632b
DE
147142010-02-12 Doug Evans <dje@google.com>
14715
14716 * linux-low.c (linux_supports_tracefork_flag): Document.
14717 (linux_look_up_symbols): Add comment.
14718
3327ccf7
L
147192010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14720
14721 * regcache.c (supply_register): Clear regcache if buf is NULL.
14722
0718675c 147232010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14724 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14725
14726 * inferiors.c (find_inferior): Add function documentation.
14727 (unloaded_dll): Handle the case where the unloaded dll has not
14728 been previously registered in the dll list.
14729
177321bd
DJ
147302010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14733 (thumb2_breakpoint): New.
14734 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14735
2b009048
DJ
147362010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14737
14738 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14739 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14740 breakpoints.
14741
3be029c7
PA
147422010-01-21 Pedro Alves <pedro@codesourcery.com>
14743
14744 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14745
18f5de3b
JK
147462010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14747
14748 * linux-s390-low.c (s390_collect_ptrace_register)
14749 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14750
3743bb4f
DE
147512010-01-21 Doug Evans <dje@google.com>
14752
14ce3065
DE
14753 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14754 (PTRACE_ARG4_TYPE): New macro.
14755 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14756 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14757 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14758 (usr_store_inferior_registers): Ditto.
14759 (linux_read_memory, linux_write_memory): Ditto.
14760 (linux_test_for_tracefork): Ditto.
14761
3743bb4f
DE
14762 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14763 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14764
8b315be5
PA
147652010-01-21 Pedro Alves <pedro@codesourcery.com>
14766
14767 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14768 target.
14769
85492558
PA
147702010-01-21 Pedro Alves <pedro@codesourcery.com>
14771
14772 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14773 prototype to take a regcache. Adjust.
14774
442ea881
PA
147752010-01-20 Pedro Alves <pedro@codesourcery.com>
14776
14777 * regcache.h (struct thread_info): Forward declare.
14778 (struct regcache): New.
14779 (new_register_cache): Adjust prototype.
14780 (get_thread_regcache): Declare.
14781 (free_register_cache): Adjust prototype.
14782 (registers_to_string, registers_from_string): Ditto.
14783 (supply_register, supply_register_by_name, collect_register)
14784 (collect_register_as_string, collect_register_by_name): Ditto.
14785 * regcache.c (struct inferior_regcache_data): Delete.
14786 (get_regcache): Rename to ...
14787 (get_thread_regcache): ... this. Adjust. Switch inferior before
14788 fetching registers.
14789 (regcache_invalidate_one): Adjust.
14790 (regcache_invalidate): Fix prototype.
14791 (new_register_cache): Return the new register cache.
14792 (free_register_cache): Change prototype.
14793 (realloc_register_cache): Adjust.
14794 (registers_to_string): Change prototype to take a regcache. Adjust.
14795 (registers_from_string): Ditto.
14796 (register_data): Ditto.
14797 (supply_register): Ditto.
14798 (supply_register_by_name): Ditto.
14799 (collect_register): Ditto.
14800 (collect_register_as_string): Ditto.
14801 (collect_register_by_name): Ditto.
14802 * server.c (process_serial_event): Adjust.
14803 * linux-low.h (regset_fill_func, regset_store_func): Change
14804 prototype.
14805 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14806 Change prototype.
14807 * linux-low.c (get_stop_pc): Adjust.
14808 (check_removed_breakpoint): Adjust.
14809 (linux_wait_for_event): Adjust.
14810 (linux_resume_one_lwp): Adjust.
14811 (fetch_register): Add regcache parameter. Adjust.
14812 (usr_store_inferior_registers): Ditto.
14813 (regsets_fetch_inferior_registers): Ditto.
14814 (regsets_store_inferior_registers): Ditto.
14815 (linux_fetch_registers, linux_store_registers): Ditto.
14816 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14817 regcache. Adjust.
43aaf8b6
PA
14818 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14819 Ditto.
442ea881
PA
14820 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14821 prototype to take a regcache.
14822 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14823 * remote-utils.c (convert_ascii_to_int, outreg)
14824 (prepare_resume_reply): Change prototype to take a regcache.
14825 Adjust.
14826 * target.h (struct target_ops) <fetch_registers, store_registers>:
14827 Change prototype to take a regcache.
14828 (fetch_inferior_registers, store_inferior_registers): Change
14829 prototype to take a regcache. Adjust.
14830 * proc-service.c (ps_lgetregs): Adjust.
14831 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14832 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14833 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14834 take a regcache. Adjust.
14835 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14836 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14837 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14838 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14839 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14840 (cris_cannot_fetch_register):
14841 (cris_breakpoint_at): Change prototype to take a regcache.
14842 Adjust.
14843 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14844 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14845 to take a regcache. Adjust.
14846 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14847 Adjust.
14848 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14849 take a regcache. Adjust.
14850 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14851 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14852 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14853 * linux-mips-low.c (mips_get_pc):
14854 (mips_set_pc): Change prototype to take a regcache. Adjust.
14855 (mips_reinsert_addr): Adjust.
14856 (mips_collect_register): Change prototype to take a regcache.
14857 Adjust.
14858 (mips_supply_register):
14859 (mips_collect_register_32bit, mips_supply_register_32bit)
14860 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14861 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14862 * linux-ppc-low.c (ppc_supply_ptrace_register)
14863 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14864 (parse_spufs_run): Adjust.
14865 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14866 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14867 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14868 take a regcache. Adjust.
14869 * linux-s390-low.c (s390_collect_ptrace_register)
14870 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14871 (s390_set_pc): Change prototype to take a regcache. Adjust.
14872 (s390_arch_setup): Adjust.
14873 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14874 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14875 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14876 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14877 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14878 regcache. Adjust.
14879 (sparc_breakpoint_at): Adjust.
14880 * linux-xtensa-low.c (xtensa_fill_gregset):
14881 (xtensa_store_gregset):
14882 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14883 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14884 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14885 prototype to take a regcache. Adjust.
14886 * win32-arm-low.c (arm_fetch_inferior_register)
14887 (arm_store_inferior_register): Change prototype to take a
14888 regcache. Adjust.
14889 * win32-i386-low.c (i386_fetch_inferior_register)
14890 (i386_store_inferior_register): Change prototype to take a
14891 regcache. Adjust.
14892 * win32-low.c (child_fetch_inferior_registers)
14893 (child_store_inferior_registers): Change prototype to take a
14894 regcache. Adjust.
14895 (win32_wait): Adjust.
14896 (win32_fetch_inferior_registers): Change prototype to take a
14897 regcache. Adjust.
14898 (win32_store_inferior_registers): Adjust.
14899 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14900 store_inferior_register>: Change prototype to take a regcache.
14901
60c3d7b0
DE
149022010-01-20 Doug Evans <dje@google.com>
14903
14904 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14905 #ifdef.
14906 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14907 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14908
dc146f7c
VP
149092010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14910
14911 * linux-low.c (linux_core_of_thread): New.
14912 (compare_ints, show_process, list_threads): New.
14913 (linux_qxfer_osdata): Report threads and cores.
14914 (linux_target_op): Register linux_core_of_thread.
14915 * remote-utils.c (prepare_resume_reply): Report the core.
14916 (buffer_xml_printf): Support %d specifier.
14917 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14918 New.
14919 (handle_query): Handle qXfer:threads. Announce availability
14920 thereof.
14921 * target.h (struct target_ops): New field core_of_thread.
14922
7803799a
UW
149232010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14924
14925 * Makefile.in (clean): Remove new generated files.
14926 (reg-s390.o, reg-s390.c): Remove rules.
14927 (reg-s390x.o, reg-s390x.c): Likewise.
14928 (s390-linux32.o, s390-linux32.c): Add rules.
14929 (s390-linux64.o, s390-linux64.c): Likewise.
14930 (s390x-linux64.o, s390x-linux64.c): Likewise.
14931 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14932 * linux-s390-low.c: Include <elf.h>.
14933 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14934 (init_registers_s390): Remove prototype.
14935 (init_registers_s390x): Likewise.
14936 (init_registers_s390_linux32): Add prototype.
14937 (init_registers_s390_linux64): Likewise.
14938 (init_registers_s390x_linux64): Likewise.
14939 (s390_num_regs_3264): New define.
14940 (s390_regmap_3264): New global variable.
14941 (s390_cannot_fetch_register): Remove obsolete check.
14942 (s390_cannot_store_register): Likewise.
14943 (s390_collect_ptrace_register): Handle upper/lower register halves.
14944 (s390_supply_ptrace_register): Likewise.
14945 (s390_fill_gregset): Update to register number changes.
14946 (s390_get_hwcap): New routine.
14947 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14948 Install appropriate regmap and register set.
14949
6e7ffa39
JB
149502010-01-01 Joel Brobecker <brobecker@adacore.com>
14951
14952 * server.c (gdbserver_version): Update copyright year to 2010.
14953 * gdbreplay.c (gdbreplay_version): Likewise.
14954
957f3f49
DE
149552009-12-28 Doug Evans <dje@google.com>
14956
14957 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14958 elf/external.h. Include <elf.h> instead but only if necessary.
14959
ca5c370d
PA
149602009-12-28 Pedro Alves <pedro@codesourcery.com>
14961
14962 * linux-low.c (linux_remove_process): Remove `detaching'
14963 parameter. Don't release/detach from thread_db here.
14964 (linux_kill): Release/detach from thread_db here, ...
14965 (linux_detach): ... and here, before actually detaching.
14966 (linux_wait_1): ... and here, when a process exits.
14967 * thread-db.c (any_thread_of): New.
14968 (thread_db_free): Switch the current inferior to a thread of the
14969 passed in process.
14970
4ee62156
DE
149712009-12-21 Doug Evans <dje@google.com>
14972
d90e6a88
DE
14973 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14974
c5f62d5f
DE
14975 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14976 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14977 warning ifndef __NR_tkill. Move setting of errno there too.
14978 Delete unnecessary resetting of errno after syscall.
14979 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14980
10e86dd7
DE
14981 * configure.ac: Check for dladdr.
14982 * config.in: Regenerate.
14983 * configure: Regenerate.
14984 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14985 (try_thread_db_load): Update.
14986
4ee62156
DE
14987 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14988
00f515da
DE
149892009-12-18 Doug Evans <dje@google.com>
14990
e9464885
DE
14991 * event-loop.c: Include unistd.h if it exists.
14992
07d4f67e
DE
14993 * linux-low.c (my_waitpid): Move definition away from being in
14994 between linux_tracefork_child/linux_test_for_tracefork.
14995
00f515da
DE
14996 * gdb_proc_service.h (psaddr_t): Fix type.
14997 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14998 signature to match glibc.
14999
1de1badb
DE
150002009-12-16 Doug Evans <dje@google.com>
15001
15002 * linux-low.c (linux_read_memory): Fix argument to read.
15003
aeeb81d1
PA
150042009-11-26 Pedro Alves <pedro@codesourcery.com>
15005
15006 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15007 events, don't leave current_inferior pointing at null.
15008
10357975
PA
150092009-11-26 Pedro Alves <pedro@codesourcery.com>
15010
15011 * win32-low.c (LOG): Delete.
15012 (OUTMSG): Output to stderr.
15013 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15014 on compile time LOG macro.
15015 (win32_wait): Fix debug output.
15016
cf6e3471
PA
150172009-11-26 Pedro Alves <pedro@codesourcery.com>
15018
15019 * win32-low.c (win32_add_one_solib): If the dll name is
15020 "ntdll.dll", prepend the system directory to the dll path.
15021
0c85e18e
MK
150222009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15025
9ac544ce 150262009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15027 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15028
15029 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15030 * configure.ac: Check for __mcoldfire__ and set
15031 gdb_cv_m68k_is_coldfire.
15032 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15033 reg-cf.o and reg-m68k.o.
15034 * configure: Regenerated.
15035
fd7dd3e6
PA
150362009-11-16 Pedro Alves <pedro@codesourcery.com>
15037
15038 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15039 Pass it to thread_db_free.
15040 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15041 proper `detaching' argument to linux_remove_process.
15042 * linux-low.h (thread_db_free): Add `detaching' parameter.
15043 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15044 to thread_db_free.
15045 (thread_db_free): Add `detaching' parameter. Only
15046 call td_ta_clear_event if detaching from process.
15047
75aa492e
MK
150482009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15049
15050 * thread-db.c (thread_db_free): Fix typo.
15051
21e1bee4
PP
150522009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15053
15054 PR gdb/10838
15055 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15056
8838b45e
NS
150572009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15058
15059 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15060 with an i686 compiler.
15061 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15062 needed.
15063 * configure: Rebuilt.
15064
8a35fb51
SL
150652009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15066
15067 PR gdb/10783
15068
15069 * server.c (handle_search_memory_1): Correct read_addr initialization
15070 in loop for searching subsequent chunks.
15071
96f15937
PP
150722009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15073
15074 * configure.ac: New --with-libthread-db option.
15075 * thread-db.c: Allow direct dependence on libthread_db.
15076 (thread_db_free): Adjust.
15077 * config.in: Regenerate.
15078 * configure: Likewise.
889bf7c5 15079
5f7d1694
PP
150802009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15081
15082 PR gdb/10757
15083 * thread-db.c (attach_thread): New function.
15084 (maybe_attach_thread): Return success/failure.
15085 (find_new_threads_callback): Adjust.
889bf7c5
PA
15086 (thread_db_find_new_threads): Loop until no new threads.
15087
88e3b899
PA
150882009-10-13 Pedro Alves <pedro@codesourcery.com>
15089
15090 * proc-service.c (ps_lgetregs): Formatting.
15091
cdbfd419
PP
150922009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15093
15094 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15095 * configure.ac: Adjust.
15096 * linux-low.h (struct process_info_private): Move members to struct
15097 thread_db.
15098 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15099 * linux-low.c (linux_remove_process): Adjust.
15100 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15101 * server.c (handle_query): Move code ...
15102 (handle_monitor_command): ... here. New function.
15103 * target.h (struct target_ops): New member.
15104 * thread-db.c (struct thread_db): New.
15105 (libthread_db_search_path): New variable.
15106 (thread_db_create_event, thread_db_enable_reporting)
15107 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15108 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15109 (try_thread_db_load_1, dladdr_to_soname): New functions.
15110 (try_thread_db_load, thread_db_load_search): New functions.
15111 (thread_db_init): Search for libthread_db.
15112 (thread_db_free): New function.
15113 (thread_db_handle_monitor_command): Likewise.
15114 * config.in: Regenerate.
15115 * configure: Regenerate.
889bf7c5 15116
4168d2d6
UW
151172009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15118
15119 * spu-low.c (spu_kill): Wait for inferior to terminate.
15120 Call clear_inferiors.
15121 (spu_detach): Call clear_inferiors.
15122
81ecdfbb
RW
151232009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15124
15125 * aclocal.m4: Regenerate.
15126 * config.in: Likewise.
15127 * configure: Likewise.
15128
0b9ff2c0
UW
151292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15130
15131 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15132 (parse_spufs_run): New function.
15133 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15134 (ppc_breakpoint_at): Handle SPU breakpoints.
15135
efcbbd14
UW
151362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15137
15138 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15139 (SPUFS_MAGIC): Define.
15140 (spu_enumerate_spu_ids): New function.
15141 (linux_qxfer_spu): New function.
15142 (linux_target_ops): Install linux_qxfer_spu.
15143
f4d9bade
UW
151442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15145
15146 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15147 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15148 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15149 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15150 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15151 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15152 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15153 (init_registers_powerpc_cell32l): Add prototype.
15154 (init_registers_powerpc_cell64l): Likewise.
15155 (ppc_arch_setup): Detect Cell/B.E. architecture.
15156
96e946ca
RW
151572009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15158
15159 * Makefile.in (datarootdir): New variable.
15160
58d6951d
DJ
151612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15162
15163 * linux-low.c (linux_write_memory): Update debugging output.
15164 * Makefile.in (clean): Add new descriptions.
15165 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15166 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15167 * configure.srv: Add new files for arm*-*-linux*.
15168 * linux-arm-low.c: Add new declarations.
15169 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15170 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15171 (HWCAP_VFPv3D16): New.
15172 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15173 instead of __IWMMXT__.
15174 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15175 (arm_arch_setup): New.
15176 (target_regsets): Remove #ifdef. Add VFP regset.
15177 (the_low_target): Use arm_arch_setup.
15178
12b42a12
DJ
151792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15182 the main thread again.
15183
ac8c974e
AR
151842009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15185
15186 Adding Neutrino gdbserver.
15187 * configure: Regenerated.
15188 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15189 * configure.srv (i[34567]86-*-nto*): New target.
15190 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15191 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15192 (nto_comctrl) [__QNX__]: New function.
15193 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15194
4424e0c3 151952009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15196
15197 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15198 srv_tgtobj.
15199
912cf4ba
PA
152002009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15201 Pedro Alves <pedro@codesourcery.com>
15202
15203 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15204 don't support CONTEXT_EXTENDED_REGISTERS.
15205 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15206 (the_low_target): Install them.
15207 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15208 failing with ERROR_PIPE_NOT_CONNECTED.
15209
aa5ca48f
DE
152102009-06-30 Doug Evans <dje@google.com>
15211 Pierre Muller <muller@ics.u-strasbg.fr>
15212
15213 Add h/w watchpoint support to x86-linux, win32-i386.
15214 * Makefile.in (SFILES): Add i386-low.c
15215 (i386_low_h): Define.
15216 (i386-low.o): Add dependencies.
15217 (linux-x86-low.o): Add i386-low.h dependency.
15218 (win32-i386-low.o): Ditto.
15219 * i386-low.c: New file.
15220 * i386-low.h: New file.
15221 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15222 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15223 * linux-low.c (linux_add_process): Initialize arch_private.
15224 (linux_remove_process): Free arch_private.
15225 (add_lwp): Initialize arch_private.
15226 (delete_lwp): Free arch_private.
15227 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15228 provided.
15229 * linux-low.h (process_info_private): New member arch_private.
15230 (lwp_info): New member arch_private.
15231 (linux_target_ops): New members new_process, new_thread,
15232 prepare_to_resume.
15233 (ptid_of): New macro.
15234 * linux-x86-low.c: Include stddef.h, i386-low.h.
15235 (arch_process_info): New struct.
15236 (arch_lwp_info): New struct.
15237 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15238 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15239 (i386_dr_low_get_status): New function.
15240 (x86_insert_point, x86_remove_point): New functions.
15241 (x86_stopped_by_watchpoint): New function.
15242 (x86_stopped_data_address): New function.
15243 (x86_linux_new_process, x86_linux_new_thread): New functions.
15244 (x86_linux_prepare_to_resume): New function.
15245 (the_low_target): Add entries for insert_point, remove_point,
15246 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15247 prepare_to_resume.
15248 * server.c (debug_hw_points): New global.
15249 (monitor_show_help): Document set debug-hw-points.
15250 (handle_query): Process "set debug-hw-points".
15251 * server.h (debug_hw_points): Declare.
15252 (paddress): Declare.
15253 * utils.c (NUMCELLS, CELLSIZE): New macros.
15254 (get_sell, xsnprintf, paddress): New functions.
15255 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15256 remove_point, stopped_by_watchpoint, stopped_data_address.
15257 * win32-i386-low.c: Include i386-low.h.
15258 (debug_reg_state): Replaces dr.
15259 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15260 (i386_dr_low_get_status): New function.
15261 (i386_insert_point, i386_remove_point): New functions.
15262 (i386_stopped_by_watchpoint): New function.
15263 (i386_stopped_data_address): New function.
15264 (i386_initial_stuff): Update.
15265 (get_thread_context,set_thread_context,i386_thread_added): Update.
15266 (the_low_target): Add entries for insert_point,
15267 remove_point, stopped_by_watchpoint, stopped_data_address.
15268 * win32-low.c (win32_insert_watchpoint): New function.
15269 (win32_remove_watchpoint): New function.
15270 (win32_stopped_by_watchpoint): New function.
15271 (win32_stopped_data_address): New function.
15272 (win32_target_ops): Add entries for insert_watchpoint,
15273 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15274 * win32-low.h (win32_target_ops): New members insert_point,
15275 remove_point, stopped_by_watchpoint, stopped_data_address.
15276
d993e290
PA
152772009-06-25 Pedro Alves <pedro@codesourcery.com>
15278
15279 * server.c (process_serial_event): Re-return unsupported, not
15280 error, if the type isn't recognized. Re-allow supporting only
15281 insert or remove packets. Also call require_running for
15282 breakpoints. Add missing break statement to default case. Tidy.
15283 * target.h (struct target_ops): Rename insert_watchpoint to
15284 insert_point, and remove_watchpoint to remove_point.
15285
15286 * linux-low.h (struct linux_target_ops): Likewise.
15287 * linux-low.c (linux_insert_watchpoint): Rename to ...
15288 (linux_insert_point): ... this. Adjust.
15289 (linux_remove_watchpoint): Rename to ...
15290 (linux_remove_point): ... this. Adjust.
15291 (linux_target_ops): Adjust.
15292 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15293 (cris_insert_point): ... this.
15294 (cris_remove_watchpoint): Rename to ...
15295 (cris_remove_point): ... this.
15296 (the_low_target): Adjust.
15297
0f54c268
PM
152982009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15299
15300 * server.c (handle_v_kill): Pass signal_pid to
15301 kill_inferior if multi_process is zero.
15302
c6314022
AR
153032009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15304
15305 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15306 * target.h (target_ops): Comment for *_watchpoint to make it clear
15307 the functions can get types '0' and '1'.
15308
4463ce24
AR
153092009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15310
15311 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15312 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15313 * regcache.c (get_regcache): Likewise.
15314 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15315 * win32-low.c (child_fetch_inferior_registers): Remove check for
15316 regno 0.
15317
cf8fd78b
PA
153182009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15319 Pedro Alves <pedro@codesourcery.com>
15320
15321 * target.h (struct target_ops) <supports_multi_process>: New
15322 callback.
15323 (target_supports_multi_process): New.
15324 * server.c (handle_query): Even if GDB reports support, only
15325 enable multi-process if the target also supports it. Report
15326 multi-process support only if the target backend supports it.
15327 * linux-low.c (linux_supports_multi_process): New function.
15328 (linux_target_ops): Install it as target_supports_multi_process
15329 callback.
15330
47c0c975
DE
153312009-05-24 Doug Evans <dje@google.com>
15332
e09875d4
DE
15333 Global renaming of find_thread_pid to find_thread_ptid.
15334 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15335 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15336 All callers updated.
15337
e27d73f6
DE
15338 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15339 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15340 directly.
15341
47c0c975
DE
15342 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15343 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15344 (linux_resume_one_lwp): Ditto.
15345
2acc282a
DE
153462009-05-23 Doug Evans <dje@google.com>
15347
15348 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15349 from struct inferior_list_entry * to struct lwp_info *.
15350 All callers updated.
15351
9f1036c1
DE
153522009-05-13 Doug Evans <dje@google.com>
15353
15354 * linux-x86-low.c: Don't include assert.h.
15355 (x86_siginfo_fixup): Use fatal, not assert.
15356 (x86_arch_setup): Fix comment.
15357
d0722149
DE
153582009-05-12 Doug Evans <dje@google.com>
15359
15360 Biarch support for i386/amd64 gdbserver.
15361 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15362 Add linux-x86-low.c.
15363 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15364 (linux-x86-low.o): Add.
15365 * linux-x86-64-low.c: Delete.
15366 * linux-i386-low.c: Delete.
15367 * linux-x86-low.c: New file.
15368 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15369 linux-x86-low.o.
15370 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15371 linux-x86-low.o.
15372 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15373 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15374 (linux_child_pid_to_exec_file): New function.
15375 (elf_64_header_p, elf_64_file_p): New functions.
15376 (siginfo_fixup): New function.
15377 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15378 give target a chance to convert layout.
15379 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15380 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15381
fdeb2a12
DE
153822009-05-07 Doug Evans <dje@google.com>
15383
15384 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15385 (regsets_store_inferior_registers): Ditto.
15386
a6dbe5df
PA
153872009-05-06 Pedro Alves <pedro@codesourcery.com>
15388
15389 PR server/10048
15390
15391 * linux-low.c (must_set_ptrace_flags): Delete.
15392 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15393 of the global.
15394 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15395 `lwp->must_set_ptrace_flags' instead.
ba42693b 15396 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15397 (linux_wait_1): ... not here.
15398
5091eb23
DE
153992009-04-30 Doug Evans <dje@google.com>
15400
9f767825
DE
15401 * inferiors.c (started_inferior_callback): New function.
15402 (attached_inferior_callback): New function.
15403 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15404 * server.c (print_started_pid, print_attached_pid): New functions.
15405 (detach_or_kill_for_exit): New function.
15406 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15407 * server.h (have_started_inferiors_p): Declare.
15408 (have_attached_inferiors_p): Declare.
15409
5091eb23
DE
15410 * inferiors.c (remove_process): Fix memory leak, free process.
15411 * linux-low.c (linux_remove_process): New function.
15412 (linux_kill): Call it instead of remove_process.
15413 (linux_detach, linux_wait_1): Ditto.
15414
155c8968
PA
154152009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15416
15417 * configure.srv: Add x86 Windows CE target.
15418
7fe519cb
UW
154192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15420
15421 * inferiors.c (get_thread_process): Make global.
15422 * server.h (get_thread_process): Add prototype.
15423 * thread-db.c (find_one_thread): Use get_thread_process
15424 instead of current_process.
15425 (thread_db_get_tls_address): Do not crash if called when
15426 thread layer is not yet initialized.
15427
5472f405
UW
154282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15429
15430 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15431 * spu-low.c (current_tid): Rename to ...
15432 (current_ptid): ... this.
15433 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15434 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15435 ptid_get_lwp (current_ptid) instead of current_tid.
15436 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15437 instead of current_tid. Use find_process_pid to verify pid
15438 argument is valid. Pass proper argument to remove_process.
15439 (spu_thread_alive): Compare current_ptid instead of current_tid.
15440 (spu_resume): Likewise.
15441
55ac2b99
PA
154422009-04-02 Pedro Alves <pedro@codesourcery.com>
15443
15444 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15445 variable.
15446
95954743
PA
154472009-04-01 Pedro Alves <pedro@codesourcery.com>
15448
15449 Implement the multiprocess extensions, and add linux multiprocess
15450 support.
15451
15452 * server.h (ULONGEST): Declare.
15453 (struct ptid, ptid_t): New.
15454 (minus_one_ptid, null_ptid): Declare.
15455 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15456 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15457 (struct inferior_list_entry): Change `id' type from unsigned from
15458 to ptid_t.
15459 (struct sym_cache, struct breakpoint, struct
15460 process_info_private): Forward declare.
15461 (struct process_info): Declare.
15462 (current_process): Declare.
15463 (all_processes): Declare.
15464 (initialize_inferiors): Declare.
15465 (add_thread): Adjust to use ptid_t.
15466 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15467 (add_process, remove_process, find_thread_pid): Declare.
15468 (find_inferior_id): Adjust to use ptid_t.
15469 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15470 (multi_process): Declare.
15471 (push_event): Adjust to use ptid_t.
15472 (read_ptid, write_ptid): Declare.
15473 (prepare_resume_reply): Adjust to use ptid_t.
15474 (clear_symbol_cache): Declare.
15475 * inferiors.c (all_processes): New.
15476 (null_ptid, minus_one_ptid): New.
15477 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15478 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15479 (add_thread): Change unsigned long to ptid. Remove gdb_id
15480 parameter. Adjust.
15481 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15482 (gdb_id_to_thread): Rename to ...
15483 (find_thread_pid): ... this. Change unsigned long to ptid.
15484 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15485 (loaded_dll, pull_pid_from_list): Adjust.
15486 (add_process, remove_process, find_process_pid)
15487 (get_thread_process, current_process, initialize_inferiors): New.
15488 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15489 (struct target_waitstatus) <related_pid>: Ditto.
15490 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15491 return type to int.
15492 (struct target_ops) <join>: Add `pid' argument.
15493 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15494 (struct target_ops) <wait>: Add `ptid' field. Change return type
15495 to ptid.
15496 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15497 (mywait): Add `ptid' argument. Change return type to ptid_t.
15498 (target_pid_to_str): Declare.
15499 * target.c (set_desired_inferior): Adjust to use ptids.
15500 (mywait): Add new `ptid' argument. Adjust.
15501 (target_pid_to_str): New.
15502 * mem-break.h (free_all_breakpoints): Declare.
15503 * mem-break.c (breakpoints): Delelete.
15504 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15505 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15506 to use per-process breakpoint list.
15507 (free_all_breakpoints): New.
15508 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15509 (symbol_cache, all_symbols_looked_up): Delete.
15510 (hexchars): New.
15511 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15512 read_ptid): New.
15513 (prepare_resume_reply): Change ptid argument's type from unsigned
15514 long to ptid_t. Adjust. Implement W;process and X;process.
15515 (free_sym_cache, clear_symbol_cache): New.
15516 (look_up_one_symbol): Adjust to per-process symbol cache. *
15517 * server.c (cont_thread, general_thread, step_thread): Change type
15518 to ptid_t.
15519 (attached): Delete.
15520 (multi_process): New.
15521 (last_ptid): Change type to ptid_t.
15522 (struct vstop_notif) <ptid>: Change type to ptid_t.
15523 (queue_stop_reply, push_event): Change `ptid' argument's type to
15524 ptid_t.
15525 (discard_queued_stop_replies): Add `pid' argument.
15526 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15527 changes. Don't reference the `attached' global.
15528 (attach_inferior): Adjust to mywait interface changes.
15529 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15530 features. Handle and report "multiprocess+". Handle
15531 "qAttached:PID".
15532 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15533 changes.
15534 (handle_v_kill): New.
15535 (handle_v_stopped): Adjust to use target_pid_to_str.
15536 (handle_v_requests): Allow multiple attaches and runs when
15537 multiprocess extensions are in effect. Handle "vKill".
15538 (myresume): Adjust to use ptids.
15539 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15540 (handle_status): Adjust to discard_queued_stop_replies interface
15541 change.
15542 (first_thread_of, kill_inferior_callback)
15543 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15544 (main): Call initialize_inferiors. Adjust to use ptids, killing
15545 and detaching from all inferiors. Handle multiprocess packet
15546 variants.
15547 * linux-low.h: Include gdb_proc_service.h.
15548 (struct process_info_private): New.
15549 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15550 <lwpid_of>: Use ptid_get_lwp.
15551 (get_lwp_thread): Adjust.
15552 (struct lwp_info): Add `dead' member.
15553 (find_lwp_pid): Declare.
15554 * linux-low.c (thread_db_active): Delete.
15555 (new_inferior): Adjust comment.
15556 (inferior_pid): Delete.
15557 (linux_add_process): New.
15558 (handle_extended_wait): Adjust.
15559 (add_lwp): Change unsigned long to ptid.
15560 (linux_create_inferior): Add process to processes table. Adjust
15561 to use ptids. Don't set new_inferior here.
15562 (linux_attach_lwp): Rename to ...
15563 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15564 it. Adjust to use ptids.
15565 (linux_attach_lwp): New.
15566 (linux_attach): Add process to processes table. Don't set
15567 new_inferior here.
15568 (struct counter): New.
15569 (second_thread_of_pid_p, last_thread_of_process_p): New.
15570 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15571 multiple processes.
15572 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15573 processes. Remove process from process table.
15574 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15575 to multiple processes.
15576 (any_thread_of): New.
15577 (linux_detach): Add `pid' argument, and handle it. Remove process
15578 from processes table.
15579 (linux_join): Add `pid' argument. Handle it.
15580 (linux_thread_alive): Change unsighed long argument to ptid_t.
15581 Consider dead lwps as not being alive.
15582 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15583 threads we're not interested in.
15584 (same_lwp, find_lwp_pid): New.
15585 (linux_wait_for_lwp): Change `pid' argument's type from int to
15586 ptid_t. Adjust.
15587 (linux_wait_for_event): Rename to ...
15588 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15589 from int to ptid_t. Adjust.
15590 (linux_wait_for_event): New.
15591 (linux_wait_1): Add `ptid' argument. Change return type to
15592 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15593 that exit from the process table.
15594 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15595 Adjust.
15596 (mark_lwp_dead): New.
15597 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15598 stopping all threads, mark its main lwp as dead.
15599 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15600 ptids.
15601 (fetch_register, usr_store_inferior_registers)
15602 (regsets_fetch_inferior_registers)
15603 (regsets_store_inferior_registers, linux_read_memory)
15604 (linux_write_memory): Inline `inferior_pid'.
15605 (linux_look_up_symbols): Adjust to use per-process
15606 `thread_db_active'.
15607 (linux_request_interrupt): Adjust to use ptids.
15608 (linux_read_auxv): Inline `inferior_pid'.
15609 (initialize_low): Don't reference thread_db_active.
15610 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15611 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15612 (ps_getpid): Return the pid of the current inferior.
15613 * thread-db.c (proc_handle, thread_agent): Delete.
15614 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15615 per-process data.
15616 (find_one_thread): Change argument type to ptid_t. Adjust to
15617 per-process data.
15618 (maybe_attach_thread): Adjust to per-process data and ptids.
15619 (thread_db_find_new_threads): Ditto.
15620 (thread_db_init): Ditto.
15621 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15622 processes table. Adjust to use ptids.
15623 (spu_kill, spu_detach): Adjust interface. Remove process from
15624 processes table.
15625 (spu_join, spu_thread_alive): Adjust interface.
15626 (spu_wait): Adjust interface. Remove process from processes
15627 table. Adjust to use ptids.
15628 * win32-low.c (current_inferior_tid): Delete.
15629 (current_inferior_ptid): New.
15630 (debug_event_ptid): New.
15631 (thread_rec): Take a ptid. Adjust.
15632 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15633 (child_delete_thread): Ditto.
15634 (do_initial_child_stuff): Add `attached' argument. Add process to
15635 processes table.
15636 (child_fetch_inferior_registers, child_store_inferior_registers):
15637 Adjust.
15638 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15639 (win32_attach): Pass 1 to do_initial_child_stuff.
15640 (win32_kill): Adjust interface. Remove process from processes
15641 table.
15642 (win32_detach): Ditto.
15643 (win32_join): Adjust interface.
15644 (win32_thread_alive): Take a ptid.
15645 (win32_resume): Adjust to use ptids.
15646 (get_child_debug_event): Ditto.
15647 (win32_wait): Adjust interface. Remove exiting process from
15648 processes table.
15649
bd99dc85
PA
156502009-04-01 Pedro Alves <pedro@codesourcery.com>
15651
15652 Non-stop mode support.
15653
15654 * server.h (non_stop): Declare.
15655 (gdb_client_data, handler_func): Declare.
15656 (delete_file_handler, add_file_handler, start_event_loop):
15657 Declare.
15658 (handle_serial_event, handle_target_event, push_event)
15659 (putpkt_notif): Declare.
15660 * target.h (enum resume_kind): New.
15661 (struct thread_resume): Replace `step' field by `kind' field.
15662 (TARGET_WNOHANG): Define.
15663 (struct target_ops) <wait>: Add `options' argument.
15664 <supports_non_stop, async, start_non_stop>: New fields.
15665 (target_supports_non_stop, target_async): New.
15666 (start_non_stop): Declare.
15667 (mywait): Add `options' argument.
15668 * target.c (mywait): Add `options' argument. Print child exit
15669 notifications here.
15670 (start_non_stop): New.
15671 * server.c (non_stop, own_buf, mem_buf): New globals.
15672 (struct vstop_notif): New.
15673 (notif_queue): New global.
15674 (queue_stop_reply, push_event, discard_queued_stop_replies)
15675 (send_next_stop_reply): New.
15676 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15677 interface changes.
15678 (attach_inferior): In non-stop mode, don't wait for the target
15679 here.
15680 (handle_general_set): Handle QNonStop.
15681 (handle_query): When handling qC, return the current general
15682 thread, instead of the first thread of the list.
15683 (handle_query): If the backend supports non-stop mode, include
15684 QNonStop+ in the qSupported query response.
15685 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15686 and non-stop mode.
15687 (handle_v_attach, handle_v_run): Handle non-stop mode.
15688 (handle_v_stopped): New.
15689 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15690 (myresume): Adjust to use resume_kind. Handle non-stop.
15691 (queue_stop_reply_callback): New.
15692 (handle_status): Handle non-stop mode.
15693 (main): Clear non_stop flag on reconnection. Use the event-loop.
15694 Refactor serial protocol handling from here ...
15695 (process_serial_event): ... to this new function. When GDB
15696 selects any thread, select one here. In non-stop mode, wait until
15697 GDB acks all pending events before exiting.
15698 (handle_serial_event, handle_target_event): New.
15699 * remote-utils.c (remote_open): Install remote_desc in the event
15700 loop.
15701 (remote_close): Remove remote_desc from the event loop.
15702 (putpkt_binary): Rename to...
15703 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15704 (putpkt_binary): New as wrapper around putpkt_binary_1.
15705 (putpkt_notif): New.
15706 (prepare_resume_reply): In non-stop mode, don't change the
15707 general_thread.
15708 * event-loop.c: New.
15709 * Makefile.in (OBJ): Add event-loop.o.
15710 (event-loop.o): New rule.
15711
15712 * linux-low.h (pid_of): Moved here.
15713 (lwpid_of): New.
15714 (get_lwp_thread): Use lwpid_of.
15715 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15716 * linux-low.c (pid_of): Delete.
15717 (inferior_pid): Use lwpid_of.
15718 (linux_event_pipe): New.
15719 (target_is_async_p): New.
15720 (delete_lwp): New.
15721 (handle_extended_wait): Use lwpid_of.
15722 (add_lwp): Don't set lwpid field.
15723 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15724 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15725 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15726 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15727 first. Adjust to linux_wait_for_event interface changes. Use
15728 lwpid_of.
15729 (linux_detach): Don't delete the main lwp here.
15730 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15731 (status_pending_p): Don't consider explicitly suspended lwps.
15732 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15733 pointer. Add OPTIONS argument. Change return type to int. Use
15734 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15735 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15736 pointer. Add status pointer argument. Return a pid instead of a
15737 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15738 changes. In non-stop mode, don't switch to a random thread.
15739 (linux_wait): Rename to...
15740 (linux_wait_1): ... this. Add target_options argument, and handle
15741 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15742 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15743 clean exit and signal exit code. Don't stop all threads in
15744 non-stop mode. In all-stop mode, only stop all threads when
15745 reporting a stop to GDB. Handle explicit thread stop requests.
15746 (async_file_flush, async_file_mark): New.
15747 (linux_wait): New.
15748 (send_sigstop): Use lwpid_of.
15749 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15750 interface changes. In non-stop mode, don't switch to a random
15751 thread.
15752 (linux_resume_one_lwp): Use lwpid_of.
15753 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15754 (linux_resume_one_thread): ... this. Handle resume_stop. In
15755 non-stop mode, don't look for pending flag in all threads.
15756 (resume_status_pending_p): Don't consider explicitly suspended
15757 threads.
15758 (my_waitpid): Reimplement. Emulate __WALL.
15759 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15760 Use lwpid_of.
15761 (sigchld_handler, linux_supports_non_stop, linux_async)
15762 (linux_start_non_stop): New.
15763 (linux_target_ops): Register linux_supports_non_stop, linux_async
15764 and linux_start_non_stop.
15765 (initialize_low): Install SIGCHLD handler.
15766 * thread-db.c (thread_db_create_event, find_one_thread)
15767 (thread_db_get_tls_address): Use lwpid_of.
15768 * win32-low.c (win32_detach): Adjust to use resume_kind.
15769 (win32_wait): Add `options' argument.
15770 * spu-low.c (spu_resume): Adjust to use resume_kind.
15771 (spu_wait): Add `options' argument.
15772
5b1c542e
PA
157732009-04-01 Pedro Alves <pedro@codesourcery.com>
15774
15775 Decouple target code from remote protocol.
15776
15777 * target.h (enum target_waitkind): New.
15778 (struct target_waitstatus): New.
15779 (struct target_ops) <wait>: Return an unsigned long. Take a
15780 target_waitstatus pointer instead of a char pointer.
15781 (mywait): Likewise.
15782 * target.c (mywait): Change prototype to return an unsigned long.
15783 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15784 * server.h (thread_from_wait, old_thread_from_wait): Delete
15785 declarations.
15786 (prepare_resume_reply): Change prototype to take a
15787 target_waitstatus.
15788 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15789 (last_status, last_ptid): New.
15790 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15791 pid instead of a signal.
15792 (attach_inferior): Remove "status" and "signal" parameters.
15793 Adjust.
15794 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15795 not as an address.
15796 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15797 (handle_v_requests, myresume): Remove "status" and "signal"
15798 parameters. Adjust.
15799 (handle_status): New.
15800 (main): Delete local `status'. Adjust.
15801 * remote-utils.c: Include target.h.
15802 (prepare_resume_reply): Change prototype to take a
15803 target_waitstatus. Adjust.
15804
15805 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15806 interface.
15807 * spu-low.c (spu_wait): Adjust.
15808 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15809 Delete.
15810 (win32_wait): Adjust.
15811
2bd7c093
PA
158122009-04-01 Pedro Alves <pedro@codesourcery.com>
15813
15814 * target.h (struct thread_resume): Delete leave_stopped member.
15815 (struct target_ops): Add a `n' argument to the `resume' callback.
15816 * server.c (start_inferior): Adjust.
15817 (handle_v_cont, myresume): Adjust.
15818 * linux-low.c (check_removed_breakpoint): Adjust to resume
15819 interface change, and to removed leave_stopped field.
15820 (resume_ptr): Delete.
15821 (struct thread_resume_array): New.
15822 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15823 resume interface change.
15824 (linux_continue_one_thread, linux_queue_one_thread)
15825 (resume_status_pending_p): Check if the resume field is NULL
15826 instead of checking the leave_stopped member.
15827 (linux_resume): Adjust to the target resume interface change.
15828 * spu-low.c (spu_resume): Adjust to the target resume interface
15829 change.
15830 * win32-low.c (win32_detach, win32_resume): Ditto.
15831
c35fafde
PA
158322009-04-01 Pedro Alves <pedro@codesourcery.com>
15833
15834 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15835 flag.
15836 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15837 pending.
15838 (linux_continue_one_thread): Only preserve the stepping flag if
15839 there's a pending breakpoint.
15840
0a59d50b
PA
158412009-03-31 Pedro Alves <pedro@codesourcery.com>
15842
15843 * server.c (main): After the inferior having exited, call
15844 remote_close before exiting gdbserver.
15845
f04c6d38
TJB
158462009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15847
15848 Fix size of FPSCR in Power 7 processors.
15849 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15850 (PPC_FEATURE_HAS_DFP): New #define.
15851 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15852 size of the FPSCR.
15853
78e5cee6
PA
158542009-03-23 Pedro Alves <pedro@codesourcery.com>
15855
15856 * server.c (handle_query) Whitespace and formatting.
15857
1b3f6016
PA
158582009-03-22 Pedro Alves <pedro@codesourcery.com>
15859
15860 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15861 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15862 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15863 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15864 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15865 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15866 Makefile.in, configure.ac: Fix whitespace throughout.
15867 * configure: Regenerate.
15868
a07b2135
PA
158692009-03-22 Pedro Alves <pedro@codesourcery.com>
15870
15871 * inferiors.c (find_inferior): Make it safe for the callback
15872 function to delete the currently iterated inferior.
15873
67cc2626
PA
158742009-03-22 Pedro Alves <pedro@codesourcery.com>
15875
15876 * Makefile.in (linuw_low_h): Move higher.
15877 (thread-db.o): Depend on $(linux_low_h).
15878
54a0b537
PA
158792009-03-17 Pedro Alves <pedro@codesourcery.com>
15880
15881 Rename "process" to "lwp" throughout.
15882
15883 * linux-low.c (all_processes): Rename to...
15884 (all_lwps): ... this.
15885 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15886 (add_process): Rename to ...
15887 (add_lwp): ... this. Adjust.
15888 (linux_create_inferior): Adjust.
15889 (linux_attach_lwp): Adjust.
15890 (linux_attach): Adjust.
15891 (linux_kill_one_process): Rename to ...
15892 (linux_kill_one_lwp): ... this. Adjust.
15893 (linux_kill): Adjust.
15894 (linux_detach_one_process): Rename to ...
15895 (linux_detach_one_lwp): ... this. Adjust.
15896 (linux_detach): Adjust.
15897 (check_removed_breakpoint): Adjust.
15898 (status_pending_p): Adjust.
15899 (linux_wait_for_process): Rename to ...
15900 (linux_wait_for_lwp): ... this. Adjust.
15901 (linux_wait_for_event): Adjust.
15902 (send_sigstop): Adjust.
15903 (wait_for_sigstop): Adjust.
15904 (stop_all_processes): Rename to ...
15905 (stop_all_lwps): ... this.
15906 (linux_resume_one_process): Rename to ...
15907 (linux_resume_one_lwp): ... this. Adjust.
15908 (linux_set_resume_request, linux_continue_one_thread)
15909 (linux_queue_one_thread, resume_status_pending_p)
15910 (usr_store_inferior_registers, regsets_store_inferior_registers)
15911 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15912 Adjust.
15913 * linux-low.h (get_process): Rename to ...
15914 (get_lwp): ... this. Adjust.
15915 (get_thread_process): Rename to ...
15916 (get_thread_lwp): ... this. Adjust.
15917 (get_process_thread): Rename to ...
15918 (get_lwp_thread): ... this. Adjust.
15919 (struct process_info): Rename to ...
15920 (struct lwp_info): ... this.
15921 (all_processes): Rename to ...
15922 (all_lwps): ... this.
15923 * proc-service.c (ps_lgetregs): Adjust.
15924 * thread-db.c (thread_db_create_event, find_one_thread)
15925 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15926
0b16c5cf
PA
159272009-03-14 Pedro Alves <pedro@codesourcery.com>
15928
15929 * server.c (handle_query): Handle "qAttached".
15930
32de4b9d
NS
159312009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15932
15933 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15934 GPLv3, update license URL.
15935
2aecd87f
DE
159362009-03-01 Doug Evans <dje@google.com>
15937
93efd302 15938 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15939 (server_h): Add gdb_signals.h.
15940 (signals.o): Update.
15941 * server.h (target_signal_from_host,target_signal_to_host_p)
15942 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15943
86b1f9c5
PM
159442009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15945
15946 * remote-utils.c (getpkt): Also generate remote-debug
15947 information if noack_mode is set.
15948
4aa995e1
PA
159492009-02-06 Pedro Alves <pedro@codesourcery.com>
15950
15951 * server.c (handle_query): Report qXfer:siginfo:read and
15952 qXfer:siginfo:write as supported and handle them.
15953 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15954 * linux-low.c (linux_xfer_siginfo): New.
15955 (linux_target_ops): Set it.
15956
62709adf
PA
159572009-01-26 Pedro Alves <pedro@codesourcery.com>
15958
15959 * server.c (gdbserver_usage): Mention --remote-debug.
15960 (main): Accept '--remote-debug' switch.
15961
aef93bd7
DE
159622009-01-18 Doug Evans <dje@google.com>
15963
15964 * regcache.c (new_register_cache): No need to check result of xcalloc.
15965 * server.c (handle_search_memory): Back out calls to xmalloc,
15966 result is checked and error is returned to user upon failure.
15967 (handle_query): Ditto. Add more checks for result of malloc.
15968 (handle_v_cont): Check result of malloc, report error back to
15969 user upon failure.
15970 (handle_v_run): Ditto. Call freeargv.
15971 * server.h (freeargv): Declare.
15972 * utils.c (freeargv): New fn.
15973
54363045
DE
159742009-01-15 Doug Evans <dje@google.com>
15975
f626972c
DE
15976 * gdbreplay.c (perror_with_name): Make arg const char *.
15977 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15978 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15979 * utils.c (perror_with_name): Make arg const char *.
54363045 15980
18aae699
PA
159812009-01-14 Pedro Alves <pedro@codesourcery.com>
15982
15983 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15984 when handling a EXIT_PROCESS_DEBUG_EVENT.
15985
ff703abe
JB
159862009-01-06 Joel Brobecker <brobecker@adacore.com>
15987
15988 * gdbreplay.c (gdbreplay_version): Update copyright year.
15989 * server.c (gdbserver_version): Likewise.
15990
f21cc1a2 159912009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15992
15993 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15994 (handle_extended_wait): Improve comment.
0e21c1ec 15995
bca929d3
DE
159962008-12-13 Doug Evans <dje@google.com>
15997
15998 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15999 * server.h (ATTR_MALLOC): New macro.
16000 (xmalloc,xcalloc,xstrdup): Declare.
16001 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16002 * inferiors.c: Ditto.
16003 * linux-low.c: Ditto.
16004 * mem-break.c: Ditto.
16005 * regcache.c: Ditto.
16006 * remote-utils.c: Ditto.
16007 * server.c: Ditto.
16008 * target.c: Ditto.
16009 * win32-low.c: Ditto.
16010
97438e3f
DE
160112008-12-12 Doug Evans <dje@google.com>
16012
896c7fbb
DE
16013 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16014 in debugging printf.
16015
97438e3f
DE
16016 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16017
e3b886f8
DE
160182008-12-09 Doug Evans <dje@google.com>
16019
16020 * linux-low.h (struct process_info): Delete member tid, unused.
16021 * thread-db.c (find_one_thread): Update.
16022 (maybe_attach_thread): Update.
16023
07e059b5
VP
160242008-12-02 Pedro Alves <pedro@codesourcery.com>
16025
889bf7c5
PA
16026 * target.h (struct target_ops): Add qxfer_osdata member.
16027 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16028 and dirent.h.
16029 (linux_qxfer_osdata): New functions.
16030 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16031 callback.
16032 * server.c (handle_query): Handle "qXfer:osdata:read:".
16033 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16034 (buffer_xml_printf): New functions.
16035 * server.h (struct buffer): New.
16036 (buffer_grow_str, buffer_grow_str0): New macros.
16037 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16038 (buffer_xml_printf): Declare.
07e059b5 16039
4cab47ab
DE
160402008-11-24 Doug Evans <dje@google.com>
16041
16042 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16043
f142445f
DJ
160442008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16045
16046 * server.c (handle_v_run): Always use the supplied argument list.
16047
d0107bb6 160482008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16049
d0107bb6
BW
16050 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16051 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16052
2c4ad781
TJB
160532008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16054
16055 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16056 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16057 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16058 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16059 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16060 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16061 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16062 XML target descriptions.
16063 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16064 when inferior is running on an ISA 2.05 or later processor. Add
16065 special case to return offset for full 64-bit slot of FPSCR when
16066 in 32-bits.
16067
dfb64f85
DJ
160682008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16069
16070 * Makefile.in (SFILES, clean): Added sparc64 files.
16071 (reg-sparc64.o, reg-sparc64.c): New.
16072 * configure.srv (sparc*-*-linux*): New configuration.
16073 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16074 syscall arguments for SPARC.
16075 (regsets_store_inferior_registers): Likewise.
16076 * linux-sparc-low.c: New file.
16077
66b6e1dd
DE
160782008-10-21 Doug Evans <dje@google.com>
16079
16080 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16081 (READLINE_DIR,READLINE_DEP): Delete.
16082 (INTERNAL_CFLAGS): Update.
16083 (LINTFLAGS): Update.
16084
9b710a42
PA
160852008-10-10 Pedro Alves <pedro@codesourcery.com>
16086
16087 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16088 whole argv from the last run, not just argv[0].
16089
5822d809
PA
160902008-09-08 Pedro Alves <pedro@codesourcery.com>
16091
16092 * regcache.c (new_register_cache): Return NULL if the register
16093 cache size isn't known yet.
16094 (free_register_cache): Avoid dereferencing a NULL regcache.
16095
74aac56f
DJ
160962008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16097
16098 * configure.srv: Merge MIPS and MIPS64.
16099
400b20f5
MR
161002008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16101
16102 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16103
677c5bb1
LM
161042008-08-18 Luis Machado <luisgpm@br.ibm.com>
16105
16106 * Makefile.in: Add required vsx dependencies.
16107
16108 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16109 Declare init_registers_powerpc_vsx32l.
16110 Declare init_registers_powerpc_vsx64l.
16111 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16112 (ppc_arch_setup): Check for VSX in hwcap.
16113 (ppc_fill_vsxregset): New function.
16114 (ppc_store_vsxregset): New function.
16115 Add new VSX entry in regset_info target_regsets.
16116
16117 * configure.srv: Add new VSX dependencies.
16118
a6f3e723
SL
161192008-08-12 Pedro Alves <pedro@codesourcery.com>
16120
16121 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16122 (remote_open): Set or clear transport_is_reliable.
16123 (putpkt_binary): Don't expect acks in noack mode.
16124 (getpkt): Don't send ack/nac in noack mode.
16125 * server.c (handle_general_set): Handle QStartNoAckMode.
16126 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16127 qSupported.
16128 (main): Reset noack_mode on every connection.
16129 * server.h (noack_mode): Declare.
16130
a417dc56
RW
161312008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16132
16133 * Makefile.in (GDBREPLAY_OBS): New variable.
16134 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16135
3221518c
UW
161362008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16137 Daniel Jacobowitz <dan@codesourcery.com>
16138
16139 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16140 (usr_store_inferior_registers): Likewise.
16141 (regsets_store_inferior_registers): Likewise.
16142
ec56be1b
PA
161432008-07-31 Rolf Jansen <rj@surtec.com>
16144 Pedro Alves <pedro@codesourcery.com>
16145
16146 * configure.ac: Check for memmem declaration.
16147 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16148 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16149 (disable_packet_qfThreadInfo): Unconditionally compile.
16150 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16151 * configure, config.in: Regenerate.
16152
2fe5e3ff
DE
161532008-07-28 Doug Kwan <dougkwan@google.com>
16154
16155 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16156 (linux_write_memory): Remove declaration of errno.
16157
836acd6d
UW
161582008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16159
16160 * linux-low.c (handle_extended_wait): Do not use "status"
16161 variable uninitialized.
16162
aeba519e
PA
161632008-07-07 Pedro Alves <pedro@codesourcery.com>
16164
16165 * server.c (handle_v_attach): Inhibit reporting dll changes.
16166
db42f210
PA
161672008-06-27 Pedro Alves <pedro@codesourcery.com>
16168
16169 * remote-utils.c (prepare_resume_reply): If requested, don't
16170 output "thread:TID" in the T stop reply.
16171
16172 * server.c (disable_packet_vCont, disable_packet_Tthread)
16173 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16174 (handle_query): If requested, disable support for qC, qfThreadInfo
16175 and qsThreadInfo.
16176 (handle_v_requests): If requested, disable support for vCont.
16177 (gdbserver_show_disableable): New.
16178 (main): Handle --disable-packet and --disable-packet=LIST.
16179
16180 * server.h (disable_packet_vCont, disable_packet_Tthread)
16181 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16182
8e4c5421
CD
161832008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16184
16185 * server.c (gdbserver_usage): Mention --version.
16186
6e23a804
DJ
161872008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16188
16189 * Makefile.in (gdbreplay.o): New rule.
16190
90aa6a40
JM
161912008-06-06 Joseph Myers <joseph@codesourcery.com>
16192
16193 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16194 message, not gdbserver.
16195
c16158bc 161962008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16197 Nathan Sidwell <nathan@codesourcery.com>
16198 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16199
16200 * acinclude.m4: Include ../../config/acx.m4.
16201 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16202 * configure, config.in: Regenerate.
16203 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16204 * server.c (gdbserver_version): Print PKGVERSION.
16205 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16206 (main): Adjust gdbserver_usage calls.
16207 * gdbreplay.c (version, host_name): Add declarations.
16208 (gdbreplay_version, gdbreplay_usage): New.
16209 (main): Accept --version and --help options.
16210
aeb75bf5
DJ
162112008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16212
16213 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16214 (arm_breakpoint_at): Handle Thumb.
16215 (the_low_target): Add comment.
16216
76b233dd
UW
162172008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16218
16219 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16220
08388c79
DE
162212008-05-09 Doug Evans <dje@google.com>
16222
a3c83fae
DE
16223 * server.h (decode_search_memory_packet): Declare.
16224 * remote-utils.c (decode_search_memory_packet): New fn.
16225 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16226 (handle_search_memory): New fn.
16227 (handle_query): Process qSearch:memory packets.
16228
bb9c3d36
UW
162292008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16230
16231 * regcache.c (registers_length): Remove.
16232 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16233 full register packet.
16234 * regcache.h (registers_length): Remove prototype.
16235 * server.h (PBUFSIZ): Define to 16384.
16236
7284e1be
UW
162372008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16238
16239 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16240 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16241 powerpc-64l.o, and powerpc-altivec64l.o.
16242 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16243 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16244 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16245 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16246 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16247 to srv_xmlfiles.
16248
16249 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16250 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16251 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16252 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16253 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16254 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16255 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16256 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16257 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16258 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16259 (clean): Update.
16260
16261 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16262 (init_registers_powerpc_32l): ... this new prototype.
16263 (init_registers_powerpc_32): Remove, replace by ...
16264 (init_registers_powerpc_altivec32l): ... this new prototype.
16265 (init_registers_powerpc_e500): Remove, replace by ...
16266 (init_registers_powerpc_e500l): ... this new prototype.
16267 (init_registers_ppc64): Remove, replace by ...
16268 (init_registers_powerpc_64l): ... this new prototype.
16269 (init_registers_powerpc_64): Remove, replace by ...
16270 (init_registers_powerpc_altivec64l): ... this new prototype.
16271 (ppc_num_regs): Set to 73.
16272 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16273 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16274 (ppc_cannot_store_register): Handle orig_r3 and trap.
16275 (ppc_arch_setup): Update init_registers_... calls.
16276 (ppc_fill_gregset): Handle orig_r3 and trap.
16277
16278 * inferiors.c (clear_inferiors): Reset current_inferior.
16279
fdc59709
PB
162802008-04-23 Paolo Bonzini <bonzini@gnu.org>
16281
889bf7c5
PA
16282 * acinclude.m4: Add override.m4.
16283 * configure: Regenerate.
fdc59709 16284
c9b2f845
UW
162852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16286
16287 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16288 initial call to init_register_ppc64.
16289
550512b8
UW
162902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16291
43aaf8b6
PA
16292 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16293 single powerpc*-*-linux* case.
550512b8
UW
16294 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16295
b6430ec3
UW
162962008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16297
16298 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16299 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16300 from reg_xmlfiles.
16301 * linux-ppc-low.c: Include <elf.h>.
16302 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16303 (ppc_hwcap): New global variable.
16304 (ppc_regmap): Remove __SPE__ #ifdef sections.
16305 (ppc_regmap_e500): New global variable.
16306 (ppc_cannot_store_register): Update __SPE__ special case.
16307 (ppc_get_hwcap): New function.
16308 (ppc_arch_setup): Use it to determine whether inferior supports
16309 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16310 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16311 Do not access registers if target does not support AltiVec.
16312 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16313 Do not access registers if target does not support SPE.
16314 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16315
52fa2412
UW
163162008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16317
16318 * linux-low.c (disabled_regsets, num_regsets): New.
16319 (use_regsets_p): Delete.
16320 (linux_wait_for_process): Clear disabled_regsets.
16321 (regsets_fetch_inferior_registers): Check and set it.
16322 (regsets_store_inferior_registers): Likewise.
16323 (linux_fetch_registers, linux_store_registers): Do not use
16324 use_regsets_p.
16325 (initialize_low): Allocate disabled_regsets.
16326
e28b3332
DJ
163272008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16328
16329 * Makefile.in (LIBOBJS): New.
16330 (OBS): Use LIBOBJS.
16331 (memmem.o): New rule.
16332 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16333 * configure: Regenerated.
16334
4536995d
UW
163352008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16336
16337 * server.c (handle_query): Never return "unsupported" for
16338 qXfer:features:read queries.
16339
221c031f
UW
163402008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16341
16342 * server.c (get_features_xml): Fix inverted condition.
16343 (handle_query): Always support qXfer:feature:read.
16344
ccd213ac
DJ
163452008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16346
16347 * server.c (wrapper_argv): New.
16348 (start_inferior): Handle wrapper_argv. If set, expect an extra
16349 trap.
16350 (gdbserver_usage): Document --wrapper.
16351 (main): Parse --wrapper.
16352
6fe305f7
UW
163532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16354
16355 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16356 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16357 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16358 (ppc_set_pc): Likewise.
16359 (ppc_arch_setup): New function.
16360 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16361 of collect_register.
889bf7c5 16362 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16363
5b0a002e
UW
163642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16365
16366 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16367 instead of linux-ppc64-low.o.
16368 * linux-ppc64-low.c: Remove file.
16369 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16370 (linux-ppc64-low.o): Remove rule.
16371
16372 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16373 (init_registers_powerpc_64): Likewise.
16374 (ppc_regmap): Conditionally define depending on __powerpc64__.
16375 (ppc_cannot_store_register): Do not special-case "fpscr" when
16376 compiled on __powerpc64__.
16377 (ppc_collect_ptrace_register): New function.
16378 (ppc_supply_ptrace_register): New function.
16379 (ppc_breakpoint): Change type to "unsigned int".
16380 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16381 (the_low_target): Conditionally provide initializers for the
889bf7c5 16382 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16383 collect_ptrace_register and supply_ptrace_register members.
16384
9b4b61c8
UW
163852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16386
16387 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16388 * server.c (gdbserver_xmltarget): Define.
16389 (get_features_xml): Use it to replace "target.xml" and arch_string.
16390
16391 * configure.srv: Remove srv_xmltarget. Add XML files that were
16392 mentioned there to srv_xmlfiles instead. Remove conditional tests
16393 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16394 srv_xmlfiles and srv_regobj to include all possible choices.
16395 * configure.ac (srv_xmltarget): Remove.
16396 (srv_xmlfiles): Do not add "target.xml".
16397 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16398 checks for supplementary target information.
16399 * configure: Regenerate.
16400 * Makefile.in (XML_TARGET): Remove.
16401 (target.xml): Remove rule.
16402 (clean): Do not clean up target.xml.
16403 (.PRECIOUS): Do not mention target.xml.
16404
16405 * target.h (struct target_ops): Remove arch_string member.
16406 * linux-low.c (linux_arch_string): Remove.
16407 (linux_target_ops): Remove arch_string initializer.
16408 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16409 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16410 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16411 * spu-low.c (spu_arch_string): Remove.
16412 (spu_target_ops): Remove arch_string initializer.
16413 * win32-low.c (win32_arch_string): Remove.
16414 (win32_target_ops): Remove arch_string initializer.
16415 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16416 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16417 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16418
ee1a7ae4
UW
164192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16420
16421 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16422 by collect_ptrace_register and supply_ptrace_register hooks.
16423 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16424 instead of checking for the_low_target.left_pad_xfer.
16425 (usr_store_inferior_registers): Use collect_ptrace_register callback
16426 instead of checking for the_low_target.left_pad_xfer.
16427
16428 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16429 (s390_supply_ptrace_register): Likewise.
16430 (s390_fill_gregset): Call s390_collect_ptrace_register.
16431 (the_low_target): Update.
16432
16433 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16434 (ppc_supply_ptrace_register): Likewise.
16435 (the_low_target): Update.
16436
16437 * linux-i386-low.c (the_low_target): Update.
16438 * linux-x86-64-low.c (the_low_target): Update.
16439
d61ddec4
UW
164402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16441
16442 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16443 reg-s390.o and reg-s390x.o.
16444
16445 * linux-low.c (new_inferior): New global variable.
16446 (linux_create_inferior, linux_attach): Set it.
16447 (linux_wait_for_process): Call the_low_target.arch_setup after the
16448 target has stopped for the first time.
16449 (initialize_low): Do not call the_low_target.arch_setup.
16450
16451 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16452 (s390_set_pc): Likewise.
16453 (s390_arch_setup): New function.
16454 (the_low_target): Use s390_arch_setup as arch_setup routine.
16455
16456 * regcache.c (realloc_register_cache): New function.
16457 (set_register_cache): Call it for each existing regcache.
16458
d05b4ac3
UW
164592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16460
16461 * server.h (init_registers): Remove prototype.
16462
16463 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16464 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16465 instead of init_registers ().
16466 * linux-arm-low.c (init_registers_arm): Add prototype.
16467 (init_registers_arm_with_iwmmxt): Likewise.
16468 (the_low_target): Add initializer for arch_setup field.
16469 * linux-cris-low.c (init_registers_cris): Add prototype.
16470 (the_low_target): Add initializer for arch_setup field.
16471 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16472 (the_low_target): Add initializer for arch_setup field.
16473 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16474 (the_low_target): Add initializer for arch_setup field.
16475 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16476 (the_low_target): Add initializer for arch_setup field.
16477 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16478 (the_low_target): Add initializer for arch_setup field.
16479 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16480 (the_low_target): Add initializer for arch_setup field.
16481 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16482 (init_registers_mips64_linux): Likewise.
16483 (the_low_target): Add initializer for arch_setup field.
16484 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16485 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16486 (the_low_target): Add initializer for arch_setup field.
16487 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16488 (init_registers_powerpc_64): Likewise.
16489 (the_low_target): Add initializer for arch_setup field.
16490 * linux-s390-low.c (init_registers_s390): Add prototype.
16491 (init_registers_s390x): Likewise.
16492 (the_low_target): Add initializer for arch_setup field.
16493 * linux-sh-low.c (init_registers_sh): Add prototype.
16494 (the_low_target): Add initializer for arch_setup field.
16495 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16496 (the_low_target): Add initializer for arch_setup field.
16497 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16498 (the_low_target): Add initializer for arch_setup field.
16499
16500 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16501 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16502 instead of init_registers ().
16503 * win32-arm-low.c (init_registers_arm): Add prototype.
16504 (the_low_target): Add initializer for arch_setup field.
16505 * win32-i386-low.c (init_registers_i386): Add prototype.
16506 (the_low_target): Add initializer for arch_setup field.
16507
16508 * spu-low.c (init_registers_spu): Add prototype.
16509 (initialize_low): Call initialie_registers_spu () instead of
16510 initialize_registers ().
16511
fd96d250
PA
165122008-02-19 Pedro Alves <pedro@codesourcery.com>
16513
16514 * server.c (handle_v_requests): When handling the vRun and vAttach
16515 packets, if already debugging a process, don't kill it. Return an
16516 error instead.
16517
d41b6bb4
DJ
165182008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16519
16520 * server.c (handle_query): Correct length check.
16521
5ac588cf
PA
165222008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16523
16524 * win32-low.c (do_initial_child_stuff): Add process handle
16525 parameter. Set current_process_handle and current_process_id from the
16526 parameters. Clear globals.
16527 (win32_create_inferior): Don't set current_process_handle and
16528 current_process_id here. Instead pass them on the call to
16529 do_initial_child_stuff.
16530 (win32_attach): Likewise.
16531 (win32_clear_inferiors): New.
16532 (win32_kill): Don't close the current process handle or the
16533 current thread handle here. Instead call win32_clear_inferiors.
16534 (win32_detach): Don't open a new handle to the process. Call
16535 win32_clear_inferiors.
16536 (win32_join): Don't rely on current_process_handle; open a new
16537 handle using the process id.
16538 (win32_wait): Call win32_clear_inferiors when the inferior process
16539 has exited.
16540
ecd7ecbc
DJ
165412008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16542
16543 * server.c (monitor_show_help): Add "exit".
16544
1525d545
MG
165452008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16546
ecd7ecbc 16547 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16548 (clean): Add reg-xtensa.c.
16549 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16550 * configure.srv (xtensa*-*-linux*) New target.
16551 * linux-xtensa-low.c: New.
16552 * xtensa-xtregs.c: New.
1525d545 16553
59a016f0
PA
165542008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16555
16556 * hostio.c: Don't include errno.h.
16557 (errno_to_fileio_errno): Move to hostio-errno.
16558 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16559 error number outputting to the target->hostio_last_error callback.
16560 (hostio_packet_error): Use FILEIO_EINVAL directly.
16561 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16562 calls to hostio_error.
16563 * hostio-errno.c: New.
16564 * server.h (hostio_last_error_from_errno): Declare.
16565 * target.h (target_ops): Add hostio_last_error member.
16566 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16567 as hostio_last_error handler.
889bf7c5 16568 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16569 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16570 (wince_hostio_last_error): New functions.
16571 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16572 as hostio_last_error handler.
16573 (win32_target_ops) [!_WIN32_WCE]: Register
16574 hostio_last_error_from_errno as hostio_last_error handler.
16575 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16576 (hostio-errno.o): New rule.
16577 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16578 * configure.srv (srv_hostio_err_objs): New variable. Default to
16579 hostio-errno.o.
16580 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16581 * configure: Regenerate.
16582
2d717e4f
DJ
165832008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16584
16585 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16586 (linux_kill, linux_detach): Clean up the process list.
16587 * remote-utils.c (remote_open): Improve port number parsing.
16588 (putpkt_binary, input_interrupt): Only send interrupts if the target
16589 is running.
16590 * server.c (extended_protocol): Make static.
16591 (attached): Define earlier.
16592 (exit_requested, response_needed, program_argv): New variables.
16593 (target_running): New.
16594 (start_inferior): Clear attached here.
16595 (attach_inferior): Set attached here.
16596 (require_running): Define.
16597 (handle_query): Use require_running and target_running. Implement
16598 "monitor exit".
16599 (handle_v_attach, handle_v_run): New.
16600 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16601 (gdbserver_usage): Update.
16602 (main): Redo argument parsing. Handle --debug and --multi. Handle
16603 --attach along with other options or after the port. Save
16604 program_argv. Support no initial program. Resynchronize
16605 communication with GDB after an error. Handle "monitor exit".
16606 Use require_running and target_running. Always allow the extended
16607 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16608 restart in extended mode.
16609 * README: Refer to the GDB manual. Update --attach usage.
16610
7407e2de
AS
166112007-12-20 Andreas Schwab <schwab@suse.de>
16612
16613 * linux-low.c (STACK_SIZE): Define.
16614 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16615 (linux_test_for_tracefork): Likewise.
16616
b65d95c5
DJ
166172007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16618
16619 * linux-low.c (linux_wait_for_event): Update messages. Do not
16620 reinsert auto-delete breakpoints.
16621 * mem-break.c (struct breakpoint): Change return type of handler to
16622 int.
16623 (set_breakpoint_at): Update handler type.
16624 (reinsert_breakpoint_handler): Return 1 instead of calling
16625 delete_breakpoint.
16626 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16627 setting a new one.
16628 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16629 * mem-break.h (set_breakpoint_at): Update handler type.
16630 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16631 * win32-low.c (auto_delete_breakpoint): New.
16632 (get_child_debug_event): Use it.
16633
4e799345
DJ
166342007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16635
16636 * configure.ac: Check for pread and pwrite.
16637 * hostio.c (handle_pread): Fall back to lseek and read.
16638 (handle_pwrite): Fall back to lseek and write.
16639 * config.in, configure: Regenerated.
16640
27524b67
DJ
166412007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16642
16643 * server.c (myresume): Add own_buf argument.
16644 (main): Update calls.
16645
a20d5e98
DJ
166462007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16647
16648 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16649 * remote-utils.c (remote_open): Do not call disable_async_io.
16650 (block_async_io): Delete.
16651 (unblock_async_io): Make static.
16652 (initialize_async_io): New.
16653 * server.c (handle_v_cont): Handle async I/O here.
16654 (myresume): Likewise. Move other common resume tasks here...
16655 (main): ... from here. Call initialize_async_io. Disable async
16656 I/O before the main loop.
16657 * server.h (initialize_async_io): Declare.
16658 (block_async_io, unblock_async_io): Delete prototypes.
16659 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16660
b79d787e
DJ
166612007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16662
16663 * remote-utils.c (readchar): Allow binary data in received messages.
16664
d97903b2
PA
166652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16666
16667 * win32-low.c (attaching): New global.
16668 (win32_create_inferior): Clear the `attaching' global.
16669 (win32_attach): Set the `attaching' global.
16670 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16671 attaching. Only set a breakpoint at the entry point if not
16672 attaching.
16673
311de423
PA
166742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16675
16676 * server.c (main): Don't report dll events on the initial
16677 connection on attaches.
16678
6c2d16d2
PA
166792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16680
16681 * server.c (main): Relax numerical bases supported for the pid of
16682 the --attach command line argument.
16683
5ca906e6
PA
166842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16685
16686 * win32-low.c (win32_attach): Call OpenProcess before
16687 DebugActiveProcess, not after. Add last error output to error
16688 call.
16689
9c6c8194
PA
166902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16691
16692 * win32-low.c (win32_get_thread_context)
16693 (win32_set_thread_context): New functions.
16694 (thread_rec): Use win32_get_thread_context.
16695 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16696 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16697 field.
16698
4d5d1aaa
PA
166992007-12-03 Leo Zayas
16700 Pedro Alves <pedro_alves@portugalmail.pt>
16701
16702 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16703 global variables.
16704 (child_add_thread): Minor cleanup.
16705 (child_continue): Resume artificially suspended threads before
16706 calling ContinueDebugEvent.
16707 (suspend_one_thread): New.
16708 (fake_breakpoint_event): New.
16709 (get_child_debug_event): Change return type to int. Check here if
16710 gdb sent an interrupt request. If a soft interrupt was requested,
16711 fake a breakpoint event. Return 0 if there is no event to handle,
16712 and 1 otherwise.
16713 (win32_wait): Don't check here if gdb sent an interrupt request.
16714 Ensure there is a valid event to handle.
16715 (win32_request_interrupt): Add soft interruption method as last
16716 resort.
16717
c436e841
PA
167182007-12-03 Leo Zayas
16719 Pedro Alves <pedro_alves@portugalmail.pt>
16720
16721 * win32-low.h (win32_thread_info): Add descriptions to the
16722 structure members. Replace `suspend_count' counter by a
16723 `suspended' flag.
16724 * win32-low.c (thread_rec): Update condition of when to get the
16725 context from the inferior. Rely on ContextFlags being set if it
16726 has already been retrieved. Only suspend the inferior thread if
16727 we haven't already. Warn if that fails.
16728 (continue_one_thread): s/suspend_count/suspended/. Only call
16729 ResumeThread once. Warn if that fails.
16730
e7b5fa67
PA
167312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16732
16733 * win32-low.c (win32_wait): Don't read from the inferior when it
16734 has already exited.
16735
a385171d
PA
167362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16737
16738 * Makefile.in (win32_low_h): New variable.
16739 (win32-low.o): Add dependency on $(win32_low_h).
16740 (win32-arm-low.o, win32-i386-low.o): New rules.
16741
f80c84b3
DJ
167422007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16743
16744 * hostio.c: Correct copyright year.
16745
a6b151f1
DJ
167462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * Makefile.in (OBS): Add hostio.o.
16749 (hostio.o): New rule.
16750 * server.h (handle_vFile): Declare.
16751 * hostio.c: New file.
16752 * server.c (handle_v_requests): Take packet_len and new_packet_len
16753 for binary packets. Call handle_vFile.
16754 (main): Update call to handle_v_requests.
16755
f9387fc3
DJ
167562007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * linux-low.c: Include <sched.h>.
16759
51c2684e
DJ
167602007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16761
16762 * linux-low.c (linux_tracefork_grandchild): New.
16763 (linux_tracefork_child): Use clone.
16764 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16765
75f83163
JB
167662007-10-31 Joel Brobecker <brobecker@adacore.com>
16767
16768 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16769
da5898ce
DJ
167702007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16771
16772 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16773
24a09b5f
DJ
167742007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16775
16776 * inferiors.c (change_inferior_id): Delete.
16777 (add_pid_to_list, pull_pid_from_list): New.
16778 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16779 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16780 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16781 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16782 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16783 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16784 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16785 (using_threads): Always set to 1.
16786 (handle_extended_wait): New.
16787 (add_process): Do not set TID.
16788 (linux_create_inferior): Set must_set_ptrace_flags.
16789 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16790 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16791 (linux_thread_alive): Rename TID argument to LWPID.
16792 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16793 (linux_wait_for_event): Do not use TID or check using_threads. Update
16794 call to dead_thread_notify. Call handle_extended_wait.
16795 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16796 (send_sigstop): Delete sigstop_sent.
16797 (wait_for_sigstop): Avoid TID.
16798 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16799 (linux_test_for_tracefork): New.
16800 (linux_lookup_signals): Use thread_db_active and
16801 linux_supports_tracefork_flag.
16802 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16803 * linux-low.h (get_process_thread): Avoid TID.
16804 (struct process_ifo): Move thread_known and tid to the end. Remove
16805 sigstop_sent.
16806 (linux_attach_lwp, thread_db_init): Update prototypes.
16807 * server.h (change_inferior_id): Delete prototype.
16808 (add_pid_to_list, pull_pid_from_list): New prototypes.
16809 * thread-db.c (thread_db_use_events): New.
16810 (find_first_thread): Rename to...
16811 (find_one_thread): ...this. Update callers and messages. Do not
16812 call fatal. Check thread_db_use_events. Do not call
16813 change_inferior_id or new_thread_notify.
16814 (maybe_attach_thread): Update. Do not call new_thread_notify.
16815 (thread_db_init): Set thread_db_use_events. Check use_events.
16816 * utils.c (fatal, warning): Correct message prefix.
16817
30ed0a8f
DJ
168182007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * Makefile.in (clean): Remove new files.
16821 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16822 (powerpc-64.o, powerpc-64.c): New rules.
16823 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16824 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16825 with SPE.
16826 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16827 SPE targets.
16828 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16829 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16830 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16831 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16832 (target_regsets): Add AltiVec and SPE register sets.
16833 * configure.ac: Check for AltiVec and SPE.
16834 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16835 (ppc_fill_vrregset, ppc_store_vrregset): New.
16836 (target_regsets): Add AltiVec register set.
16837 * configure: Regenerated.
16838
fd462a61
DJ
168392007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16840
16841 * linux-low.c (O_LARGEFILE): Define.
16842 (linux_read_memory): Use /proc/PID/mem.
16843 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16844 * configure, config.in: Regenerated.
16845
69f223ed
DJ
168462007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16847
16848 * linux-low.c (linux_wait_for_event): Do not pass signals while
16849 single-stepping.
16850
aec18585
PA
168512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16852
16853 * win32-low.c (create_process): New.
16854 (win32_create_inferior): Use create_process instead of
16855 CreateProcess. If create_process failed retry appending an ".exe"
16856 suffix. Store the GetLastError result immediatelly after
16857 create_process calls and use it on the call to error.
16858
34d86ddd
PA
168592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16860
16861 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16862
5a0e3bd0
JB
168632007-08-23 Joel Brobecker <brobecker@adacore.com>
16864
16865 * configure.ac: Switch license to GPLv3.
16866
f88c79e6
MS
168672007-08-01 Michael Snyder <msnyder@access-company.com>
16868
16869 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16870
6b3d9b83
PA
168712007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16872
16873 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16874 typedef.
16875 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16876 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16877 CloseToolhelp32Snapshot.
16878 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16879 CloseToolhelp32Snapshot.
16880
c588c53c
MS
168812007-07-27 Michael Snyder <michael.snyder@access-company.com>
16882
16883 * server.c (main): Check for inferior exit before main loop.
16884
aa0403d9
PA
168852007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16886
16887 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16888 instead of on tmp_desc.
16889
255e7678
DJ
168902007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16891 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16894 (add_thread): Minor cleanups.
16895 (clear_inferiors): Move lower in the file. Clear the DLL
16896 list.
16897 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16898 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16899 (xml_escape_text): New.
16900 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16901 for qSupported.
16902 (handle_v_cont): Report errors.
16903 (gdbserver_version): Update.
16904 (main): Correct size of own_buf. Do not report initial DLL events.
16905 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16906 (unloaded_dll, xml_escape_text): New.
16907 * win32-low.c (enum target_waitkind): Update comments.
16908 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16909 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16910 (win32_EnumProcessModules, win32_GetModuleInformation)
16911 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16912 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16913 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16914 (win32_Module32First, win32_Module32Next, load_toolhelp)
16915 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16916 (get_child_debug_event): Handle DLL events.
16917 (win32_wait): Likewise.
16918
0d37add9
DJ
169192007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16920
16921 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16922 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16923
45e2715e
PA
169242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16925
16926 * win32-low.c (handle_output_debug_string): Ignore event if not
16927 waiting.
16928
c5674cf1
PA
169292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16930
16931 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16932
2bbe3cc1
DJ
169332007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16934
16935 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16936
ae13219e
DJ
169372007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16938
16939 * inferiors.c (change_inferior_id): Add comment.
16940 * linux-low.c (check_removed_breakpoint): Add an early
16941 prototype. Improve debug output.
16942 (linux_attach): Doc update.
16943 (linux_detach_one_process, linux_detach): Clean up before releasing
16944 each process.
16945 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16946 * linux-low.h (struct process_info): Doc improvement.
16947 * mem-break.c (delete_all_breakpoints): New.
16948 * mem-break.h (delete_all_breakpoints): New prototype.
16949 * thread-db.c (find_first_thread): New.
16950 (thread_db_create_event): Call it instead of
16951 thread_db_find_new_threads. Clean up unused variables.
16952 (maybe_attach_thread): Remove first thread handling.
16953 (thread_db_find_new_threads): Use find_first_thread.
16954 (thread_db_get_tls_address): Likewise.
16955
4105de34
DJ
169562007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16957
16958 * thread-db.c (thread_db_find_new_threads): Add prototype.
16959 (thread_db_create_event): Check for the main thread before adding
16960 a new thread.
16961 (maybe_attach_thread): Only enable event reporting if TID == 0.
16962 (thread_db_get_tls_address): Check for new threads.
16963
2b876972
DJ
169642007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16965
16966 * linux-low.c (linux_create_inferior): Try execv before execvp.
16967 * spu-low.c (spu_create_inferior): Likewise.
16968
7a245884
DJ
169692007-06-13 Mike Frysinger <vapier@gentoo.org>
16970
16971 * linux-low.c (linux_create_inferior): Change execv to execvp.
16972 * spu-low.c (spu_create_inferior): Likewies.
16973
117ce543
DJ
169742007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16975
16976 * Makefile.in (clean): Clean new files instead of deleted ones.
16977 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16978 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16979 rules.
16980 * configure.srv: Specify XML files and new regformats for MIPS and
16981 MIPS64 GNU/Linux.
16982 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16983 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16984 an entry for the restart register.
16985 (mips_cannot_fetch_register, mips_cannot_store_register)
16986 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16987 register names to match the XML descriptions.
16988 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16989 restart register instead of $0.
16990
0e7f50da
UW
169912007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16992 Markus Deuling <deuling@de.ibm.com>
16993
16994 * remote-utils.c (decode_xfer_write): New function.
16995 * server.h (decode_xfer_write): Add prototype.
16996 * server.c (handle_query): Add PACKET_LEN argument. Support
16997 qXfer:spu:read and qXfer:spu:write packets.
16998 (main): Pass packet_len to handle_query.
16999 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17000 * target.h (target_ops): Add qxfer_spu.
17001
374c1d38
UW
170022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17003
17004 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17005 accessing non-seekable spufs files.
17006
bb63802a
UW
170072007-05-16 Markus Deuling <deuling@de.ibm.com>
17008
889bf7c5 17009 * server.c (handle_query): Add reply for qC packet.
bb63802a 17010
7390519e
PA
170112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17012 Leo Zayas <lerele@champenstudios@com>
17013
17014 * server.h (check_remote_input_interrupt_request): New function.
17015 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17016 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17017 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17018 (check_remote_input_interrupt_request): New function.
17019 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17020 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17021 winapi_GenerateConsoleCtrlEvent): New typedefs.
17022 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17023 to 250 ms.
17024 (win32_wait): Check for remote interrupt request
17025 with check_remote_input_interrupt_request.
17026 (win32_request_interrupt): New function.
17027 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17028
34b34921
PA
170292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17030
17031 * win32-low.c (debug_registers_changed,
17032 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17033 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17034 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17035 (thread_rec): Get context using the low target.
17036 (child_add_thread): Call thread_added on the low target,
17037 which does the same thing.
17038 (regptr): Delete.
17039 (do_initial_child_stuff): Remove debug registers references.
17040 Set context using the low target. Resume threads after
17041 setting the contexts.
17042 (child_continue): Remove dead variable. Remove debug
17043 registers references.
17044 (child_fetch_inferior_registers): Go through the low target.
17045 (do_child_store_inferior_registers): Remove.
17046 (child_store_inferior_registers): Go through the low target.
17047 (win32_resume): Remove debug registers references.
17048 Set context using the low target.
17049 (handle_exception): Change return type to void. Don't record
17050 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17051 first chance exception.
889bf7c5 17052 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17053 goto loop. Always return after waiting for debug event.
17054 (win32_wait): Convert to switch statement. Handle spurious
17055 events.
17056
17057 * win32-i386-low.c (debug_registers_changed,
17058 debug_registers_used): New.
17059 (initial_stuff): Rename to ...
17060 (i386_initial_stuff): ... this. Clear debug registers
17061 state variables.
17062 (store_debug_registers): Delete.
17063 (i386_get_thread_context): New.
17064 (load_debug_registers): Delete.
17065 (i386_set_thread_context): New.
17066 (i386_thread_added): New.
17067 (single_step): Rename to ...
17068 (i386_single_step): ... this.
17069 (do_fetch_inferior_registers): Rename to ...
17070 (i386_fetch_inferior_register): ... this.
17071 (i386_store_inferior_register): New.
17072 (the_low_target): Adapt to new interface.
17073
17074 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17075 (arm_get_thread_context): New.
17076 (arm_set_thread_context): New.
17077 (regptr): New.
17078 (do_fetch_inferior_registers): Rename to ...
17079 (arm_fetch_inferior_register): ... this.
17080 (arm_store_inferior_register): New.
17081 (arm_wince_breakpoint): Reimplement as unsigned long.
17082 (arm_wince_breakpoint_len): Define.
17083 (the_low_target): Adapt to new interface.
17084
17085 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17086 load_debug_registers. Add get_thread_context, set_thread_context,
17087 thread_added and store_inferior_register. Rename
17088 fetch_inferior_registers to fetch_inferior_register.
17089 (regptr): Remove declaration.
17090
dd6953e1
PA
170912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17092
17093 * linux-low.c (linux_detach): Change return type to int. Return 0.
17094 * spu-low.c (spu_detach): Likewise.
17095
444d6139
PA
170962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17097
17098 * target.h (target_ops): Change return type of detach to int.
17099 Add join.
17100 (join_inferior): New.
17101 * server.c (main): Don't skip detach support on mingw32.
17102 If the inferior doesn't support detaching return error.
17103 Call join_inferior instead of using waitpid.
17104 * linux-low.c (linux_join): New.
17105 (linux_target_op): Add linux_join.
17106 * spu-low.c (spu_join): New.
17107 (spu_target_ops): Add spu_join.
17108 * win32-low.c (win32_detach): Adapt to new interface.
17109 Reopen current_process_handle before detaching. Issue a child
17110 resume before detaching.
17111 (win32_join): New.
17112 (win32_target_op): Add win32_join.
17113
1d5315fe
PA
171142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17115
17116 * win32-low.c (win32-attach): Fix return value.
17117 * target.h (target_ops): Describe ATTACH return values.
17118
bf914831
PA
171192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17120
17121 * win32-low.c (GETPROCADDRESS): Define.
17122 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17123 (winapi_DebugSetProcessKillOnExit): Likewise.
17124 (win32_create_inferior): Force usage of ansi CreateProcessA.
17125 (win32_attach): Use GETPROCADDRESS.
17126 (win32_detach): Likewise.
17127
f72f3e60
PA
171282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17129
17130 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17131
ed50f18f
PA
171322007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17133
17134 * win32-low.c: Commit leftover changes from 2007-03-29.
17135
0c2ead7e
DJ
171362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17137
17138 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17139 fields short instead of int. Add explicit padding.
17140 (i387_cache_to_fsave): Remove unnecessary casts.
17141 (i387_fsave_to_cache): Doc fix.
17142 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17143
73725ff3
DJ
171442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17145
17146 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17147 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17148
d99f33d8
PA
171492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17150
17151 * configure.srv (arm*-*-mingw32ce*): Move near the other
17152 arm targets.
17153
68070c10
PA
171542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17155
2482afc6 17156 * configure.ac: Add errno checking.
68070c10
PA
17157 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17158 sys/file.h and malloc.h.
17159 (AC_CHECK_DECLS): Add perror.
17160 (srv_mingwce): Handle.
2482afc6 17161 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17162 win32-i386-low.o to srv_tgtobj.
17163 (i[34567]86-*-mingw*): Likewise.
17164 (arm*-*-mingw32ce*): Add case.
17165 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17166 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17167 [__MINGW32CE__] (strerror): New function.
17168 [__MINGW32CE__] (errno): Define to GetLastError.
17169 [__MINGW32CE__] (COUNTOF): New macro.
17170 (remote_open): Remove extra close call.
17171 * mem-break.c (delete_breakpoint_at): New function.
17172 * mem-break.h (delete_breakpoint_at): Declare.
17173 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17174 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17175 [USE_WIN32API] (read, write): Add char* casts.
17176 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17177 * server.h: Include wincecompat.h on Windows CE.
17178 [HAVE_ERRNO_H]: Check.
17179 (perror): Declare if not declared.
17180 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17181 (perror_with_name): Remove errno declaration.
17182 * wincecompat.h: New.
17183 * wincecompat.c: New.
17184 * win32-low.h: New.
17185 * win32-arm-low.c: New.
17186 * win32-i386-low.c: New.
17187 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17188 (OUTMSG2): Make it safe.
17189 (_T): New macro.
17190 (COUNTOF): New macro.
17191 (NUM_REGS): Get it from the low target.
17192 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17193 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17194 (thread_rec): Let low target handle debug registers.
17195 (child_add_thread): Likewise.
17196 (child_init_thread_list): Likewise.
17197 (continue_one_thread): Likewise.
17198 (regptr): New.
17199 (do_child_fetch_inferior_registers): Move to ...
17200 * win32-i386-low.c: ... here, and rename to ...
17201 (do_fetch_inferior_registers): ... this.
889bf7c5 17202 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17203 Go through the low target.
17204 (do_child_store_inferior_registers): Use regptr.
17205 (strwinerror): New function.
17206 (win32_create_inferior): Handle Windows CE.
17207 Use strwinerror instead of strerror on Windows error
17208 codes. Add program to the error output.
17209 Don't close the main thread handle on Windows CE.
17210 (win32_attach): Use coredll.dll on Windows CE.
17211 (win32_kill): Close current process and current
17212 thread handles.
17213 (win32_detach): Use coredll.dll on Windows CE.
17214 (win32_resume): Let low target handle debug registers, and
17215 step request.
17216 (handle_exception): Add/Remove initial breakpoint. Avoid
17217 non-existant WSTOPSIG on Windows CE.
17218 (win32_read_inferior_memory): Cast to remove warning.
17219 (win32_arch_string): Go through the low target.
17220 (initialize_low): Call set_breakpoint_data with the low
17221 target's breakpoint.
17222 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17223 FOP_REGNUM, mappings): Move to ...
17224 * win32-i386-low.c: ... here.
17225 * win32-low.c (win32_thread_info): Move to ...
17226 * win32-low.h: ... here.
17227 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17228 win32-arm-low.c and wincecompat.c.
17229 (all:): Add $EXEEXT.
17230 (install-only:): Likewise.
17231 (gdbserver:): Likewise.
17232 (gdbreplay:): Likewise.
17233 * config.in: Regenerate.
17234 * configure: Regenerate.
17235
41093d81
PA
172362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17237
17238 * win32-low.c: Rename typedef thread_info to
17239 win32_thread_info throughout.
17240
544afa54
PA
172412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17242
17243 * win32-i386-low.c: Rename to ...
17244 * win32-low.c: ... this.
17245 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17246 * Makefile.in: Likewise.
17247
bce7165d
PA
172482007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17249
17250 * remote-utils.c (monitor_output): Constify msg parameter.
17251 * server.h (monitor_output): Likewise.
17252 * win32-i386-low.c (handle_output_debug_string): New.
17253 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17254 handle_output_debug_string.
17255 (get_child_debug_event): Likewise.
17256
506c7aa0
DJ
172572007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17258
17259 * server.c (main): Correct strtoul check.
17260
42c81e2a
DJ
172612007-03-27 Jon Ringle <jon@ringle.org>
17262
17263 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17264
9453113a
DJ
172652007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17266
17267 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17268
64a69107
DJ
172692007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17270
17271 * terminal.h: Check HAVE_SGTTY_H.
17272
172732007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17274
17275 * remote-utils.c (remote_open): Print out the assigned port number.
17276
c74d0ad8
DJ
172772007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17278
17279 * remote-utils.c (monitor_output): New function.
17280 * server.c (debug_threads): Define here.
17281 (monitor_show_help): New function.
17282 (handle_query): Handle qRcmd.
17283 (main): Do not handle 'd' packet.
17284 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17285 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17286 of debug_threads.
17287
de7c3b4a
PA
172882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17289
17290 * Makefile.in (EXEEXT): New.
17291 (clean): Use $(EXEEXT).
17292
ef57601b
PA
172932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17294
17295 * target.h (target_ops): Rename send_signal to request_interrupt,
17296 and remove enum target_signal parameter.
17297 * linux-low.c (linux_request_interrupt): Rename from
17298 linux_send_signal, and always send SIGINT.
17299 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17300 and always send SIGINT.
17301 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17302 of send_signal.
17303 (input_interrupt): Likewise.
17304
820f2bda
PA
173052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17306
17307 * server.c (get_features_xml): Check if target implemented
17308 arch_string.
17309 * win32-i386-low.c (win32_arch_string): New.
17310 (win32_target_ops): Add win32_arch_string as arch_string member.
17311
ab39bf24
UW
173122007-02-22 Markus Deuling <deuling@de.ibm.com>
17313
17314 * spu-low.c (spu_arch_string): New.
17315 (spu_target_ops): Add spu_arch_string.
17316
61ff6e04
DJ
173172007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17318
17319 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17320 * configure.ac: Do not check for terminal.h.
17321 * configure, config.in: Regenerated.
17322
fb1e4ffc
DJ
173232007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17324
17325 * Makefile.in (OBS): Add $(XML_BUILTIN).
17326 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17327 (clean): Update.
17328 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17329 (arm-with-iwmmxt.c): New.
17330 * config.in, configure: Regenerate.
17331 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17332 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17333 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17334 (arm*-*-linux*): Add iWMMXt and regset support.
17335 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17336 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17337 (arm_store_wmmxregset, target_regsets): New.
17338 * server.c (get_features_xml): Take annex argument. Check builtin
17339 XML documents.
17340 (handle_query): Handle multiple annexes.
17341
0f48aa01
DJ
173422007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17343
17344 * remote-utils.c [USE_WIN32API] (read, write): Define.
17345 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17346 write.
17347
23181151
DJ
173482007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17349
17350 * linux-i386-low.c (the_low_target): Set arch_string.
17351 * linux-x86-64-low.c (the_low_target): Likewise.
17352 * linux-low.c (linux_arch_string): New.
17353 (linux_target_ops): Add it.
17354 * linux-low.h (struct linux_target_ops): Add arch_string.
17355 * server.c (write_qxfer_response): Use const void * for DATA.
17356 (get_features_xml): New.
17357 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17358 * target.h (struct target_ops): Add arch_string method.
17359
9d606399
DJ
173602007-01-03 Denis Pilat <denis.pilat@st.com>
17361 Daniel Jacobowitz <dan@codesourcery.com>
17362
17363 * linux-low.c (linux_kill): Handle being called with no threads.
17364 * win32-i386-low.c (win32_kill): Likewise.
17365 (get_child_debug_event): Clear current_process_handle.
17366
173672006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17368 Daniel Jacobowitz <dan@codesourcery.com>
17369
17370 * remote-utils.c (remote_open): Check the type of specified
17371 serial port devices before opening them.
17372 * server.c (main): Kill the inferior if an error occurs during
17373 the first remote_open.
17374
a5e13d24
DJ
173752006-12-05 Markus Deuling <deuling@de.ibm.com>
17376
17377 * README: Update supported targets.
17378
186947f7
DJ
173792006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17380
17381 * Makefile.in (clean): Remove reg-mips64.c.
17382 (reg-mips64.c, reg-mips64.o): New rules.
17383 * configure.srv: Handle mips64. Include regset support for mips.
17384 * linux-mips-low.c (union mips_register): New.
17385 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17386 (mips_breakpoint, mips_breakpoint_at): Use int.
17387 (mips_collect_register, mips_supply_register)
17388 (mips_collect_register_32bit, mips_supply_register_32bit)
17389 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17390 (mips_store_fpregset, target_regsets): New.
17391 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17392
a13e2c95
UW
173932006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17394
17395 * configure.srv: Add target "spu*-*-*".
17396 * Makefile.in (clean): Remove reg-spu.c.
17397 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17398 * spu-low.c: New file.
17399
cb7283db
DJ
174002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17401
17402 * configure.ac: Correct td_thr_tls_get_addr test.
17403 * configure: Regenerated.
17404
89be2091
DJ
174052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17406
17407 * linux-low.c (linux_wait_for_event): Reformat. Use the
17408 pass_signals array.
17409 * remote-utils.c (decode_address_to_semicolon): New.
17410 * server.c (pass_signals, handle_general_set): New.
17411 (handle_query): Mention QPassSignals for qSupported.
17412 (main): Call handle_general_set.
17413 * server.h (pass_signals, decode_address_to_semicolon): New.
17414
000ef4f0
DJ
174152006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17416
17417 * server.c (handle_query): Correct error handling for read_auxv.
17418
b7149293
UW
174192005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17420
17421 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17422 and srv_linux_thread_db to yes.
17423 * linux-s390-low.c (s390_fill_gregset): New function.
17424 (target_regsets): Define data structure.
17425
dae5f5cf
DJ
174262006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17427
17428 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17429 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17430 * config.in, configure: Regenerated.
17431 * inferiors.c (gdb_id_to_thread): New function.
17432 (gdb_id_to_thread_id): Use it.
17433 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17434 * linux-low.h (struct process_info): Add th member.
17435 (thread_db_get_tls_address): New prototype.
17436 * remote-utils.c (decode_address): Make non-static.
17437 * server.c (handle_query): Handle qGetTLSAddr.
17438 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17439 * target.h (struct target_ops): Add get_tls_address.
17440 * thread-db.c (maybe_attach_thread): Save the thread handle.
17441 (thread_db_get_tls_address): New.
17442
32ca6d61
DJ
174432006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17444
17445 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17446 (linux_resume_one_process): Take a siginfo_t *. Update all
17447 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17448 (struct pending_signals): Add a siginfo_t.
17449 (linux_wait_for_process): Always set last_status.
17450 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17451 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17452 * linux-low.h (struct process_info): Add last_status.
17453
5ffff7c1
DJ
174542006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17455
17456 * remote-utils.c (try_rle): New function.
17457 (putpkt_binary): Use it.
17458
8695c747
DJ
174592006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17460
17461 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17462 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17463 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17464 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17465 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17466 point registers.
17467
290fadea
RS
174682006-08-08 Richard Sandiford <richard@codesourcery.com>
17469
17470 * server.c (terminal_fd): New variable.
17471 (old_foreground_pgrp): Likewise.
17472 (restore_old_foreground_pgrp): New function.
17473 (start_inferior): Record the terminal file descriptor in terminal_fd
17474 and its original foreground group in old_foreground_pgrp. Register
17475 restore_old_foreground_pgrp with atexit().
17476
9f2e1e63
DJ
174772006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17478
17479 * server.c (handle_query): Correct qPart to qXfer.
17480
b80864fb
DJ
174812006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17482
17483 * configure.ac: Check for more headers which are missing on
17484 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17485 * configure.srv: Add Cygwin and mingw32.
17486 * remote-utils.c: Don't include headers unconditionally which
17487 are missing on mingw32. Include <winsock.h> for mingw32.
17488 (remote_open): Adjust for mingw32 support. Flush
17489 standard error after writing to it.
17490 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17491 (unblock_async_io, enable_async_io, disable_async_io)
17492 (readchar, getpkt): Update for Winsock support.
17493 (prepare_resume_reply): Expect a protocol signal number.
17494 * server.c: Disable <sys/wait.h> on mingw32.
17495 (start_inferior): Adjust for mingw32 support. Flush
17496 standard error after writing to it.
17497 (attach_inferior): Likewise. Use protocol signal
17498 numbers.
17499 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17500 and names.
17501 * win32-i386-low.c: New file.
17502 * Makefile.in (XM_CLIBS): Set.
17503 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17504 (win32-i386-low.o): New dependency rule.
17505 * linux-low.c (linux_wait): Use target signal numbers.
17506 * target.h (struct target_ops): Doc fix.
17507 * server.h (target_signal_to_name): New prototype.
17508 * gdbreplay.c: Don't include headers unconditionally which
17509 are missing on mingw32. Include <winsock.h> for mingw32.
17510 (remote_close, remote_open): Adjust for Winsock support.
17511 * configure, config.in: Regenerated.
17512
0876f84a
DJ
175132006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17514
17515 * server.c (decode_xfer_read, write_qxfer_response): New.
17516 (handle_query): Take a packet length argument. Handle
17517 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17518 the qSupported response.
17519 (main): Update call to handle_query.
17520
01f9e8fa
DJ
175212006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17522
17523 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17524 (putpkt_binary): Renamed from putpkt and adjusted for binary
17525 data.
17526 (putpkt): New wrapper for putpkt_binary.
17527 (readchar): Don't mask off the high bit.
17528 (decode_X_packet): New function.
17529 * server.c (main): Call putpkt_binary if a handler sets the packet
17530 length. Save the length of the incoming packet. Handle 'X'.
17531 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17532
be2a5f71
DJ
175332006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17534
17535 * server.c (handle_query): Handle qSupported.
17536
ea025f5f
DJ
175372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17538
17539 * remote-utils.c (all_symbols_looked_up): New variable.
17540 (look_up_one_symbol): Check it.
17541 * server.h (look_up_one_symbol): New declaration.
17542 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17543
9308fc88
DJ
175442006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17545
17546 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17547 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17548 (PTRACE_GET_THREAD_AREA): Define.
17549 (ps_get_thread_area): New function.
17550
52fb6437
NS
175512006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17552
17553 * configure.srv (m68k*-*-uclinux*): New target.
17554 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17555 (linux_resume_one_process): Remove extraneous cast.
17556 (linux_read_offsets): New.
17557 (linux_target_op): Add linux_read_offsets on mmuless systems.
17558 * server.c (handle_query): Add qOffsets logic.
17559 * target.h (struct target_ops): Add read_offsets.
17560
21b0f40c
DJ
175612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17562
17563 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17564 (PTRACE_GET_THREAD_AREA): Define.
17565 (ps_get_thread_area): New function.
17566 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17567 (linux-x86-64-low.o): Update.
17568
0050a760
DJ
175692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17570
17571 * configure.ac: Remove checks for prfpregset_t.
17572 * gdb_proc_service.h: New file.
17573 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17574 new "gdb_proc_service.h".
17575 * proc-service.c: Likewise.
17576 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17577 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17578 * Makefile.in (gdb_proc_service_h): Updated.
17579 * configure, config.in: Regenerated.
17580
b92a518e
DJ
175812006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17582
17583 * remote-utils.c (prepare_resume_reply): Move declaration
17584 of gdb_id_from_wait to the top of the block.
17585
545587ee
DJ
175862006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17587
17588 * linux-low.c (regsets_store_inferior_registers): Read the regset
17589 from the target before filling it.
17590
9db87ebd
DJ
175912006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17592
17593 * server.c (attach_inferior): Return SIGTRAP for a successful
17594 attach.
17595
dd24457d
DJ
175962006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17597
17598 * Makefile.in (OBS): Add version.o.
17599 (STAGESTUFF): Delete.
17600 (version.o): Add dependencies.
17601 (version.c): Replace rule.
17602 (clean): Remove version.c.
17603 * server.c (gdbserver_version): New.
17604 (gdbserver_usage): Use printf.
17605 (main): Handle --version and --help.
17606 * server.h (version, host_name): Add declarations.
17607
6f0f660e
EZ
176082005-12-23 Eli Zaretskii <eliz@gnu.org>
17609
889bf7c5
PA
17610 * linux-arm-low.c:
17611 * linux-arm-low.c:
17612 * inferiors.c:
17613 * i387-fp.h:
17614 * i387-fp.c:
17615 * gdbreplay.c:
17616 * regcache.c:
17617 * proc-service.c:
17618 * mem-break.h:
17619 * mem-break.c:
17620 * linux-x86-64-low.c:
17621 * linux-sh-low.c:
17622 * linux-s390-low.c:
17623 * linux-ppc64-low.c:
17624 * linux-ppc-low.c:
17625 * linux-mips-low.c:
17626 * linux-m68k-low.c:
17627 * linux-m32r-low.c:
17628 * linux-low.h:
17629 * linux-low.c:
17630 * linux-ia64-low.c:
17631 * linux-i386-low.c:
17632 * linux-crisv32-low.c:
17633 * thread-db.c:
17634 * terminal.h:
17635 * target.h:
17636 * target.c:
17637 * server.h:
17638 * server.c:
17639 * remote-utils.c:
17640 * regcache.h:
17641 * utils.c:
17642 * Makefile.in:
17643 * configure.ac:
6f0f660e
EZ
17644 * gdbserver.1: Add (C) after Copyright. Update the FSF
17645 address.
17646
9d1fb177
DJ
176472005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17648
17649 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17650 (arm_breakpoint_at): Recognize both breakpoints.
17651 (the_low_target): Use the correct breakpoint instruction.
17652
011a70c2
DJ
176532005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17654
17655 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17656 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17657 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17658 (the_low_target): Update.
17659
7fb85e41
AS
176602005-10-25 Andreas Schwab <schwab@suse.de>
17661
17662 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17663
17664 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17665 (ia64_num_regs): Reduce to 462.
17666
3db0444b
DJ
176672005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17668
17669 * acinclude.m4: Correct quoting.
17670 * aclocal.m4: Regenerated.
17671
17672 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17673 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17674 (thread_db_init): Call thread_db_err_str.
17675 * configure.ac: Check for TD_VERSION.
17676 * config.in, configure: Regenerated.
17677
bee0189a
DJ
176782005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17679
17680 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17681
e9d25b98
DJ
176822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17685 is not available. Define HAVE_PTRACE_GETREGS if it is.
17686 * config.in, configure: Regenerated.
17687 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17688 * linux-i386-low.c, linux-m68k-low.c: Update to use
17689 HAVE_PTRACE_GETREGS.
17690 * linux-low.c (regsets_fetch_inferior_registers)
17691 (regsets_store_inferior_registers): Only return 0 if we processed
17692 GENERAL_REGS.
17693 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17694 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17695
a06660f7
DJ
176962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17697
17698 * inferiors.c (struct thread_info): Add gdb_id.
17699 (add_thread): Add gdb_id argument.
17700 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17701 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17702 calls to add_thread.
17703 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17704 * server.c (handle_query): Use thread_to_gdb_id.
17705 (handle_v_cont, main): Use gdb_id_to_thread_id.
17706 * server.h (add_thread): Update prototype.
17707 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17708 prototypes.
17709
5a1f5858
DJ
177102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17711
17712 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17713 left-padded registers.
17714 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17715 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17716
e122f1f5
SE
177172005-07-01 Steve Ellcey <sje@cup.hp.com>
17718
17719 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17720 * configure: Regenerate.
17721 * config.in: Regenerate.
17722 * server.h (NEED_DECLARATION_STRERROR):
17723 Replace with !HAVE_DECL_STRERROR.
17724
d592fa2f
DJ
177252005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17726
17727 * linux-low.c (linux_wait, linux_send_signal): Don't test
17728 an unsigned long variable for > 0 if it could be MAX_ULONG.
17729 * server.c (myresume): Likewise.
17730 * target.c (set_desired_inferior): Likewise.
17731
ccbd4912
MK
177322005-06-13 Mark Kettenis <kettenis@gnu.org>
17733
17734 * configure.ac: Simplify and improve check for socklen_t.
17735 * configure, config.in: Regenerate.
17736
f450004a
DJ
177372005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17738
17739 * acconfig.h: Remove.
17740 * configure.ac: Add a test for socklen_t. Use three-argument
17741 AC_DEFINE throughout.
17742 * config.in: Regenerated using autoheader 2.59.
17743 * configure: Regenerated.
17744
17745 * gdbreplay.c (socklen_t): Provide a default.
17746 (remote_open): Use socklen_t.
17747 * remote-utils.c (socklen_t): Provide a default.
17748 (remote_open): Use socklen_t.
17749 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17750 unsigned char.
17751
17752 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17753 char for buffers.
17754 * linux-low.c (linux_read_memory, linux_write_memory)
17755 (linux_read_auxv): Likewise.
17756 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17757 (check_mem_write): Likewise.
17758 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17759 Likewise.
17760 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17761 (registers_from_string, register_data): Likewise.
17762 * server.c (handle_query, main): Likewise.
17763 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17764 (decode_M_packet): Likewise.
17765 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17766 * target.h (struct target_ops): Update read_memory, write_memory,
17767 and read_auxv.
17768 (read_inferior_memory, write_inferior_memory): Update.
17769 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17770 to unsigned char *.
17771 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17772 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17773 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17774 linux-s390-low.c, linux-sh-low.c: Update for changes in
17775 read_inferior_memory and the_low_target->breakpoint.
17776
eee84df1
DJ
177772005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17778
17779 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17780 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17781 * configure.srv: Add powerpc64-*-linux*.
17782 * linux-ppc64-low.c: New file.
17783
45b134e5
OF
177842005-05-23 Orjan Friberg <orjanf@axis.com>
17785
17786 * linux-cris-low.c: New file with support for CRIS.
17787 * linux-crisv32-low.c: Ditto for CRISv32.
17788 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17789 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17790 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17791 reg-crisv32.o, and reg-crisv32.c to make rules.
17792 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17793 recognized targets.
17794
48d93c75
UW
177952005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17796
17797 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17798 of sizeof (PTRACE_XFER_TYPE).
17799 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17800
e013ee27
OF
178012005-05-12 Orjan Friberg <orjanf@axis.com>
17802
889bf7c5 17803 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17804 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17805 pointers for hardware watchpoint support.
17806 * linux-low.h (struct linux_target_ops): Ditto.
17807 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17808 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17809 to linux_target_ops.
17810 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17811 reply packet.
17812 * server.c (main): Recognize 'Z' and 'z' packets.
17813
b0ded00b
UW
178142005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17815
17816 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17817 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17818 (the_low_target): Add new members.
17819
8643e2ad
DJ
178202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * proc-service.c (ps_lgetregs): Search all_processes instead of
17823 all_threads.
17824
fc620387
DJ
178252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17826
17827 * server.c (start_inferior): Change return type to int.
17828 (attach_inferior): Change sigptr to int *.
17829 (handle_v_cont, handle_v_requests): Change signal to int *.
17830 (main): Change signal to int.
17831
178322005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17833
17834 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17835 * configure.srv: Add m32r*-*-linux*.
17836 * linux-m32r-low.c: New file.
17837
e0e76420
DJ
178382005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17839
17840 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17841
a1928bad
DJ
178422005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17843
17844 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17845 Take unsigned long arguments for PIDs.
17846 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17847 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17848 (wait_for_sigstop, linux_resume_one_process)
17849 (regsets_fetch_inferior_registers, linux_send_signal)
17850 (linux_read_auxv): Likewise. Update the types of variables holding
17851 PIDs. Update format string specifiers.
17852 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17853 * remote-utils.c (prepare_resume_reply): Likewise.
17854 * server.c (cont_thread, general_thread, step_thread)
17855 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17856 unsigned long.
17857 (handle_query): Update format specifiers.
17858 (handle_v_cont, main): Use strtoul for thread IDs.
17859 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17860 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17861 (general_thread, step_thread, thread_from_wait)
17862 (old_thread_from_wait): Update.
17863 * target.h (struct thread_resume): Use unsigned long for THREAD.
17864 (struct target_ops): Use unsigned long for arguments to attach and
17865 thread_alive.
17866
dcdb98d2
DJ
178672005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17868
17869 * acinclude.m4: Include bfd/bfd.m4 directly.
17870 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17871 <agriffis@toolchain.org>.
17872 * aclocal.m4, configure: Regenerated.
17873
bec39cab
AC
178742005-01-07 Andrew Cagney <cagney@gnu.org>
17875
17876 * configure.ac: Rename configure.in, require autoconf 2.59.
17877 * configure: Re-generate.
17878
434c4c77
DJ
178792004-12-08 Daniel Jacobowitz <dan@debian.org>
17880
17881 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17882 LIBS when finished.
17883 * aclocal.m4: Regenerated.
17884 * configure: Regenerated.
17885
db1d3e1b
AS
178862004-11-21 Andreas Schwab <schwab@suse.de>
17887
17888 * linux-m68k-low.c (m68k_num_gregs): Define.
17889 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17890 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17891 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17892 (m68k_breakpoint_at): New. Add to the_low_target.
17893
17894 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17895 srv_linux_thread_db to yes.
17896
43360365
JB
178972004-10-20 Joel Brobecker <brobecker@gnat.com>
17898
17899 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17900 (ARCH_SET_FS): Likewise.
17901 (ARCH_GET_FS): Likewise.
17902 (ARCH_GET_GS): Likewise.
17903
fd500816
DJ
179042004-10-16 Daniel Jacobowitz <dan@debian.org>
17905
17906 * linux-i386-low.c (ps_get_thread_area): New.
17907 * linux-x86-64-low.c (ps_get_thread_area): New.
17908 * linux-low.c: Include <sys/syscall.h>.
17909 (linux_kill_one_process): Don't kill the first thread here.
17910 (linux_kill): Kill the first thread here.
17911 (kill_lwp): New function.
17912 (send_sigstop, linux_send_signal): Use it.
17913 * proc-service.c: Clean up #ifdefs.
17914 (fpregset_info): Delete.
17915 (ps_lgetregs): Update and enable implementation.
17916 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17917 implementations.
17918 * remote-utils.c (struct sym_cache, symbol_cache): New.
17919 (input_interrupt): Print a clearer message.
17920 (async_io_enabled): New variable.
17921 (enable_async_io, disable_async_io): Use it. Update comments.
17922 (look_up_one_symbol): Use the symbol cache.
17923 * thread-db.c (thread_db_look_up_symbols): New function.
17924 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17925
f6de3c42
DJ
179262004-10-16 Daniel Jacobowitz <dan@debian.org>
17927
17928 * configure.in: Test for -rdynamic.
17929 * configure: Regenerated.
17930 * Makefile (INTERNAL_LDFLAGS): New.
17931 (gdbserver, gdbreplay): Use it.
17932
2c0fc042
AC
179332004-09-02 Andrew Cagney <cagney@gnu.org>
17934
17935 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17936
075b3282
DJ
179372004-03-23 Daniel Jacobowitz <drow@mvista.com>
17938
17939 * linux-low.c (linux_wait): Clear all_processes list also.
17940
fa6a77dc
DJ
179412004-03-12 Daniel Jacobowitz <drow@mvista.com>
17942
17943 * linux-low.c: Include <errno.h>. Remove extern declaration of
17944 errno.
17945
6d782a97
DJ
179462004-03-12 Daniel Jacobowitz <drow@mvista.com>
17947
17948 * gdbreplay.c, server.h, utils.c: Update copyright years.
17949
3a7fb99b
DJ
179502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17951
17952 * server.c (main): Print child status or termination signal from
17953 variable 'signal', not 'sig'.
17954
c3e735a6
DJ
179552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17956
17957 * linux-low.c (linux_read_memory): Change return type to
17958 int. Check for and return error from ptrace().
17959 * target.c (read_inferior_memory): Change return type to int. Pass
17960 back return status from the_target->read_memory().
17961 * target.h (struct target_ops): Adapt *read_memory() prototype.
17962 Update comment.
17963 (read_inferior_memory): Adapt prototype.
17964 * server.c (main): Return an error packet if
17965 read_inferior_memory() returns an error.
17966
a59d1c82
DJ
179672004-03-04 Daniel Jacobowitz <drow@mvista.com>
17968
17969 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17970 Unify with other clean targets.
17971
dc3f8883
DJ
179722004-02-29 Daniel Jacobowitz <drow@mvista.com>
17973
17974 * server.c (handle_v_cont): Call set_desired_inferior.
17975
89a208da
DJ
179762004-02-29 Daniel Jacobowitz <drow@mvista.com>
17977
17978 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17979
62ea82f5
DJ
179802004-02-29 Daniel Jacobowitz <drow@mvista.com>
17981
17982 * linux-low.c (linux_wait): Unblock async I/O.
17983 (linux_resume): Block and enable async I/O.
17984 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17985 * server.h (block_async_io, unblock_async_io): Add prototypes.
17986
6910d122
DJ
179872004-02-29 Daniel Jacobowitz <drow@mvista.com>
17988
17989 * remote-utils.c (remote_open): Print a status notice after
17990 opening a TCP port.
17991 * server.c (attach_inferior): Print a status notice after
17992 attaching.
17993
179942004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17995
17996 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17997
c89dc5d4
DJ
179982004-02-26 Daniel Jacobowitz <drow@mvista.com>
17999
18000 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18001 error packet.
18002 * server.c, target.h: Update copyright years.
18003
4b8dad4a
RM
180042004-02-25 Roland McGrath <roland@redhat.com>
18005
18006 * target.h (struct target_ops): New member `read_auxv'.
18007 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18008 * linux-low.c (linux_read_auxv): New function.
18009 (linux_target_ops): Initialize `read_auxv' member to that.
18010
d7446758
JB
180112004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18012
18013 Committed by Jim Blandy <jimb@redhat.com>.
18014
18015 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18016 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18017 instead of GPR_SIZE to distiguish s390 and s390x targets.
18018
5544ad89
DJ
180192004-01-31 Daniel Jacobowitz <drow@mvista.com>
18020
18021 * linux-low.c: Update copyright year.
18022 (check_removed_breakpoint): Clear pending_is_breakpoint.
18023 (linux_set_resume_request, linux_queue_one_thread)
18024 (resume_status_pending_p): New functions.
18025 (linux_continue_one_thread): Use process->resume.
18026 (linux_resume): Only resume threads if there are no pending events.
18027 * linux-low.h (struct process_info): Add resume request
18028 pointer.
18029
2a68b70e
DJ
180302004-01-30 Daniel Jacobowitz <drow@mvista.com>
18031
18032 * regcache.c (new_register_cache): Clear the allocated register
18033 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18034
64386c31
DJ
180352003-10-13 Daniel Jacobowitz <drow@mvista.com>
18036
18037 * linux-low.c (linux_resume): Take a struct thread_resume *
18038 argument.
18039 (linux_wait): Update call.
18040 (resume_ptr): New static variable.
18041 (linux_continue_one_thread): Renamed from
18042 linux_continue_one_process. Use resume_ptr.
18043 (linux_resume): Use linux_continue_one_thread.
18044 * server.c (handle_v_cont, handle_v_requests): New functions.
18045 (myresume): New function.
18046 (main): Handle 'v' case.
18047 * target.h (struct thread_resume): New type.
18048 (struct target_ops): Change argument of "resume" to struct
18049 thread_resume *.
18050 (myresume): Delete macro.
18051
c938e9b0
L
180522003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18053
18054 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18055 (uninstall): Support DESTDIR.
18056
7f313d07
BC
18057Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18058
18059 * configure.srv: Add xscale*linux copy of arm*linux entry.
18060
3b2fc2ea
DJ
180612003-07-24 Daniel Jacobowitz <drow@mvista.com>
18062
18063 * linux-arm-low.c (arm_reinsert_addr): New function.
18064 (the_low_target): Add arm_reinsert_addr.
18065
1c0a559e
MK
180662003-07-08 Mark Kettenis <kettenis@gnu.org>
18067
18068 * mem-break.c: Remove whitespace at end of file.
18069
43d5792c
DJ
180702003-06-28 Daniel Jacobowitz <drow@mvista.com>
18071
18072 * configure.in: Check whether we need to prototype strerror.
18073 * server.h: Optionally prototype strerror.
18074 * gdbreplay.c (perror_with_name): Use strerror.
18075 * linux-low.c (linux_attach_lwp): Use strerror.
18076 * utils.c (perror_with_name): Use strerror.
18077 * config.in, configure: Regenerated.
18078
c8a86edf
DJ
180792003-06-28 Daniel Jacobowitz <drow@mvista.com>
18080
18081 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18082 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18083
73d37363
DJ
180842003-06-20 Daniel Jacobowitz <drow@mvista.com>
18085
18086 * Makefile.in (SFILES): Update.
18087 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18088 low-sun3.c: Remove files.
18089
6ad8ae5c
DJ
180902003-06-17 Daniel Jacobowitz <drow@mvista.com>
18091
18092 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18093 (linux_detach_one_process, linux_detach): New functions.
18094 (linux_target_ops): Add linux_detach.
18095 * server.c (main): Handle 'D' packet.
18096 * target.h (struct target_ops): Add "detach" member.
18097 (detach_inferior): Define.
18098
1581182a
MK
180992003-06-13 Mark Kettenis <kettenis@gnu.org>
18100
18101 From Kelley Cook <kelleycook@wideopenwest.com>:
18102 * configure.srv: Accept i[34567]86 variants.
18103
e5379b03
DJ
181042003-06-05 Daniel Jacobowitz <drow@mvista.com>
18105
18106 * linux-low.c (linux_wait_for_event): Correct comment typos.
18107 (linux_resume_one_process): Call check_removed_breakpoint.
18108 (linux_send_signal): New function.
18109 (linux_target_ops): Add linux_send_signal.
18110 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18111 of kill.
18112 * target.h (struct target_ops): Add send_signal.
18113
2ff29de4
JB
181142003-05-29 Jim Blandy <jimb@redhat.com>
18115
18116 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18117 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18118 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18119 away part of the register's value.
18120
254787d4
DJ
181212003-03-26 Daniel Jacobowitz <drow@mvista.com>
18122
18123 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18124 (linux_wait_for_event, linux_init_signals): Likewise.
18125
94e10508
DJ
181262003-03-17 Daniel Jacobowitz <drow@mvista.com>
18127
18128 * configure.in: Check for stdlib.h.
18129 * configure: Regenerated.
18130 * config.in: Regenerated.
18131
4c0711e0
DJ
181322003-01-04 Andreas Schwab <schwab@suse.de>
18133
18134 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18135
ef66e766
AC
181362003-01-02 Andrew Cagney <ac131313@redhat.com>
18137
18138 * Makefile.in: Remove obsolete code.
18139
a1358604
DJ
181402002-11-20 Daniel Jacobowitz <drow@mvista.com>
18141
18142 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18143 defined(PT_FPR0_HI).
18144
23ce3b1c
DJ
181452002-11-17 Stuart Hughes <seh@zee2.com>
18146
18147 * linux-arm-low.c (arm_num_regs): Increase.
18148 (arm_regmap): Include status register.
18149
181502002-11-17 Daniel Jacobowitz <drow@mvista.com>
18151
18152 * linux-low.c (register_addr): Remove incorrect -1 check.
18153
a9fa9f7d
DJ
181542002-08-29 Daniel Jacobowitz <drow@mvista.com>
18155
18156 * linux-low.c (linux_create_inferior): Call setpgid. Return
18157 the new PID.
18158 (unstopped_p, linux_signal_pid): Remove.
18159 (linux_target_ops): Remove linux_signal_pid.
18160 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18161 global instead of target method.
18162 * target.h (struct target_ops): Remove signal_pid. Update comment
18163 for create_inferior.
18164 * server.c (signal_pid): New variable.
18165 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18166 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18167 (attach_inferior): Set signal_pid.
18168
17574093
DJ
181692002-08-23 Daniel Jacobowitz <drow@mvista.com>
18170
18171 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18172
181732002-08-20 Jim Blandy <jimb@redhat.com>
18174
18175 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18176 default for this.
18177
181782002-08-01 Andrew Cagney <cagney@redhat.com>
18179
18180 * Makefile.in: Make chill references obsolete.
18181
181822002-07-24 Kevin Buettner <kevinb@redhat.com>
18183
18184 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18185 * configure: Regenerate.
18186 * config.in: Regenerate.
18187
181882002-07-09 David O'Brien <obrien@FreeBSD.org>
18189
18190 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18191 (perror_with_name, remote_close, remote_open, expect, play): Static.
18192
181932002-07-04 Michal Ludvig <mludvig@suse.cz>
18194
4b8dad4a 18195 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18196 byte offsets instead of an array of indexes.
18197 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18198
181992002-06-13 Daniel Jacobowitz <drow@mvista.com>
18200
18201 * regcache.c: Add comment.
18202
182032002-06-11 Daniel Jacobowitz <drow@mvista.com>
18204
18205 * thread-db.c: New file.
18206 * proc-service.c: New file.
18207 * acinclude.m4: New file.
18208 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18209 proc-service.o, and thread-db.o.
18210 (linux-low.o): Add USE_THREAD_DB.
18211 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18212 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18213 * aclocal.m4: Regenerated.
18214 * config.in: Regenerated.
18215 * configure: Regenerated.
18216 * configure.in: Check for proc_service.h, sys/procfs.h,
18217 thread_db.h, and linux/elf.h headrs.
18218 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18219 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18220 Check for -lthread_db and thread support.
18221 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18222 PowerPC, and SuperH.
18223 * i387-fp.c: Constify arguments.
18224 * i387-fp.h: Likewise.
18225 * inferiors.c: (struct thread_info): Renamed from
18226 `struct inferior_info'. Remove PID member. Use generic inferior
18227 list header. All uses updated.
18228 (inferiors, signal_pid): Removed.
18229 (all_threads): New variable.
18230 (get_thread): Define.
18231 (add_inferior_to_list): New function.
18232 (for_each_inferior): New function.
18233 (change_inferior_id): New function.
18234 (add_inferior): Removed.
18235 (remove_inferior): New function.
18236 (add_thread): New function.
18237 (free_one_thread): New function.
18238 (remove_thread): New function.
18239 (clear_inferiors): Use for_each_inferior and free_one_thread.
18240 (find_inferior): New function.
18241 (find_inferior_id): New function.
18242 (inferior_target_data): Update argument type.
18243 (set_inferior_target_data): Likewise.
18244 (inferior_regcache_data): Likewise.
18245 (set_inferior_regcache_data): Likewise.
18246 * linux-low.c (linux_bp_reinsert): Remove.
18247 (all_processes, stopping_threads, using_thrads)
18248 (struct pending_signals, debug_threads, pid_of): New.
18249 (inferior_pid): Replace with macro.
18250 (struct inferior_linux_data): Remove.
18251 (get_stop_pc, add_process): New functions.
18252 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18253 Use add_process and add_thread.
18254 (linux_attach_lwp): New function, based on old linux_attach. Use
18255 add_process and add_thread. Set stop_expected for new threads.
18256 (linux_attach): New function.
18257 (linux_kill_one_process): New function.
18258 (linux_kill): Kill all LWPs.
18259 (linux_thread_alive): Use find_inferior_id.
18260 (check_removed_breakpoints, status_pending_p): New functions.
18261 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18262 Update. Use WNOHANG. Wait for cloned processes also. Update process
18263 struct for the found process.
18264 (linux_wait_for_event): New function.
18265 (linux_wait): Use it. Support LWPs.
18266 (send_sigstop, wait_for_sigstop, stop_all_processes)
18267 (linux_resume_one_process, linux_continue_one_process): New functions.
18268 (linux_resume): Support LWPs.
18269 (REGISTER_RAW_SIZE): Remove.
18270 (fetch_register): Use register_size instead. Call supply_register.
18271 (usr_store_inferior_registers): Likewise. Call collect_register.
18272 Fix recursive case.
18273 (regsets_fetch_inferior_registers): Improve error message.
18274 (regsets_store_inferior_registers): Add debugging.
18275 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18276 (unstopped_p, linux_signal_pid): New functions.
18277 (linux_target_ops): Add linux_signal_pid.
18278 (linux_init_signals): New function.
18279 (initialize_low): Call it. Initialize using_threads.
18280 * regcache.c (inferior_regcache_data): Add valid
18281 flag.
18282 (get_regcache): Fetch registers lazily. Add fetch argument
18283 and update all callers.
18284 (regcache_invalidate_one, regcache_invalidate): New
18285 functions.
18286 (new_register_cache): Renamed from create_register_cache.
18287 Return the new regcache.
18288 (free_register_cache): Change argument to a void *.
18289 (registers_to_string, registers_from_string): Call get_regcache
18290 with fetch flag set.
18291 (register_data): Make static. Pass fetch flag to get_regcache.
18292 (supply_register): Call get_regcache with fetch flag clear.
18293 (collect_register): Call get_regcache with fetch flag set.
18294 (collect_register_as_string): New function.
18295 * regcache.h: Update.
18296 * remote-utils.c (putpkt): Flush after debug output and use
18297 stderr.
18298 Handle input interrupts while waiting for an ACK.
18299 (input_interrupt): Use signal_pid method.
18300 (getpkt): Flush after debug output and use stderr.
18301 (outreg): Use collect_register_as_string.
18302 (new_thread_notify, dead_thread_notify): New functions.
18303 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18304 and general_thread.
18305 (look_up_one_symbol): Flush after debug output.
18306 * server.c (step_thread, server_waiting): New variables.
18307 (start_inferior): Don't use signal_pid. Update call to mywait.
18308 (attach_inferior): Update call to mywait.
18309 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18310 (main): Don't fetch/store registers explicitly. Use
18311 set_desired_inferior. Support proposed ``Hs'' packet. Update
18312 calls to mywait.
18313 * server.h: Update.
18314 (struct inferior_list, struct_inferior_list_entry): New.
18315 * target.c (set_desired_inferior): New.
18316 (write_inferior_memory): Constify.
18317 (mywait): New function.
18318 * target.h: Update.
18319 (struct target_ops): New signal_pid method.
18320 (mywait): Removed macro, added prototype.
18321
18322 * linux-low.h (regset_func): Removed.
18323 (regset_fill_func, regset_store_func): New.
18324 (enum regset_type): New.
18325 (struct regset_info): Add type field. Use new operation types.
18326 (struct linux_target_ops): stop_pc renamed to get_pc.
18327 Add decr_pc_after_break and breakpoint_at.
18328 (get_process, get_thread_proess, get_process_thread)
18329 (strut process_info, all_processes, linux_attach_lwp)
18330 (thread_db_init): New.
18331
18332 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18333 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18334 (the_low_target): Add new members.
18335 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18336 (i386_store_fpxregset): Constify.
18337 (target_regsets): Add new kind identifier.
18338 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18339 (i386_set_pc): Add debugging.
18340 (i386_breakpoint_at): New function.
18341 (the_low_target): Add new members.
18342 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18343 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18344 (mips_breakpoint_at): New.
18345 (the_low_target): Add new members.
18346 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18347 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18348 (the_low_target): Add new members.
18349 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18350 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18351 (the_low_target): Add new members.
18352 * linux-x86-64-low.c (target_regsets): Add new kind
18353 identifier.
18354
183552002-05-15 Daniel Jacobowitz <drow@mvista.com>
18356
18357 From Martin Pool <mbp@samba.org>:
18358 * server.c (gdbserver_usage): New function.
18359 (main): Call it.
18360
183612002-05-14 Daniel Jacobowitz <drow@mvista.com>
18362
18363 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18364 stop_at -> stop_pc.
18365
183662002-05-04 Andrew Cagney <ac131313@redhat.com>
18367
18368 * Makefile.in: Remove obsolete code.
18369
183702002-04-24 Michal Ludvig <mludvig@suse.cz>
18371
18372 * linux-low.c (regsets_fetch_inferior_registers),
18373 (regsets_store_inferior_registers): Removed cast to int from
18374 ptrace() calls.
18375 * regcache.h: Added declaration of struct inferior_info.
18376
183772002-04-20 Daniel Jacobowitz <drow@mvista.com>
18378
18379 * inferiors.c (struct inferior_info): Add regcache_data.
18380 (add_inferior): Call create_register_cache.
18381 (clear_inferiors): Call free_register_cache.
18382 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18383 * regcache.c (struct inferior_regcache_data): New.
18384 (registers): Remove.
18385 (get_regcache): New function.
18386 (create_register_cache, free_register_cache): New functions.
18387 (set_register_cache): Don't initialize the register cache here.
18388 (registers_to_string, registers_from_string, register_data): Call
18389 get_regcache.
18390 * regcache.h: Add prototypes.
18391 * server.h: Likewise.
18392
183932002-04-20 Daniel Jacobowitz <drow@mvista.com>
18394
18395 * mem-break.c: New file.
18396 * mem-break.h: New file.
18397 * Makefile.in: Add mem-break.o rule; update server.h
18398 dependencies.
18399 * inferiors.c (struct inferior_info): Add target_data
18400 member.
18401 (clear_inferiors): Free target_data member if set.
18402 (inferior_target_data, set_inferior_target_data): New functions.
18403 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18404 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18405 * linux-low.c (linux_bp_reinsert): New variable.
18406 (struct inferior_linux_data): New.
18407 (linux_create_inferior): Use set_inferior_target_data.
18408 (linux_attach): Likewise. Call add_inferior.
18409 (linux_wait_for_one_inferior): New function.
18410 (linux_wait): Call it.
18411 (linux_write_memory): Add const.
18412 (initialize_low): Call set_breakpoint_data.
18413 * linux-low.h (struct linux_target_ops): Add breakpoint
18414 handling members.
18415 * server.c (attach_inferior): Remove extra add_inferior
18416 call.
18417 * server.h: Include mem-break.h. Update inferior.c
18418 prototypes.
18419 * target.c (read_inferior_memory)
18420 (write_inferior_memory): New functions.
18421 * target.h (read_inferior_memory)
18422 (write_inferior_memory): Change macros to prototypes.
18423 (struct target_ops): Update comments. Add const to write_memory
18424 definition.
18425
184262002-04-11 Daniel Jacobowitz <drow@mvista.com>
18427
18428 * linux-low.c (usr_store_inferior_registers): Support
18429 registers which are allowed to fail to store.
18430 * linux-low.h (linux_target_ops): Likewise.
18431 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18432 (ppc_cannot_store_register): FPSCR may not be storable.
18433
184342002-04-09 Daniel Jacobowitz <drow@mvista.com>
18435
18436 * server.h: Include <string.h> if HAVE_STRING_H.
18437 * ChangeLog: Correct paths in last ChangeLog entry.
18438
184392002-04-09 Daniel Jacobowitz <drow@mvista.com>
18440
18441 * linux-low.h: Remove obsolete prototypes.
18442 (struct linux_target_ops): New.
18443 (extern the_low_target): New.
18444 * linux-low.c (num_regs, regmap): Remove declarations.
18445 (register_addr): Use the_low_target explicitly.
18446 (fetch_register): Likewise.
18447 (usr_fetch_inferior_registers): Likewise.
18448 (usr_store_inferior_registers): Likewise.
18449 * linux-arm-low.c (num_regs): Remove.
18450 (arm_num_regs): Define.
18451 (arm_regmap): Renamed from regmap, made static.
18452 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18453 made static.
18454 (arm_cannot_store_register): Renamed from cannot_store_register,
18455 made static.
18456 (the_low_target): New.
18457 * linux-i386-low.c (num_regs): Remove.
18458 (i386_num_regs): Define.
18459 (i386_regmap): Renamed from regmap, made static.
18460 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18461 made static.
18462 (i386_cannot_store_register): Renamed from cannot_store_register,
18463 made static.
18464 (the_low_target): New.
18465 * linux-ia64-low.c (num_regs): Remove.
18466 (ia64_num_regs): Define.
18467 (ia64_regmap): Renamed from regmap, made static.
18468 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18469 made static.
18470 (ia64_cannot_store_register): Renamed from cannot_store_register,
18471 made static.
18472 (the_low_target): New.
18473 * linux-m68k-low.c (num_regs): Remove.
18474 (m68k_num_regs): Define.
18475 (m68k_regmap): Renamed from regmap, made static.
18476 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18477 made static.
18478 (m68k_cannot_store_register): Renamed from cannot_store_register,
18479 made static.
18480 (the_low_target): New.
18481 * linux-mips-low.c (num_regs): Remove.
18482 (mips_num_regs): Define.
18483 (mips_regmap): Renamed from regmap, made static.
18484 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18485 made static.
18486 (mips_cannot_store_register): Renamed from cannot_store_register,
18487 made static.
18488 (the_low_target): New.
18489 * linux-ppc-low.c (num_regs): Remove.
18490 (ppc_num_regs): Define.
18491 (ppc_regmap): Renamed from regmap, made static.
18492 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18493 made static.
18494 (ppc_cannot_store_register): Renamed from cannot_store_register,
18495 made static.
18496 (the_low_target): New.
18497 * linux-s390-low.c (num_regs): Remove.
18498 (s390_num_regs): Define.
18499 (s390_regmap): Renamed from regmap, made static.
18500 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18501 made static.
18502 (s390_cannot_store_register): Renamed from cannot_store_register,
18503 made static.
18504 (the_low_target): New.
18505 * linux-sh-low.c (num_regs): Remove.
18506 (sh_num_regs): Define.
18507 (sh_regmap): Renamed from regmap, made static.
18508 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18509 made static.
18510 (sh_cannot_store_register): Renamed from cannot_store_register,
18511 made static.
18512 (the_low_target): New.
18513 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18514 (the_low_target): New.
18515
185162002-04-09 Daniel Jacobowitz <drow@mvista.com>
18517
18518 * Makefile.in: Add stamp-h target.
18519 * configure.in: Create stamp-h.
18520 * configure: Regenerated.
18521
185222002-04-09 Daniel Jacobowitz <drow@mvista.com>
18523
18524 * inferiors.c: New file.
18525 * target.c: New file.
18526 * target.h: New file.
18527 * Makefile.in: Add target.o and inferiors.o. Update
18528 dependencies.
18529 * linux-low.c (inferior_pid): New static variable,
18530 moved from server.c.
18531 (linux_create_inferior): Renamed from create_inferior.
18532 Call add_inferior. Return 0 on success instead of a PID.
18533 (linux_attach): Renamed from myattach.
18534 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18535 (linux_thread_alive): Renamed from mythread_alive.
18536 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18537 child dies.
18538 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18539 (regsets_store_inferior_registers): Correct error message.
18540 Add missing ``return 0''.
18541 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18542 (linux_store_registers): Renamed from store_inferior_registers.
18543 (linux_read_memory): Renamed from read_inferior_memory.
18544 (linux_write_memory): Renamed from write_inferior_memory.
18545 (linux_target_ops): New structure.
18546 (initialize_low): Call set_target_ops ().
18547 * remote-utils.c (unhexify): New function.
18548 (hexify): New function.
18549 (input_interrupt): Send signals to ``signal_pid''.
18550 * server.c (inferior_pid): Remove.
18551 (start_inferior): Update create_inferior call.
18552 (attach_inferior): Call add_inferior.
18553 (handle_query): New function.
18554 (main): Call handle_query for `q' packets.
18555 * server.h: Include "target.h". Remove obsolete prototypes.
18556 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18557
185582002-04-09 Daniel Jacobowitz <drow@mvista.com>
18559
18560 * Makefile.in: Add WARN_CFLAGS. Update configury
18561 dependencies.
18562 * configure.in: Check for <string.h>
18563 * configure: Regenerate.
18564 * config.in: Regenerate.
18565 * gdbreplay.c: Include needed system headers.
18566 (remote_open): Remove strchr prototype.
18567 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18568 * regcache.c (supply_register): Change buf argument to const void *.
18569 (supply_register_by_name): Likewise.
18570 (collect_register): Change buf argument to void *.
18571 (collect_register_by_name): Likewise.
18572 * regcache.h: Add missing prototypes.
18573 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18574 * server.c (handle_query): New function.
18575 (attached): New static variable, moved out of main.
18576 (main): Quiet longjmp clobber warnings.
18577 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18578 * utils.c (error): Remove NORETURN.
18579 (fatal): Likewise.