1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's supports_z_point_type op into a
4 method of process_target.
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 * target.cc (process_target::supports_z_point_type): Define.
10 Update the derived classes and callers below.
12 * mem-break.cc (z_type_supported): Update.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_z_point_type): Turn into ...
15 (linux_process_target::supports_z_point_type): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 (nto_supports_z_point_type): Turn into ...
20 (nto_process_target::supports_z_point_type): ... this.
21 * nto-low.h (class nto_process_target): Update.
22 * win32-low.cc (win32_target_ops): Update.
23 (win32_supports_z_point_type): Turn into ...
24 (win32_process_target::supports_z_point_type): ... this.
25 * win32-low.h (class win32_process_target): Update.
27 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
29 Turn process_stratum_target's read_auxv op into a method of
32 * target.h (class process_stratum_target): Remove the target op.
33 (struct process_target): Add the target op. Also add
35 * target.cc (process_target::read_auxv): Define.
36 (process_target::supports_read_auxv): Define.
38 Update the derived classes and callers below.
40 * server.cc (handle_qxfer_auxv): Update.
41 (handle_query): Update.
42 * linux-low.cc (linux_target_ops): Update.
43 (linux_process_target::supports_read_auxv): Define.
44 (linux_read_auxv): Turn into ...
45 (linux_process_target::read_auxv): ... this.
46 * linux-low.h (class linux_process_target): Update.
47 * lynx-low.cc (lynx_target_ops): Update.
48 * nto-low.cc (nto_target_ops): Update.
49 (nto_process_target::supports_read_auxv): Define.
50 (nto_read_auxv): Turn into ...
51 (nto_process_target::read_auxv): ... this.
52 * nto-low.h (class nto_process_target): Update.
53 * win32-low.cc (win32_target_ops): Update.
55 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
57 Turn process_stratum_target's request_interrupt op into a method of
60 * target.h (struct process_stratum_target): Remove the target op.
61 (class process_target): Add the target op.
63 Update the derived classes and callers below.
65 * remote-utils.cc (putpkt_binary_1): Update.
66 (input_interrupt): Update.
68 * server.cc (handle_v_requests): Update.
69 * linux-low.cc (linux_target_ops): Update.
70 (linux_request_interrupt): Turn into ...
71 (linux_process_target::request_interrupt): ... this.
72 * linux-low.h (class linux_process_target): Update.
73 * lynx-low.cc (lynx_target_ops): Update.
74 (lynx_request_interrupt): Turn into ...
75 (lynx_process_target::request_interrupt): ... this.
76 * lynx-low.h (class lynx_process_target): Update.
77 * nto-low.cc (nto_target_ops): Update.
78 (nto_request_interrupt): Turn into ...
79 (nto_process_target::request_interrupt): ... this.
80 * nto-low.h (class nto_process_target): Update.
81 * win32-low.cc (win32_target_ops): Update.
82 (win32_request_interrupt): Turn into ...
83 (win32_process_target::request_interrupt): ... this.
84 * win32-low.h (class win32_process_target): Update.
86 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
88 Turn process_stratum_target's look_up_symbols op into a method of
91 * target.h (struct process_stratum_target): Remove the target op.
92 (class process_target): Add the target op.
93 * target.cc (process_target::look_up_symbols): Define.
95 Update the derived classes and callers below.
97 * server.cc (handle_query): Update.
98 * linux-low.cc (linux_target_ops): Update.
99 (linux_look_up_symbols): Turn into ...
100 (linux_process_target::look_up_symbols): ... this.
101 * linux-low.h (class linux_process_target): Update.
102 * lynx-low.cc (lynx_target_ops): Update.
103 * nto-low.cc (nto_target_ops): Update.
104 * win32-low.cc (win32_target_ops): Update.
106 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
108 Turn process_stratum_target's read_memory and write_memory
109 ops into methods of process_target.
111 * target.h (struct process_stratum_target): Remove the target ops.
112 (class process_target): Add the target ops.
114 Update the derived classes and callers below.
116 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
117 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
118 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
119 (arm_get_syscall_trapinfo): Update.
120 * linux-cris-low.cc (cris_breakpoint_at): Update.
121 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
122 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
123 * linux-mips-low.cc (mips_breakpoint_at): Update.
124 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
125 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
126 * linux-sh-low.cc (sh_breakpoint_at): Update.
127 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
128 (sparc_store_gregset_from_stack): Update.
129 (sparc_breakpoint_at): Update.
130 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
131 * linux-tile-low.cc (tile_breakpoint_at): Update.
132 * linux-x86-low.cc (x86_breakpoint_at): Update.
133 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
134 * mem-brea.cc (insert_memory_breakpoint): Update.
135 (validate_inserted_breakpoint): Update.
136 * target.cc (read_inferior_memory): Update.
137 (target_write_memory): Update.
138 * linux-low.cc (linux_target_ops): Update.
139 (linux_read_memory): Make a wrapper around the read_memory target
141 (linux_process_target::read_memory): Rename from linux_read_memory.
142 (linux_write_memory): Turn into ...
143 (linux_process_target::write_memory): ... this.
144 * linux-low.h (class linux_process_target): Update.
145 * lynx-low.cc (lynx_target_ops): Update.
146 (lynx_read_memory): Turn into ...
147 (lynx_process_target::read_memory): ... this.
148 (lynx_write_memory): Turn into ...
149 (lynx_process_target::write_memory): ... this.
150 * lynx-low.h (class lynx_process_target): Update.
151 * nto-low.cc (nto_target_ops): Update.
152 (nto_read_memory): Turn into ...
153 (nto_process_target::read_memory): ... this.
154 (nto_write_memory): Turn into ...
155 (nto_process_target::write_memory): ... this.
156 * nto-low.h (class nto_process_target): Update.
157 * win32-low.cc (win32_target_ops): Update.
158 (win32_read_inferior_memory): Turn into ...
159 (win32_process_target::read_memory): ... this.
160 (win32_write_inferior_memory): Turn into ...
161 (win32_process_target::write_memory): ... this.
162 * win32-low.h (class win32_process_target): Update.
164 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
166 Turn process_stratum_target's prepare_to_access_memory and
167 done_accessing_memory ops into methods of process_target.
169 * target.h (struct process_stratum_target): Remove the target ops.
170 (class process_target): Add the target ops.
171 * target.cc (process_target::prepare_to_access_memory): Define.
172 (process_target::done_accessing_memory): Define.
173 (prepare_to_access_memory): Update.
174 (done_accessing_memory): Update.
176 Update the derived classes and callers below.
178 * linux-low.cc (linux_target_ops): Update.
179 (linux_prepare_to_access_memory): Turn into ...
180 (linux_process_target::prepare_to_access_memory): ... this.
181 (linux_done_accessing_memory): Turn into ...
182 (linux_process_target::done_accessing_memory): ... this.
183 * linux-low.h (class linux_process_target): Update.
184 * lynx-low.cc (lynx_target_ops): Update.
185 * nto-low.cc (nto_target_ops): Update.
186 * win32-low.cc (win32_target_ops): Update.
188 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
190 Turn process_stratum_target's fetch_registers and store_registers
191 ops into methods of process_target.
193 * target.h (struct process_stratum_target): Remove the target ops.
194 (class process_target): Add the target ops.
195 (fetch_inferior_registers): Update the macro.
196 (store_inferior_registers): Update the macro.
198 Update the derived classes and callers below.
200 * linux-low.cc (linux_target_ops): Update.
201 (linux_fetch_registers): Turn into ...
202 (linux_process_target::fetch_registers): ... this.
203 (linux_store_registers): Turn into ...
204 (linux_process_target::store_registers): ... this.
205 * linux-low.h (class linux_process_target): Update.
206 * lynx-low.cc (lynx_target_ops): Update.
207 (lynx_fetch_registers): Turn into ...
208 (lynx_process_target::fetch_registers): ... this.
209 (lynx_store_registers): Turn into ...
210 (lynx_process_target::store_registers): ... this.
211 * lynx-low.h (class lynx_process_target): Update.
212 * nto-low.cc (nto_target_ops): Update.
213 (nto_fetch_registers): Turn into ...
214 (nto_process_target::fetch_registers): ... this.
215 (nto_store_registers): Turn into ...
216 (nto_process_target::store_registers): ... this.
217 * nto-low.h (class nto_process_target): Update.
218 * win32-low.cc (win32_target_ops): Update.
219 (win32_fetch_inferior_registers): Turn into ...
220 (win32_process_target::fetch_registers): ... this.
221 (win32_store_inferior_registers): Turn into ...
222 (win32_process_target::store_registers): ... this.
223 * win32-low.h (class win32_process_target): Update.
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
227 Turn process_stratum_target's wait op into a method of
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op.
233 Update the derived classes and callers below.
235 * target.cc (target_wait): Update.
236 * linux-low.cc (linux_target_ops): Update.
237 (linux_wait): Turn into ...
238 (linux_process_target::wait): ... this.
239 * linux-low.h (class linux_process_target): Update.
240 * lynx-low.cc (lynx_target_ops): Update.
241 (lynx_wait): Turn into ...
242 (lynx_process_target::wait): ... this.
243 * lynx-low.h (class lynx_process_target): Update.
244 * nto-low.cc (nto_target_ops): Update.
245 (nto_wait): Turn into ...
246 (nto_process_target::wait): ... this.
247 * nto-low.h (class nto_process_target): Update.
248 * win32-low.cc (win32_target_ops): Update.
249 (win32_wait): Turn into ...
250 (win32_process_target::wait): ... this.
251 (do_initial_child_stuff): Update.
252 * win32-low.h (class win32_process_target): Update.
254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
256 Turn process_stratum_target's resume op into a method of
259 * target.h (struct process_stratum_target): Remove the target op.
260 (class process_target): Add the target op.
262 Update the derived classes and callers below.
264 * server.cc (resume): Update.
265 * target.cc (target_stop_and_wait): Update.
266 (target_continue_no_signal): Update.
267 (target_continue): Update.
268 * linux-low.cc (linux_target_ops): Update.
269 (linux_resume): Turn into ...
270 (linux_process_target::resume): ... this.
271 * linux-low.h (class linux_process_target): Update.
272 * lynx-low.cc (lynx_target_ops): Update.
273 (lynx_resume): Turn into ...
274 (lynx_process_target::resume): ... this.
275 * lynx-low.h (class lynx_process_target): Update.
276 * nto-low.cc (nto_target_ops): Update.
277 (nto_resume): Turn into ...
278 (nto_process_target::resume): ... this.
279 * nto-low.h (class nto_process_target): Update.
280 * win32-low.cc (win32_target_ops): Update.
281 (win32_resume): Turn into ...
282 (win32_process_target::resume): ... this.
283 (win32_process_target::detach): Update.
284 (do_initial_child_stuff): Update.
285 * win32-low.h (class win32_process_target): Update.
287 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
289 Turn process_stratum_target's thread_alive op into a method of
292 * target.h (struct process_stratum_target): Remove the target op.
293 (class process_target): Add the target op.
294 (mythread_alive): Update the macro.
296 Update the derived classes and callers below.
298 * linux-low.cc (linux_target_ops): Update.
299 (linux_thread_alive): Turn into ...
300 (linux_process_target::thread_alive): ... this.
301 (wait_for_sigstop): Update.
302 * linux-low.h (class linux_process_target): Update.
303 * lynx-low.cc (lynx_target_ops): Update.
304 (lynx_thread_alive): Turn into ...
305 (lynx_process_target::thread_alive): ... this.
306 * lynx-low.h (class lynx_process_target): Update.
307 * nto-low.cc (nto_target_ops): Update.
308 (nto_thread_alive): Turn into ...
309 (nto_process_target::thread_alive): ... this.
310 * nto-low.h (class nto_process_target): Update.
311 * win32-low.cc (win32_target_ops): Update.
312 (win32_thread_alive): Turn into ...
313 (win32_process_target::thread_alive): ... this.
314 * win32-low.h (class win32_process_target): Update.
316 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
318 Turn process_stratum_target's join op into a method of
321 * target.h (struct process_stratum_target): Remove the target op.
322 (class process_target): Add the target op.
323 (join_inferior): Update the macro.
325 Update the derived classes and callers below.
327 * linux-low.cc (linux_target_ops): Update.
328 (linux_join): Turn into ...
329 (linux_process_target::join): ... this.
330 * linux-low.h (class linux_process_target): Update.
331 * lynx-low.cc (lynx_target_ops): Update.
332 (lynx_join): Turn into ...
333 (lynx_process_target::join): ... this.
334 * lynx-low.h (class lynx_process_target): Update.
335 * nto-low.cc (nto_target_ops): Update.
336 (nto_process_target::join): Define.
337 * nto-low.h (class nto_process_target): Update.
338 * win32-low.cc (win32_target_ops): Update.
339 (win32_join): Turn into ...
340 (win32_process_target::join): ... this.
341 * win32-low.h (class win32_process_target): Update.
343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
345 Turn process_stratum_target's mourn op into a method of
348 * target.h (struct process_stratum_target): Remove the target op.
349 (class process_target): Add the target op.
351 Update the derived classes and callers below.
353 * target.cc (target_mourn_inferior): Update.
354 * linux-low.cc (linux_target_ops): Update.
355 (linux_mourn): Turn into ...
356 (linux_process_target::mourn): ... this.
357 (handle_extended_wait): Update.
358 (linux_process_target::kill): Update.
359 (linux_process_target::detach): Update.
360 * linux-low.h (class linux_process_target): Update.
361 * lynx-low.cc (lynx_target_ops): Update.
362 (lynx_mourn): Turn into ...
363 (lynx_process_target::mourn): ... this.
364 * lynx-low.h (class lynx_process_target): Update.
365 * nto-low.cc (nto_target_ops): Update.
366 (nto_mourn): Turn into ...
367 (nto_process_target::mourn): ... this.
368 * nto-low.h (class nto_process_target): Update.
369 * win32-low.cc (win32_target_ops): Update.
370 (win32_mourn): Turn into ...
371 (win32_process_target::mourn): ... this.
372 * win32-low.h (class win32_process_target): Update.
374 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
376 Turn process_stratum_target's detach op into a method of
379 * target.h (struct process_stratum_target): Remove the target op.
380 (class process_target): Add the target op.
381 (detach_inferior): Update the macro.
383 Update the derived classes and callers below.
385 * linux-low.cc (linux_target_ops): Update.
386 (linux_detach): Turn into ...
387 (linux_process_target::detach): ... this.
388 * linux-low.h (class linux_process_target): Update.
389 * lynx-low.cc (lynx_target_ops): Update.
390 (lynx_detach): Turn into ...
391 (lynx_process_target::detach): ... this.
392 * lynx-low.h (class lynx_process_target): Update.
393 * nto-low.cc (nto_target_ops): Update.
394 (nto_detach): Turn into ...
395 (nto_process_target::detach): ... this.
396 * nto-low.h (class nto_process_target): Update.
397 * win32-low.cc (win32_target_ops): Update.
398 (win32_detach): Turn into ...
399 (win32_process_target::detach): ... this.
400 * win32-low.h (class win32_process_target): Update.
402 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
404 Turn process_stratum_target's kill op into a method of
407 * target.h (struct process_stratum_target): Remove the target op.
408 (class process_target): Add the target op.
410 Update the derived classes and callers below.
412 * target.cc (kill_inferior): Update.
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_kill): Turn into ...
415 (linux_process_target::kill): ... this.
416 * linux-low.h (class linux_process_target): Update.
417 * lynx-low.cc (lynx_target_ops): Update.
418 (lynx_kill): Turn into ...
419 (lynx_process_target::kill): ... this.
420 * lynx-low.h (class lynx_process_target): Update.
421 * nto-low.cc (nto_target_ops): Update.
422 (nto_kill): Turn into ...
423 (nto_process_target::kill): ... this.
424 * nto-low.h (class nto_process_target): Update.
425 * win32-low.cc (win32_target_ops): Update.
426 (win32_kill): Turn into ...
427 (win32_process_target::kill): ... this.
428 * win32-low.h (class win32_process_target): Update.
430 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
432 Turn process_stratum_target's attach op into a method of
435 * target.h (struct process_stratum_target): Remove the target op.
436 (class process_target): Add the target op.
437 (myattach): Update the macro.
439 Update the derived classes and callers below.
441 * linux-low.cc (linux_target_ops): Update.
442 (linux_attach): Turn into ...
443 (linux_process_target::attach): ... this.
444 * linux-low.h (class linux_process_target): Update.
445 * lynx-low.cc (lynx_target_ops): Update.
446 (lynx_attach): Turn into ...
447 (lynx_process_target::attach): ... this.
448 * lynx-low.h (class lynx_process_target): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 (nto_attach): Turn into ...
451 (nto_process_target::attach): ... this.
452 * nto-low.h (class nto_process_target): Update.
453 * win32-low.cc (win32_target_ops): Update.
454 (win32_attach): Turn into ...
455 (win32_process_target::attach): ... this.
456 * win32-low.h (class win32_process_target): Update.
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460 Turn process_stratum_target's post_create_inferior op into a method
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op.
465 (target_post_create_inferior): Update the macro.
466 * target.cc (process_target::post_create_inferior): Define.
468 Update the derived classes and callers below.
470 * linux-low.cc (linux_target_ops): Update.
471 (linux_post_create_inferior): Turn into ...
472 (linux_process_target::post_create_inferior): ... this.
473 * linux-low.h (class linux_process_target): Update.
474 * lynx-low.cc (lynx_target_ops): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 * win32-low.cc (win32_target_ops): Update.
478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
480 Turn process_stratum_target's create_inferior op into a method of
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op.
485 (create_inferior): Rename the macro to ...
486 (target_create_inferior): ... this.
488 Update the derived classes and callers below.
490 * server.cc (handle_v_run): Update.
491 (captured_main): Update.
492 (process_serial_event): Update.
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_create_inferior): Turn into ...
495 (linux_process_target::create_inferior): ... this.
496 * linux-low.h (class linux_process_target): Update.
497 * lynx-low.cc (lynx_target_ops): Update.
498 (lynx_create_inferior): Turn into ...
499 (lynx_process_target::create_inferior): ... this.
500 * lynx-low.h (class lynx_process_target): Update.
501 * nto-low.cc (nto_target_ops): Update.
502 (nto_create_inferior): Turn into ...
503 (nto_process_target::create_inferior): ... this.
504 * nto-low.h (class nto_process_target): Update.
505 * win32-low.cc (win32_target_ops): Update.
506 (win32_create_inferior): Turn into ...
507 (win32_process_target::create_inferior): ... this.
508 * win32-low.h (class win32_process_target): Update.
510 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
512 * target.h (class process_target): New class definition.
513 (struct process_stratum_target) <pt>: New field with type
515 * linux-low.h (class linux_process_target): Define as a derived
516 class of 'process_target'.
517 * linux-low.cc (linux_target_ops): Add a linux_process_target*
519 * lynx-low.h (class lynx_process_target): Define as a derived
520 class of 'process_target'.
521 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
523 * nto-low.h (class nto_process_target): Define as a derived
524 class of 'process_target'.
525 * nto-low.cc (nto_target_ops): Add an nto_process_target*
527 * win32-low.h (class win32_process_target): Define as a derived
528 class of 'process_target'.
529 * win32-low.cc (win32_target_ops): Add a win32_process_target*
532 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
534 * configure: Regenerate.
536 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
537 Andrew Burgess <andrew.burgess@embecosm.com>
539 * linux-riscv-low.cc: New file.
540 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
541 and nat/riscv-linux-tdesc.c.
542 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
543 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
546 2020-02-14 Tom Tromey <tom@tromey.com>
548 * acinclude.m4: Don't include acx_configure_dir.m4.
549 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
550 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
551 (all, install-only, uninstall, clean-info, clean)
552 (maintainer-clean): Don't recurse.
553 (subdir_do, all-lib): Remove.
554 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
556 (generated_files): Update.
557 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
558 * configure: Rebuild.
559 * configure.ac: Don't configure gnulib or libiberty.
562 2020-02-14 Eli Zaretskii <eliz@gnu.org>
564 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
565 preparing the command line for CreateProcess.
566 (win32_create_inferior): Reflect the program name in debugging
567 output that shows the process and its command line.
569 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
571 * Makefile.in: Rename source files from .c to .cc.
572 * %.c: Rename to %.cc.
573 * configure.ac: Rename server.c to server.cc.
574 * configure: Re-generate.
576 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
578 * Makefile.in: Rename gdbsupport source files from .c to .cc.
580 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
582 * win32-low.c (win32_create_inferior): Set signal_pid.
584 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
585 Pedro Alves <palves@redhat.com>
587 Skip building gdbserver in a cross-configuration.
588 * configure.srv: Set $gdbserver_host depending on whether $target
589 is $host. Use $gdbserver_host instead of $host.
591 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
593 * configure: Re-generate.
595 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
597 * configure: Re-generate.
599 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
601 * acinclude.m4: Update warning.m4 path.
603 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
605 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
606 (handle_exception): Set siginfo_er.
607 (win32_xfer_siginfo): New function.
609 2020-02-07 Tom Tromey <tom@tromey.com>
610 Pedro Alves <palves@redhat.com>
612 * README: Update build documentation.
613 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
615 * configure.ac: Update paths.
616 * configure: Rebuild.
617 * acinclude.m4: Update paths.
618 * Makefile.in: Update include paths.
619 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
620 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
621 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
622 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
623 (%-generated.c): Update paths.
624 * Move entire directory from ../gdb/gdbserver.
626 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
628 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
630 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
632 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
633 assignment instead of srv_linux_obj.
635 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
637 * server.c (handle_qxfer_libraries): Write segment-address with
640 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
642 * Makefile.in (install-strip): New target.
643 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
644 * aclocal.m4: Regenerate.
645 * configure: Regenerate.
646 * configure.ac: Add AM_PROG_INSTALL_STRIP.
648 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
650 * Makefile.in (SFILES): Adjust paths to point to real files.
651 (OBS): Move waitstatus.o to target/waitstatus.o.
652 (TAGS): Transform paths appropriately.
654 (nat/%.o): ... this pattern rule.
656 (target/%.o): ... this pattern rule.
657 * configure.srv: Adjust paths throughout to include nat/ prefix
658 with the revant files.
659 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
660 * configure: Regenerate.
662 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
664 * Makefile.in (TAGS): Remove config files from the recipe.
666 2020-01-14 Tom Tromey <tom@tromey.com>
668 * configure: Rebuild.
669 * configure.ac: Remove any checks that were added to common.m4.
670 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
673 2020-01-14 Tom Tromey <tom@tromey.com>
675 * server.h: Include config.h.
676 * gdbreplay.c: Include config.h.
677 * configure: Rebuild.
678 * configure.ac: Don't source common.host.
679 * acinclude.m4: Update path.
680 * Makefile.in (INCSUPPORT): New variable.
681 (INCLUDE_CFLAGS): Add INCSUPPORT.
682 (SFILES): Update paths.
683 (version-generated.c): Update path to create-version.sh.
684 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
686 2020-01-14 Tom Tromey <tom@tromey.com>
688 * configure.ac (LIBS): Use WIN32APILIBS.
689 (USE_WIN32API): Don't define.
690 * configure: Rebuild.
692 2020-01-14 Tom Tromey <tom@tromey.com>
694 * configure: Rebuild.
696 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
698 * Makefile.in (%-generated.c): Remove rule for files from
701 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
703 * configure: Re-generate.
705 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
707 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
709 * tracepoint.c (stop_tracing, flush_trace_buffer,
710 about_to_request_buffer_space, get_trace_state_variable_value,
711 set_trace_state_variable_value, gdb_collect): Add declaration.
713 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
715 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
716 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
717 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
718 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
719 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
722 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
724 * inferiors.c: Include gdbsupport/common-inferior.h.
726 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
728 * hostio-errno.c: Include hostio.h.
730 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
732 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
735 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
737 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
738 * linux-arm-tdesc.h: Include arch/arm.h.
740 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
742 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
744 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
746 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
747 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
749 2020-01-10 Pedro Alves <palves@redhat.com>
751 * fork-child.c (post_fork_inferior): Pass target down to
753 * inferiors.c (switch_to_thread): Add process_stratum_target
755 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
756 * nto-low.c (nto_target_ops): Now a process_stratum_target.
757 * linux-low.c (linux_target_ops): Now a process_stratum_target.
758 * remote-utils.c (prepare_resume_reply): Pass the target to
760 * target.c (the_target): Now a process_stratum_target.
761 (done_accessing_memory): Pass the target to switch_to_thread.
762 (set_target_ops): Ajust to use process_stratum_target.
763 * target.h (struct target_ops): Rename to ...
764 (struct process_stratum_target): ... this.
765 (the_target, set_target_ops): Adjust.
766 (prepare_to_access_memory): Adjust comment.
767 * win32-low.c (child_xfer_memory): Adjust to use
768 process_stratum_target.
769 (win32_target_ops): Now a process_stratum_target.
771 2020-01-06 Eli Zaretskii <eliz@gnu.org>
772 Pedro Alves <palves@redhat.com>
774 * win32-low.c (get_child_debug_event): Extract the fatal exception
775 from the exit status and convert to the equivalent Posix signal
777 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
778 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
780 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
782 * Makefile.in: Use INSTALL_PROGRAM_ENV.
784 2020-01-01 Joel Brobecker <brobecker@adacore.com>
786 * server.c (gdbserver_version): Change copyright year to 2020.
787 * gdbreplay.c (gdbreplay_version): Likewise.
789 2019-12-19 Christian Biesinger <cbiesinger@google.com>
791 * configure: Regenerate.
792 * configure.ac: Quote variable arguments of test.
794 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
796 * Makefile.in: Fix build with GNU Make 3.81
798 2019-12-16 Tom Tromey <tromey@adacore.com>
800 * server.c (get_exec_file): Constify result.
802 2019-12-10 Christian Biesinger <cbiesinger@google.com>
804 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
805 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
806 * config.in: Regenerate.
807 * configure: Regenerate.
808 * configure.ac: Don't check for strerror.
809 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
810 Call safe_strerror instead of strerror.
811 * server.h (strerror): Remove this now-unnecessary declaration.
812 * tracepoint.c (init_named_socket): Call safe_strerror instead of
814 (gdb_agent_helper_thread): Likewise.
815 * utils.c (perror_with_name): Likewise.
817 2019-11-26 Tom Tromey <tom@tromey.com>
819 * configure, config.in: Rebuild.
821 2019-11-26 Tom Tromey <tom@tromey.com>
823 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
824 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
826 * configure, config.in: Rebuild.
828 2019-11-26 Tom Tromey <tom@tromey.com>
830 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
831 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
832 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
833 * acinclude.m4: Include ax_pthread.m4.
834 * config.in, configure: Rebuild.
836 2019-11-26 Christian Biesinger <cbiesinger@google.com>
838 * debug.c (debug_set_output): Call safe_strerror instead of
840 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
841 (linux_kill_one_lwp): Likewise.
842 (linux_detach_one_lwp): Likewise.
843 (linux_wait_for_event_filtered): Likewise.
844 (store_register): Likewise.
845 * lynx-low.c (lynx_attach): Likewise.
846 * mem-break.c (insert_memory_breakpoint): Likewise.
847 (remove_memory_breakpoint): Likewise.
848 (delete_fast_tracepoint_jump): Likewise.
849 (set_fast_tracepoint_jump): Likewise.
850 (uninsert_fast_tracepoint_jumps_at): Likewise.
851 (reinsert_fast_tracepoint_jumps_at): Likewise.
852 * nto-low.c (nto_xfer_memory): Likewise.
853 (nto_resume): Likewise.
855 2019-11-20 Luis Machado <luis.machado@linaro.org>
857 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
858 instead of register count.
859 * tdesc.c (tdesc_contains_feature): New function.
860 * tdesc.h (tdesc_contains_feature): New prototype.
862 2019-11-15 Christian Biesinger <cbiesinger@google.com>
864 * Makefile.in: Add safe-strerror.c.
865 * configure: Regenerate.
866 * configure.ac: Don't source common.host.
868 2019-11-15 Christian Biesinger <cbiesinger@google.com>
870 * config.in: Regenerate.
871 * configure: Regenerate.
873 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
875 * ax.c (ax_printf): Handle size_t_arg.
877 2019-11-06 Christian Biesinger <cbiesinger@google.com>
879 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
880 * mi/mi-main.c (output_cores): Likewise.
881 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
882 (linux_xfer_osdata_modules): Likewise.
883 * remote.c (register_remote_support_xml): Likewise.
884 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
885 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
887 2019-11-01 Christian Biesinger <cbiesinger@google.com>
889 * configure: Regenerate.
890 * configure.ac: Remove check for strerror_r.
892 2019-10-31 Christian Biesinger <cbiesinger@google.com>
894 * config.in: Regenerate.
895 * configure: Regenerate.
896 * configure.ac: Also check for strerror_r.
898 2019-10-31 Christian Biesinger <cbiesinger@google.com>
900 * ax.h (debug_agent): Remove duplicate declaration.
902 2019-10-26 Tom de Vries <tdevries@suse.de>
904 * linux-aarch64-low.c: Fix typos in comments.
905 * linux-arm-low.c: Same.
907 * linux-ppc-low.c: Same.
908 * proc-service.c: Same.
911 * tracepoint.c: Same.
914 2019-10-25 Tom Tromey <tromey@adacore.com>
916 * utils.c (xstrdup): Remove.
918 2019-10-23 Tom Tromey <tom@tromey.com>
920 * configure, config.in: Rebuild.
922 2019-10-23 Tom Tromey <tom@tromey.com>
924 * configure: Rebuild.
925 * acinclude.m4: Use m4_include, not sinclude.
927 2019-10-17 Tom Tromey <tromey@adacore.com>
929 * configure: Rebuild.
930 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
931 in AC_CONFIG_FILES invocation.
932 * Makefile.in (stamp-h, Makefile): Use new-style config.status
935 2019-10-16 Christian Biesinger <cbiesinger@google.com>
937 * server.c: Include xml-builtin.h.
938 (get_xml_features): Don't declare xml_builtins here.
940 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
942 * Makefile.in: Remove references to vec-ipa.o.
944 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
946 * Makefile.in: Remove references to vec.c.
948 2019-10-02 Christian Biesinger <cbiesinger@google.com>
950 * server.c (server_waiting): Change to bool.
951 (extended_protocol): Likewise.
952 (response_needed): Likewise.
953 (exit_requested): Likewise.
954 (run_once): Likewise.
955 (report_no_resumed): Likewise.
956 (non_stop): Likewise.
957 (disable_packet_vCont): Likewise.
958 (disable_packet_Tthread): Likewise.
959 (disable_packet_qC): Likewise.
960 (disable_packet_qfThreadInfo): Likewise.
961 (handle_general_set): Update.
962 (handle_detach): Update.
963 (handle_monitor_command): Update.
964 (handle_query): Update.
965 (captured_main): Update.
966 (process_serial_event): Update.
967 * server.h (server_waiting): Change to bool.
968 (disable_packet_vCont): Likewise.
969 (disable_packet_Tthread): Likewise.
970 (disable_packet_qC): Likewise.
971 (disable_packet_qfThreadInfo): Likewise.
972 (run_once): Likewise.
973 (non_stop): Likewise.
974 * target.c (target_stop_and_wait): Update.
976 2019-10-02 Tom Tromey <tromey@adacore.com>
978 * Makefile.in (SFILES): Add common-inferior.c.
979 (OBS): Add common-inferior.o.
980 * server.c (startup_with_shell): Don't define.
982 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
984 * linux-low.c (linux_low_read_btrace): Update for change to
987 2019-09-20 Christian Biesinger <cbiesinger@google.com>
989 * debug.c (debug_threads): Remove comment in favor of the header.
990 * debug.h (using_threads): Add declaration.
991 (debug_threads): Add comment.
992 * linux-aarch64-low.c: Include debug.h and remove declaration of
994 * nto-low.c: Likewise.
995 * remote-utils.c: Likewise.
996 * thread-db.c: Likewise.
998 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1000 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1001 and powerpc-cell64l-ipa.o.
1002 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1003 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1004 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1007 * spu-low.c: Remove file.
1009 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1010 (parse_spufs_run): Remove.
1011 (ppc_get_pc): Remove Cell/B.E. support.
1012 (ppc_set_pc): Likewise.
1013 (ppc_breakpoint_at): Likewise.
1014 (ppc_arch_setup): Likewise.
1015 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1016 tdesc_powerpc_cell32l.
1017 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1018 or init_registers_powerpc_cell32l.
1019 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1020 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1021 or init_registers_powerpc_cell32l.
1022 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1023 (init_registers_powerpc_cell32l): Remove prototype.
1024 (init_registers_powerpc_cell64l): Likewise.
1026 * target.h (struct target_ops): Remove qxfer_spu member.
1027 * server.c (handle_qxfer_spu): Remove.
1028 (qxfer_packets): Remove entry for "spu".
1029 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1030 * linux-low.c (SPUFS_MAGIC): Remove.
1031 (spu_enumerate_spu_ids): Remove.
1032 (linux_qxfer_spu): Remove.
1033 (linux_target_ops): Remove qxfer_spu member.
1034 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1035 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1036 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1038 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1040 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1041 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1042 * config.in: Regenerate.
1043 * configure: Regenerate.
1045 2019-08-15 Tom Tromey <tromey@adacore.com>
1047 * target.c (target_write_memory): Use gdb::byte_vector.
1049 2019-08-15 Tom Tromey <tromey@adacore.com>
1051 * tracepoint.c (write_inferior_data_pointer)
1052 (write_inferior_integer, write_inferior_int8)
1053 (write_inferior_uinteger, m_tracepoint_action_download)
1054 (r_tracepoint_action_download, x_tracepoint_action_download)
1055 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1056 (download_agent_expr, download_tracepoint_1)
1057 (download_trace_state_variables, upload_fast_traceframes): Update.
1058 * server.c (gdb_write_memory): Update.
1059 * remote-utils.c (relocate_instruction): Update.
1060 * proc-service.c (ps_pdwrite): Update.
1061 * mem-break.c (remove_memory_breakpoint)
1062 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1063 (uninsert_fast_tracepoint_jumps_at)
1064 (reinsert_fast_tracepoint_jumps_at): Update.
1065 * linux-x86-low.c (append_insns)
1066 (i386_install_fast_tracepoint_jump_pad)
1067 (amd64_write_goto_address, i386_write_goto_address): Update.
1068 * linux-s390-low.c (append_insns, s390_write_goto_address):
1070 * linux-ppc-low.c (ppc_relocate_instruction)
1071 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1072 (ppc_write_goto_address): Update.
1073 * linux-aarch64-low.c (append_insns): Update.
1074 * target.h (struct target_ops): Update.
1075 (write_inferior_memory): Don't declare.
1076 * target.c (target_write_memory): Rename from
1077 write_inferior_memory. Remove old target_write_memory.
1079 2019-08-15 Tom Tromey <tromey@adacore.com>
1081 * target.c (write_inferior_memory): Use std::vector.
1083 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1086 * configure.ac: Drop enable-libmcheck support.
1087 * configure, config.in: Rebuild.
1088 * acinclude.m4: Don't include it.
1090 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1092 * configure.srv: Remove Arm xml files.
1094 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1096 * configure.srv: Add new files. Remove xml generated files.
1097 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1099 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1100 * linux-aarch32-tdesc.c: New file.
1101 * linux-aarch32-tdesc.h: New file.
1102 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1103 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1104 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1105 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1106 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1107 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1108 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1109 (arm_read_description): Call arm_linux_read_description.
1110 (initialize_low_arch): Don't init registers.
1111 * linux-arm-tdesc.c: New file.
1112 * linux-arm-tdesc.h: New file.
1114 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1116 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1117 Move counter inside for.
1118 (arm_read_description): Check ptrace earlier.
1119 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1121 2019-07-09 Tom Tromey <tom@tromey.com>
1123 * configure: Rebuild.
1124 * configure.ac: Change common to gdbsupport.
1125 * acinclude.m4: Change common to gdbsupport.
1126 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1127 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1128 common to gdbsupport.
1129 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1130 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1131 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1132 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1133 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1134 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1135 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1136 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1137 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1138 common to gdbsupport.
1140 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1142 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1144 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1146 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1148 * configure.srv: Remove legacy xml.
1149 * linux-aarch64-low.c (initialize_low_arch): Remove
1150 initialize_low_tdesc call.
1151 * linux-aarch64-tdesc-selftest.c: Remove file.
1152 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1153 * linux-x86-low.c (initialize_low_arch): Remove
1154 initialize_low_tdesc call.
1155 * linux-x86-tdesc-selftest.c: Remove file.
1156 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1158 2019-06-20 Tom de Vries <tdevries@suse.de>
1160 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1161 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1163 2019-06-19 Tom de Vries <tdevries@suse.de>
1165 * debug.h (debug_write): Change return type to ssize_t.
1166 * debug.c (debug_write): Same.
1168 2019-06-14 Tom Tromey <tom@tromey.com>
1170 * configure.ac: Use new path to gnulib.
1171 * configure: Rebuild.
1172 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1175 2019-06-11 Tom Tromey <tom@tromey.com>
1177 * Makefile.in (SFILES): Add alloc.c.
1179 (IPA_OBJS): Add alloc-ipa.o.
1180 (alloc-ipa.o): New target.
1181 (%.o: ../%.c): New pattern rule.
1183 2019-06-10 Tom Tromey <tromey@adacore.com>
1185 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1186 end warning with a newline.
1187 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1189 * thread-db.c (attach_thread): Don't end warning with a newline.
1190 (thread_db_notice_clone): Likewise.
1191 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1193 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1194 end warning with a newline.
1196 2019-06-04 Pedro Alves <palves@redhat.com>
1198 * server.c (captured_main): Use make_unique_xstrdup.
1200 2019-06-02 Tom Tromey <tom@tromey.com>
1202 * gdbreplay.c (fromhex): Remove.
1203 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1205 2019-05-29 Tom Tromey <tromey@adacore.com>
1207 * configure: Rebuild.
1209 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1211 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1212 sign extension code on 32-bit builds.
1214 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1217 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1219 2019-04-19 Tom Tromey <tom@tromey.com>
1221 * server.c (struct vstop_notif): Derive from notif_event.
1223 (queue_stop_reply): Update.
1224 (remove_all_on_match_ptid): Change type. Rewrite.
1225 (discard_queued_stop_replies): Rewrite.
1226 (in_queued_stop_replies_ptid): Change type.
1227 (in_queued_stop_replies): Rewrite.
1228 (notif_stop): Update.
1229 (queue_stop_reply_callback): Update.
1230 (captured_main): Don't call initialize_notif.
1231 (push_stop_notification): Update.
1232 * notif.c (notif_write_event, handle_notif_ack)
1233 (notif_event_enque, notif_push): Update.
1234 (notif_event_xfree, initialize_notif): Remove.
1235 * notif.h (struct notif_event): Include <list>, not
1237 (struct notif_server) <queue>: Now a std::list.
1238 (notif_event_p): Remove typedef.
1239 (initialize_notif): Don't declare.
1240 (struct notif_event): Add virtual destructor.
1242 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1244 * ax.c (ax_vdebug): Call debug_printf.
1245 * debug.c (debug_write): New function.
1246 * debug.h (debug_write): New declaration.
1247 * linux-low.c (sigchld_handler): Call debug_write.
1249 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1251 * debug.c (debug_set_output): New function.
1252 (debug_vprintf): Send output to debug_file.
1253 (debug_flush): Likewise.
1254 * debug.h (debug_set_output): New declaration.
1255 * server.c (handle_monitor_command): Add debug-file option.
1256 (captured_main): Likewise.
1258 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1260 * debug.c (remote_debug): Add definition.
1261 * debug.h (remote_debug): Add declaration.
1262 * hostio.c (remote_debug): Remove declaration.
1263 * remote-utils.c (struct ui_file): Likewise.
1264 (remote_debug): Likewise.
1265 * remote-utils.h (remote_debug): Likewise,
1266 * server.c (remote_debug): Remove definition.
1268 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1270 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1271 when using a 64-bit gdbserver.
1273 2019-04-09 Tom Tromey <tromey@adacore.com>
1275 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1277 2019-04-08 Tom Tromey <tom@tromey.com>
1279 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1281 (linux_resume_one_lwp): Likewise.
1283 2019-04-08 Tom Tromey <tom@tromey.com>
1285 * gdbreplay.c: Update.
1286 * linux-low.c: Update.
1289 2019-04-08 Tom Tromey <tom@tromey.com>
1291 * server.c: Use C++ exception handling.
1292 * linux-low.c: Use C++ exception handling.
1293 * gdbreplay.c: Use C++ exception handling.
1295 2019-04-08 Tom Tromey <tom@tromey.com>
1297 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1298 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1299 (captured_main, main): Update.
1300 * gdbreplay.c (main): Update.
1302 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1304 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1305 value in argument pointer, return 1 if the entry is found and 0
1306 otherwise. Move comment.
1307 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1308 * linux-low.h (linux_get_auxv): Declare.
1309 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1311 2019-04-05 Tom Tromey <tromey@adacore.com>
1313 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1316 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1318 * linux-low.c (AT_HWCAP2): Add define if not already included.
1320 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1322 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1323 (aarch64_arch_setup): Call linux_get_hwcap.
1324 * linux-arm-low.c (arm_get_hwcap): Remove function.
1325 (arm_read_description): Call linux_get_hwcap.
1326 * linux-low.c (linux_get_auxv): New function.
1327 (linux_get_hwcap): Likewise.
1328 (linux_get_hwcap2): Likewise.
1329 * linux-low.h (linux_get_hwcap): New declaration.
1330 (linux_get_hwcap2): Likewise.
1331 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1332 (ppc_arch_setup): Call linux_get_hwcap.
1333 * linux-s390-low.c (s390_get_hwcap): Remove function.
1334 (s390_arch_setup): Call linux_get_hwcap.
1336 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1337 Jiong Wang <jiong.wang@arm.com>
1339 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1340 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1342 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1344 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1345 Jiong Wang <jiong.wang@arm.com>
1347 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1348 (aarch64_get_hwcap): New function.
1349 (aarch64_arch_setup): Read APIA hwcap.
1351 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1352 Jiong Wang <jiong.wang@arm.com>
1354 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1355 (initialize_low_tracepoint): Likewise.
1356 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1357 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1358 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1359 (aarch64_linux_read_description): Likewise.
1360 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1362 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1364 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1365 i386_create_target_description for 'segments' parameter.
1366 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1367 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1368 * win32-i386-low.c (i386_arch_setup): Likewise.
1370 2019-03-12 Tom Tromey <tromey@adacore.com>
1372 * linux-low.c (iterate_over_lwps): Update.
1374 2019-03-06 Tom Tromey <tom@tromey.com>
1376 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1377 (captured_main): Use SCOPE_EXIT.
1379 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1381 * configure.srv: Use '$enable_unittest' instead of '$development'
1382 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1385 2019-02-27 Tom Tromey <tromey@adacore.com>
1387 * gdbreplay.c (logchar): Handle \r\n.
1389 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1391 * linux-low.c (linux_attach): Add process before lwp.
1392 * server.c (attach_inferior): Check if already attached.
1394 2019-02-07 Tom Tromey <tom@tromey.com>
1396 * x86-tdesc.h: Rename include guard.
1397 * x86-low.h: Add include guard.
1398 * wincecompat.h: Rename include guard.
1399 * win32-low.h: Add include guard.
1400 * utils.h: Rename include guard.
1401 * tracepoint.h: Rename include guard.
1402 * tdesc.h: Rename include guard.
1403 * target.h: Rename include guard.
1404 * server.h: Rename include guard.
1405 * remote-utils.h: Rename include guard.
1406 * regcache.h: Rename include guard.
1407 * nto-low.h: Rename include guard.
1408 * notif.h: Add include guard.
1409 * mem-break.h: Rename include guard.
1410 * lynx-low.h: Add include guard.
1411 * linux-x86-tdesc.h: Add include guard.
1412 * linux-s390-tdesc.h: Add include guard.
1413 * linux-ppc-tdesc-init.h: Add include guard.
1414 * linux-low.h: Add include guard.
1415 * linux-aarch64-tdesc.h: Add include guard.
1416 * linux-aarch32-low.h: Add include guard.
1417 * inferiors.h: Rename include guard.
1418 * i387-fp.h: Rename include guard.
1419 * hostio.h: Rename include guard.
1420 * gdbthread.h: Rename include guard.
1421 * gdb_proc_service.h: Rename include guard.
1422 * event-loop.h: Rename include guard.
1423 * dll.h: Rename include guard.
1424 * debug.h: Rename include guard.
1425 * ax.h: Rename include guard.
1427 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1430 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1431 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1433 2019-01-25 Tom Tromey <tom@tromey.com>
1435 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1437 2019-01-25 Tom Tromey <tom@tromey.com>
1439 * win32-low.c: Fix common/ includes.
1440 * win32-i386-low.c: Fix common/ includes.
1441 * tracepoint.c: Fix common/ includes.
1442 * thread-db.c: Fix common/ includes.
1443 * target.h: Fix common/ includes.
1444 * symbol.c: Fix common/ includes.
1445 * spu-low.c: Fix common/ includes.
1446 * server.h: Fix common/ includes.
1447 * server.c: Fix common/ includes.
1448 * remote-utils.c: Fix common/ includes.
1449 * regcache.h: Fix common/ includes.
1450 * regcache.c: Fix common/ includes.
1451 * nto-x86-low.c: Fix common/ includes.
1452 * notif.h: Fix common/ includes.
1453 * mem-break.h: Fix common/ includes.
1454 * lynx-low.c: Fix common/ includes.
1455 * lynx-i386-low.c: Fix common/ includes.
1456 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1457 * linux-x86-low.c: Fix common/ includes.
1458 * linux-low.c: Fix common/ includes.
1459 * inferiors.h: Fix common/ includes.
1460 * i387-fp.c: Fix common/ includes.
1461 * hostio.c: Fix common/ includes.
1462 * hostio-errno.c: Fix common/ includes.
1463 * gdbthread.h: Fix common/ includes.
1464 * gdbreplay.c: Fix common/ includes.
1465 * fork-child.c: Fix common/ includes.
1466 * event-loop.c: Fix common/ includes.
1468 (enum gdb_agent_op): Fix common/ includes.
1470 2019-01-21 Tom Tromey <tom@tromey.com>
1472 * tracepoint.c: Fix includes.
1473 * remote-utils.c: Fix includes.
1474 * linux-x86-low.c: Fix includes.
1476 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1478 * gdbreplay.c (gdbreplay_version): Update copyright year in
1480 * server.c (gdbserver_version): Likewise.
1482 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1484 * linux-low.c (add_lwp): Switch ordering.
1486 2018-11-29 Tom Tromey <tom@tromey.com>
1488 * win32-low.c (win32_join): Take pid, not process.
1489 * target.h (struct target_ops) <join>: Change argument type.
1490 (join_inferior): Change argument name.
1491 * spu-low.c (spu_join): Take pid, not process.
1492 * server.c (handle_detach): Preserve pid before destroying
1494 * lynx-low.c (lynx_join): Take pid, not process.
1495 * linux-low.c (linux_join): Take pid, not process.
1497 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1499 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1500 (aarch64_cannot_fetch_register): Likewise.
1501 (struct linux_target_ops): Update references.
1503 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1505 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1507 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1509 * configure.srv (ipa_ppc_linux_regobj): Add
1510 powerpc-isa207-htm-vsx32l-ipa.o and
1511 powerpc-isa207-htm-vsx64l-ipa.o.
1512 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1513 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1514 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1515 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1516 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1517 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1518 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1519 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1520 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1521 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1522 (init_registers_powerpc_isa207_htm_vsx32l)
1523 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1524 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1525 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1526 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1527 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1528 (ppc_store_tm_ctarregset): New functions.
1529 (ppc_regsets): Add entries for HTM regsets.
1530 (ppc_arch_setup): Set htm in features struct when needed. Set
1531 sizes for the HTM regsets.
1532 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1533 (initialize_low_arch): Call
1534 init_registers_powerpc_isa207_htm_vsx32l and
1535 init_registers_powerpc_isa207_htm_vsx64l.
1536 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1537 PPC_TDESC_ISA207_HTM_VSX.
1538 (initialize_low_tracepoint): Call
1539 init_registers_powerpc_isa207_htm_vsx32l and
1540 init_registers_powerpc_isa207_htm_vsx64l.
1542 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1544 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1545 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1546 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1547 (ppc_store_pmuregset): New functions.
1548 (ppc_regsets): Add entries for ebb and pmu regsets.
1549 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1550 pmu regsets are available. Set sizes for these regsets.
1552 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1554 * configure.srv (ipa_ppc_linux_regobj): Add
1555 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1556 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1557 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1558 rs6000/powerpc-isa207-vsx32l.xml, and
1559 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1560 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1561 <PPC_TDESC_ISA207_VSX>: New enum value.
1562 (init_registers_powerpc_isa207_vsx32l): Declare.
1563 (init_registers_powerpc_isa207_vsx64l): Declare.
1564 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1565 (ppc_store_tarregset): New function.
1566 (ppc_regsets): Add entry for the TAR regset.
1567 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1568 size for the TAR regsets.
1569 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1570 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1571 and init_registers_powerpc_isa207_vsx64l.
1572 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1573 (initialize_low_tracepoint): Call
1574 init_registers_powerpc_isa207_vsx32l and
1575 init_registers_powerpc_isa207_vsx64l.
1577 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1578 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1580 * configure.srv (ipa_ppc_linux_regobj): Add
1581 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1582 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1583 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1584 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1585 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1586 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1587 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1588 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1589 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1590 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1591 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1592 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1593 (ppc_hwcap): Add comment.
1594 (ppc_hwcap2): New global.
1595 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1596 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1597 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1598 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1599 when needed. Set sizes for the the DSCR and PPR regsets.
1600 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1601 (initialize_low_arch): Call
1602 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1603 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1604 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1605 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1606 (initialize_low_tracepoint): Call
1607 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1608 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1610 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1612 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1614 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1615 Simon Marchi <simark@simark.ca>
1617 * acinclude.m4: Include "../selftest.m4".
1618 * configure: Regenerate.
1619 * configure.ac: Use "GDB_AC_SELFTEST".
1620 * configure.srv: Use "$enable_unittests" instead of
1621 "$development" when checking whether unit tests have been
1623 * server.c (captured_main): Update message informing that
1624 selftests have been disabled.
1626 2018-10-04 Tom Tromey <tom@tromey.com>
1628 * configure: Rebuild.
1630 2018-10-04 Tom Tromey <tom@tromey.com>
1632 * server.c (handle_status): Rename inner "thread".
1633 (process_serial_event): Declare "res" in 'm' case.
1634 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1635 (iterate_over_lwps): Rename inner "thread".
1636 (linux_qxfer_libraries_svr4): Rename inner "len".
1637 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1639 2018-10-01 Gary Benson <gbenson@redhat.com>
1641 * gdb_proc_service.h: Moved common code to
1642 common/gdb_proc_service.h.
1644 2018-10-01 Gary Benson <gbenson@redhat.com>
1646 * gdb_proc_service.h: Synchronize comments and whitespace with
1647 GDB's version of this file.
1649 2018-09-25 Tom Tromey <tom@tromey.com>
1651 * configure: Rebuild.
1652 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1654 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1656 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1657 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1658 ($(IPA_LIB)): Sort IPA_OBJS.
1660 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1662 * Makefile.in: Remove references to $(ADD_DEPS).
1664 2018-09-16 Tom Tromey <tom@tromey.com>
1666 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1668 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1671 2018-09-05 Tom Tromey <tom@tromey.com>
1673 * configure: Rebuild.
1675 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1678 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1680 2018-08-27 Tom Tromey <tom@tromey.com>
1683 * configure: Rebuild.
1685 2018-08-27 Tom Tromey <tom@tromey.com>
1687 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1688 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1689 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1690 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1691 (s390x_emit_stack_adjust): Add casts to unsigned char.
1693 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1697 * server.h (struct client_state) <disable_randomization>:
1700 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1702 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1704 (mips_supply_ptrace_register): Likewise.
1706 2018-07-22 Tom Tromey <tom@tromey.com>
1708 * configure: Rebuild.
1710 2018-07-22 Tom Tromey <tom@tromey.com>
1712 * win32-low.c (win32_create_inferior): Remove unused variables.
1713 * gdbreplay.c (remote_open): Remove unused variable.
1714 * remote-utils.c (remote_prepare): Remove unused variable.
1715 * x86-tdesc.h (X86_TDESC_H): Define.
1716 (amd64_expedite_regs): Define conditionally.
1717 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1718 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1719 * remote-utils.c (readchar): Remove unused variable.
1721 2018-07-13 Pedro Alves <palves@redhat.com>
1723 * linux-low.c (linux_kill): Change parameter to process_info
1724 pointer instead of pid. Adjust.
1725 * lynx-low.c (lynx_kill): Likewise.
1726 * nto-low.c (nto_kill): Likewise.
1727 * spu-low.c (spu_kill): Likewise.
1728 * win32-low.c (win32_kill): Likewise.
1729 * server.c (handle_v_kill, kill_inferior_callback)
1730 (detach_or_kill_for_exit): Adjust.
1731 * target.c (kill_inferior): Change parameter to process_info
1732 pointer instead of pid. Adjust.
1733 * target.h (struct target_ops) <kill>: Change parameter to
1734 process_info pointer instead of pid. Adjust all implementations
1736 (kill_inferior): Likewise.
1738 2018-07-13 Pedro Alves <palves@redhat.com>
1740 * linux-low.c (linux_detach, linux_join): Change parameter to
1741 process_info pointer instead of pid. Adjust.
1742 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1743 * nto-low.c (nto_detach): Likewise.
1744 * spu-low.c (spu_detach, spu_join): Likewise.
1745 * win32-low.c (win32_detach, win32_join): Likewise.
1746 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1747 * target.h (struct target_ops) <detach, join>: Change parameter to
1748 process_info pointer instead of pid. Adjust all implementations
1750 (detach_inferior, join_inferior): Rename 'pid' parameter to
1753 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1754 Jan Kratochvil <jan.kratochvil@redhat.com>
1755 Paul Fertser <fercerpav@gmail.com>
1756 Tsutomu Seki <sekiriki@gmail.com>
1758 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1759 (OBS): Add 'common/netstuff.o'.
1760 (GDBREPLAY_OBS): Likewise.
1761 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1762 (remote_open): Implement support for IPv6
1764 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1766 (handle_accept_event): Accept connections from IPv6 sources.
1767 (remote_prepare): Handle IPv6-style hostnames; implement
1768 support for IPv6 connections.
1769 (remote_open): Implement support for printing connections from
1772 2018-07-11 Pedro Alves <palves@redhat.com>
1775 * mem-break.c (any_persistent_commands): Add process_info
1776 parameter and use it instead of relying on the current process.
1777 Change return type to bool.
1778 * mem-break.h (any_persistent_commands): Add process_info
1779 parameter and change return type to bool.
1780 * server.c (handle_detach): Remove require_running_or_return call.
1781 Look up the process_info for the process we're about to detach.
1782 If not found, return back error to GDB. Adjust
1783 any_persistent_commands call to pass down a process pointer.
1785 2018-07-11 Pedro Alves <palves@redhat.com>
1787 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1788 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1789 instead of collect_register_by_name.
1790 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1791 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1793 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1794 Pedro Alves <palves@redhat.com>
1796 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1798 2018-07-03 Tom Tromey <tom@tromey.com>
1800 * linux-low.c: Update.
1801 * lynx-low.c: Update.
1802 * mem-break.c: Update.
1803 * nto-low.c: Update.
1804 * remote-utils.c: Update.
1806 * spu-low.c: Update.
1808 * win32-low.c: Update.
1810 2018-07-03 Tom Tromey <tom@tromey.com>
1814 2018-07-03 Tom Tromey <tom@tromey.com>
1816 * linux-low.c: Update.
1818 2018-07-03 Tom Tromey <tom@tromey.com>
1822 2018-07-03 Tom Tromey <tom@tromey.com>
1824 * linux-low.c: Update.
1825 * linux-mips-low.c: Update.
1826 * lynx-low.c: Update.
1827 * nto-low.c: Update.
1828 * remote-utils.c: Update.
1830 * spu-low.c: Update.
1832 * thread-db.c: Update.
1834 2018-07-03 Tom Tromey <tom@tromey.com>
1836 * linux-low.c: Update.
1837 * linux-mips-low.c: Update.
1838 * lynx-low.c: Update.
1839 * mem-break.c: Update.
1840 * nto-low.c: Update.
1841 * remote-utils.c: Update.
1843 * spu-low.c: Update.
1845 * tracepoint.c: Update.
1847 2018-07-03 Tom Tromey <tom@tromey.com>
1849 * linux-low.c: Update.
1850 * linux-ppc-low.c: Update.
1851 * linux-x86-low.c: Update.
1852 * proc-service.c: Update.
1854 * spu-low.c: Update.
1855 * thread-db.c: Update.
1856 * win32-low.c: Update.
1858 2018-07-03 Tom Tromey <tom@tromey.com>
1860 * linux-low.c: Update.
1861 * lynx-low.c: Update.
1862 * nto-low.c: Update.
1863 * remote-utils.c: Update.
1864 * spu-low.c: Update.
1865 * thread-db.c: Update.
1866 * win32-low.c: Update.
1868 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1870 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1871 parameter in call to 'amd64_create_target_description'.
1873 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1875 * x86-tdesc.h: Remove executable permission flag.
1877 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1879 * configure.ac: Remove AC_PREREQ, add missing quoting.
1880 * configure: Re-generate.
1881 * config.in: Re-generate.
1882 * aclocal.m4: Re-generate.
1884 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1886 * tracepoint.h (current_traceframe): Remove declaration.
1888 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1890 * linux-aarch64-low.c (is_sve_tdesc): New function.
1891 (aarch64_sve_regs_copy_to_regcache): Likewise.
1892 (aarch64_sve_regs_copy_from_regcache): Likewise.
1893 (aarch64_regs_info): Add SVE checks.
1894 (initialize_low_arch): Initialize SVE.
1896 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1898 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1900 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1902 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1903 (initialize_low_tracepoint): Likewise
1904 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1905 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1907 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1909 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1911 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1913 * server.h (PBUFSIZ): Increase size
1915 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1917 * regcache.c (regcache::raw_compare): New function.
1918 * regcache.h (regcache::raw_compare): New declaration.
1920 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1922 * regcache.c (new_register_cache): Use new.
1923 (free_register_cache): Use delete.
1924 (register_data): Use const.
1925 (supply_register): Move body inside regcache.
1926 (regcache::raw_supply): New override function.
1927 (collect_register): Move body inside regcache.
1928 (regcache::raw_collect): New override function.
1929 (regcache::get_register_status): New override function.
1930 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1932 2018-06-09 Tom Tromey <tom@tromey.com>
1934 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1936 (event_queue): Use std::queue.
1937 (gdb_event_xfree): Remove.
1938 (initialize_event_loop, process_event, wait_for_event): Update.
1940 2018-06-08 Stan Cox <scox@redhat.com>
1942 * win32-low.c (win32_create_inferior): last_ptid and last_status
1943 moved to client_state.
1945 2018-06-08 Pedro Alves <palves@redhat.com>
1947 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1948 common/common-exceptions.o, common/common-utils.o,
1949 common/errors.o, common/print-utils.o and utils.o.
1950 * gdbreplay.c: Include "common-defs.h" instead of the two
1951 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1952 string.h or alloca.h.
1953 (perror_with_name): Delete.
1954 (remote_open): Use xstrdup instead of strdup.
1955 (main): Rename to ...
1956 (captured_main): ... this.
1959 2018-06-08 Tom Tromey <tom@tromey.com>
1961 * linux-low.c (linux_low_read_btrace): Update.
1963 2018-06-04 Stan Cox <scox@redhat.com>
1965 * server.h (struct client_state): New.
1966 * server.c (cont_thread, general_thread, multi_process)
1967 (report_fork_events, report_vfork_events, report_exec_events)
1968 (report_thread_events, swbreak_feature, hwbreak_feature)
1969 (vCont_supported, disable_randomization, pass_signals)
1970 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1971 Moved to client_state.
1972 * remote-utils.c (remote_debug, noack_mode)
1973 (transport_is_reliable): Moved to client_state.
1974 * tracepoint.c (current_traceframe): Moved to client_state.
1977 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1978 linux-low.c, remote-utils.h, target.c: Use client_state.
1980 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1982 * configure.srv: Add new c/h file.
1984 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1986 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1989 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1991 * gdb.arch/mips-fpregset-core.exp: New test.
1992 * gdb.arch/mips-fpregset-core.c: New test source.
1994 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1997 * hostio.c (require_int): Do not report overflow for integers
1998 between 0xfffffff and 0x7fffffff.
2000 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2002 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2003 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2004 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2006 (the_low_target): Wire them.
2008 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2010 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2011 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2012 mode. Call collect_register_by_name with vscr using
2013 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2014 (ppc_store_vrregset): Add and set vscr_offset variable as in
2015 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2018 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2020 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2021 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2022 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2024 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2026 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2027 (ppc_store_vsxregset): Likewise.
2028 (ppc_fill_vrregset): Likewise.
2029 (ppc_store_vrregset): Likewise.
2030 (ppc_fill_evrregset): Likewise.
2031 (ppc_store_evrregset): Likewise.
2032 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2033 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2036 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2038 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2039 wordsize of the inferior. Call ppc_linux_target_wordsize.
2041 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2043 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2044 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2045 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2046 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2047 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2048 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2049 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2050 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2051 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2052 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2053 (tdesc_powerpc_e500l): Remove.
2054 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2055 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2056 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2057 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2059 (ppc_arch_setup): Remove target description matching code. Fill a
2060 ppc_linux_features struct and call ppc_linux_match_description
2063 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2065 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2066 width of the requested register exceeds the width of the
2068 (mips_cannot_store_register): Likewise.
2070 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2072 * linux-mips-low.c (mips_fetch_register): New function. Update
2074 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2075 (the_low_target): Wire `mips_fetch_register'.
2077 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2079 * lynx-i386-low.c (LYNXOS_178): New macro.
2080 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2081 the layout on LynxOS-178.
2082 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2083 handle floating point registers that are not supported by
2086 2018-05-10 Tom Tromey <tom@tromey.com>
2088 * configure: Rebuild.
2090 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2093 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2094 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2095 Use it to set the expedite_regs field in the given tdesc.
2096 * x86-tdesc.h: New file.
2097 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2098 Adjust following the addition of the new expedite_regs parameter
2099 to init_target_desc.
2100 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2101 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2102 (i386_linux_read_description, amd64_linux_read_description):
2103 Adjust following the addition of the new expedite_regs parameter
2104 to init_target_desc.
2105 * lynx-i386-low.c: #include "x86-tdesc.h".
2106 (lynx_i386_arch_setup): Adjust following the addition of the new
2107 expedite_regs parameter to init_target_desc.
2108 * nto-x86-low.c: #include "x86-tdesc.h".
2109 (nto_x86_arch_setup): Adjust following the addition of the new
2110 expedite_regs parameter to init_target_desc.
2111 * win32-i386-low.c: #include "x86-tdesc.h".
2112 (i386_arch_setup): Adjust following the addition of the new
2113 expedite_regs parameter to init_target_desc.
2115 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2118 * win32-low.c (win32_create_inferior): Add call to my_wait
2119 setting last_status global.
2121 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2124 * win32-low.c (create_process): Only call gdb_tilde_expand if
2125 inferior_cwd is not NULL.
2127 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2129 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2130 registers to the cache if their values have changed.
2131 (i387_xsave_to_cache): Provide default values for x87 control
2132 registers when these features are available, but disabled.
2133 * regcache.c (supply_register_by_name_zeroed): New function.
2134 * regcache.h (supply_register_by_name_zeroed): Declare new
2137 2018-05-07 Tom Tromey <tom@tromey.com>
2139 * configure: Rebuild.
2141 2018-05-04 Tom Tromey <tom@tromey.com>
2143 * configure: Rebuild.
2145 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2146 Pedro Alves <palves@redhat.com>
2148 * linux-aarch64-low.c (aarch64_stopped_data_address):
2151 2018-04-27 Tom Tromey <tom@tromey.com>
2153 * configure: Rebuild.
2155 2018-04-23 Tom Tromey <tom@tromey.com>
2157 * configure: Rebuild.
2159 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2161 * Makefile.in (depcomp): Add "..".
2162 (all_deps_files): New and use it.
2164 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2166 * configure.srv (aarch64*-*-linux*): Don't include xml.
2167 (i[34567]86-*-cygwin*): Likewise.
2168 (i[34567]86-*-linux*): Likewise.
2169 (i[34567]86-*-lynxos*): Likewise.
2170 (i[34567]86-*-mingw32ce*): Likewise.
2171 (i[34567]86-*-mingw*): Likewise.
2172 (i[34567]86-*-nto*): Likewise.
2173 (tic6x-*-uclinux): Likewise.
2174 (x86_64-*-linux*): Likewise.
2175 (x86_64-*-mingw*): Likewise.
2176 (x86_64-*-cygwin*): Likewise.
2178 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2180 * tdesc.c: Remove xml parameter.
2182 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2184 * server.c (get_features_xml): Remove cast.
2185 * tdesc.c (void target_desc::accept): Fill in function.
2186 (tdesc_get_features_xml): Remove old xml creation.
2187 (print_xml_feature::visit_pre): Add xml vistor.
2188 * tdesc.h (struct target_desc): Make xmltarget mutable.
2189 (tdesc_get_features_xml): Remove declaration.
2191 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2193 * tdesc.c (tdesc_architecture_name): Add new function.
2194 (tdesc_osabi_name): Likewise.
2195 (tdesc_get_features_xml): Use new functions.
2197 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2199 * tdesc.c (tdesc_create_flags): Remove.
2200 (tdesc_add_flag): Likewise.
2201 (tdesc_named_type): Likewise.
2202 (tdesc_create_union): Likewise.
2203 (tdesc_create_struct): Likewise.
2204 (tdesc_create_vector): Likewise.
2205 (tdesc_add_bitfield): Likewise.
2206 (tdesc_add_field): Likewise.
2207 (tdesc_set_struct_size): Likewise.
2209 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2211 * tdesc.c (~target_desc): Remove implictly deleted items.
2212 (init_target_desc): Iterate all features.
2213 (tdesc_get_features_xml): Use vector.
2214 (tdesc_create_feature): Create feature.
2215 * tdesc.h (tdesc_feature) Remove
2216 (target_desc): Add features.
2218 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2220 * Makefile.in: Add common/tdesc.c
2221 * tdesc.c (init_target_desc): init all reg_defs from register
2223 (tdesc_create_reg): Create tdesc_reg.
2224 * tdesc.h (tdesc_feature): Add register vector.
2226 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2228 * tdesc.h (struct target_desc) <features>: Change type to
2229 std::vector<std::string>.
2230 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2232 (tdesc_get_features_xml): Likewise.
2233 (tdesc_create_feature): Likewise.
2235 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2237 * regcache.c (find_register_by_number): Return a ref.
2238 (find_regno): Use references.
2239 (register_size): Likewise.
2240 (register_data): Likewise.
2241 * tdesc.c (target_desc::~target_desc): Remove free calls.
2242 (target_desc::operator==): Use std::vector compare.
2243 (init_target_desc): Use reference.
2244 (tdesc_create_reg): Use reg constructors.
2245 * tdesc.h (struct target_desc): Replace pointer with object.
2247 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2249 * regcache.c (find_register_by_number): Make static.
2250 (find_regno): Use find_register_by_number
2251 * regcache.h (struct reg): Remove declaration.
2253 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2255 * tdesc.c (target_desc::~target_desc): Move to here.
2256 (target_desc::operator==): Likewise.
2257 * tdesc.h (target_desc::~target_desc): Move from here.
2258 (target_desc::operator==): Likewise.
2260 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2262 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2264 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2266 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2268 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2269 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2270 and init_registers_s390_gs_linux64.
2272 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2274 * linux-s390-low.c (s390_fill_gs): Remove function.
2275 (s390_fill_gsbc): Remove function.
2276 (s390_regsets): Set fill functions for the guarded storage regsets
2279 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2281 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2282 the word size. Add comment.
2283 (s390_get_wordsize): New function.
2284 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2285 pswm with it. Instead, use s390_get_wordsize to determine the
2286 word size first and derive the correct tdesc from that directly.
2288 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2290 * Makefile.in: Include silent-rules.mk.
2291 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2292 (COMPILE): Add ECHO_CXX.
2293 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2294 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2295 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2296 (version-generated.c): Add ECHO_GEN.
2297 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2298 (IPAGENT_COMPILE): Add ECHO_CXX.
2299 (%-generated.c): Add ECHO_REGDAT.
2301 2018-03-14 Tom Tromey <tom@tromey.com>
2304 * ax.c (ax_printf): Special case for NULL.
2306 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2308 * linux-low.c (linux_qxfer_libraries_svr4): Use
2309 xml_escape_text_append.
2311 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2313 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2315 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2317 * server.c (handle_general_set): Remove unnecessary xstrdup.
2319 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2321 * server.c (parse_debug_format_options): Adjust to
2322 delim_string_to_char_ptr_vec changes.
2323 * thread-db.c (thread_db_load_search): Adjust to
2324 dirnames_to_char_ptr_vec changes.
2326 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2328 * target.h (target_enable_btrace, target_disable_btrace)
2329 (target_read_btrace, target_read_btrace_conf): Turn macro into
2330 inline function. Throw error if target method is not defined.
2331 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2332 check for btrace target method. Be prepared to handle exceptions
2333 from btrace target methods.
2335 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2337 * server.c (captured_main): Change order of error message printed
2338 when the current working directory cannot be found.
2340 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2342 * server.c: Include "filenames.h" and "pathstuff.h".
2343 (program_name): Delete variable.
2344 (program_path): New anonymous class.
2345 (get_exec_wrapper): Use "program_path" instead of
2347 (handle_v_run): Likewise.
2348 (captured_main): Likewise.
2349 (process_serial_event): Likewise.
2351 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2353 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2354 (OBJS): Add "pathstuff.o".
2355 * server.c (current_directory): New global variable.
2356 (captured_main): Initialize "current_directory".
2358 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2360 * tdesc.c: Use common/tdesc.h.
2361 * tdesc.h: Likewise.
2363 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2364 Simon Marchi <simon.marchi@ericsson.com>
2366 * Makefile.in: Switch order of make rules.
2368 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2370 * Makefile.in: Add common directory in build.
2371 * configure.ac: Add common reference.
2372 * configure: Regenerate.
2374 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2376 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2377 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2378 * spu-low.c (spu_target_ops): Likewise.
2379 * win32-low.c (win32_target_ops): Likewise.
2380 * server.c (supported_btrace_packets): Report packets unconditionally.
2381 * target.h (target_ops) <supports_btrace>: Remove.
2382 (target_supports_btrace): Remove.
2384 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2386 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2387 (handle_btrace_disable): Change return type to void. Use exceptions
2389 (handle_btrace_general_set): Catch exception and copy message to
2392 2018-02-08 Tom Tromey <tom@tromey.com>
2394 * linux-low.c (install_software_single_step_breakpoints): Use
2395 make_scoped_restore.
2396 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2397 (do_restore_current_thread_cleanup): Remove.
2398 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2401 2018-02-08 Tom Tromey <tom@tromey.com>
2403 * mem-break.c (set_raw_breakpoint_at): Use
2404 gdb::unique_xmalloc_ptr.
2406 2018-01-30 Pedro Alves <palves@redhat.com>
2409 * target.c (target_terminal::terminal_state): Rename to ...
2410 (target_terminal::m_terminal_state): ... this.
2412 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2414 * linux-low.c (handle_extended_wait): Surround call to
2415 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2417 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2419 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2420 linux_ptrace_attach_fail_reason_string now returning an
2422 (linux_attach): Likewise.
2423 * thread-db.c (attach_thread): Likewise.
2425 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2428 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2429 checking for fs_base/gs_base fields in struct user_regs_struct.
2430 * configure: Regenerate.
2432 2018-01-16 Yao Qi <yao.qi@linaro.org>
2435 * linux-low.c (fetch_register): Call supply_register instead of
2438 2018-01-08 Yao Qi <yao.qi@linaro.org>
2439 Simon Marchi <simon.marchi@ericsson.com>
2441 * Makefile.in (OBS): Remove selftest.o.
2442 * configure.ac: Set srv_selftest_objs if $development is true.
2443 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2444 * configure: Re-generated.
2445 * server.c (captured_main): Wrap variable selftest_filter with
2448 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2450 * server.c (parse_debug_format_options): Return std::string.
2451 (handle_monitor_command, captured_main): Adjust.
2453 2018-01-05 Pedro Alves <palves@redhat.com>
2456 * server.c (captured_main): Pass quiet=false to
2457 save_original_signals_state.
2459 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2461 * gdbreplay.c (gdbreplay_version): Update copyright year in
2463 * server.c (gdbserver_version): Likewise.
2465 2017-12-08 Tom Tromey <tom@tromey.com>
2467 * ax.c (ax_printf): Update.
2469 2017-12-07 Yao Qi <yao.qi@linaro.org>
2471 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2472 aarch64_linux_read_description.
2473 * linux-amd64-ipa.c (idx2mask): New array.
2474 (get_ipa_tdesc): Move idx2mask out.
2475 (initialize_low_tracepoint): Initialize target descriptions.
2476 * linux-i386-ipa.c (idx2mask): New array.
2477 (get_ipa_tdesc): Move idx2mask out.
2478 (initialize_low_tracepoint): Initialize target descriptions.
2480 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2482 * tdesc.c (struct tdesc_type): Change return type.
2483 (tdesc_add_flag): Change parameter type.
2484 (tdesc_add_bitfield): Likewise.
2485 (tdesc_add_field): Likewise.
2486 (tdesc_set_struct_size): Likewise.
2488 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2490 * regcache.c (registers_to_string): Remove unused variable.
2492 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2494 * inferiors.c (for_each_inferior_with_data): Remove.
2495 * inferiors.h (for_each_inferior_with_data): Remove.
2496 * server.c (handle_qxfer_threads_worker): Change parameter type.
2497 (handle_qxfer_threads_proper): Use for_each_thread.
2499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2501 * inferiors.c (for_each_inferior): Remove.
2502 (clear_inferiors): Use for_each_thread.
2503 * inferiors.h (for_each_inferior): Remove.
2504 * linux-low.c (linux_wait_for_event_filtered): Use
2506 (linux_stabilize_threads): Likewise.
2507 * regcache.c (regcache_release): Likewise.
2508 * server.c (gdb_wants_all_threads_stopped): Likewise.
2509 (clear_pending_status_callback): Remove.
2510 (handle_status): Use for_each_thread.
2511 (captured_main): Likewise.
2512 * win32-low.c (child_init_thread_list): Likewise.
2513 (win32_clear_inferiors): Likewise.
2514 (fake_breakpoint_event): Likewise.
2516 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2518 * inferiors.h (find_inferior): Remove.
2519 * inferiors.c (find_inferior): Remove.
2521 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2523 * linux-low.c (resume_status_pending_p): Update comment.
2524 (need_step_over_p): Update comment.
2526 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2528 * linux-low.c (proceed_one_lwp): Return void, change parameter
2530 (unsuspend_and_proceed_one_lwp): Likewise.
2531 (proceed_all_lwps): Use for_each_thread.
2532 (unstop_all_lwps): Likewise.
2534 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2536 * linux-low.c (linux_resume_one_thread): Return void, take
2538 (linux_resume): Use for_each_thread.
2540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2542 * linux-low.c (send_sigstop_callback): Return void, change
2543 parameter type. Rename to...
2544 (send_sigstop): ... this.
2545 (suspend_and_send_sigstop_callback): Return void, change parameter
2547 (suspend_and_send_sigstop): ... this.
2548 (stop_all_lwps): Use for_each_thread.
2550 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2552 * linux-low.c (lwp_running): Return bool, remove unused
2554 (linux_stabilize_threads): Use find_thread.
2556 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2558 * linux-low.c (select_singlestep_lwp_callback): Remove.
2559 (count_events_callback): Remove.
2560 (select_event_lwp_callback): Remove.
2561 (select_event_lwp): Use find_thread/for_each_thread.
2563 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2565 * linux-low.c (not_stopped_callback): Return bool, take filter
2567 (linux_wait_for_event_filtered): Use find_thread.
2568 (linux_wait_1): Likewise.
2570 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2572 * linux-low.c (same_lwp): Remove.
2573 (find_lwp_pid): Use find_thread.
2575 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2577 * linux-low.c (delete_lwp_callback): Remove.
2578 (linux_mourn): Use for_each_thread.
2580 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2582 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2583 args parameter, don't check for pid.
2584 (linux_detach): Use for_each_thread.
2586 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2588 * linux-low.c (struct counter): Remove.
2589 (second_thread_of_pid_p): Remove.
2590 (last_thread_of_process_p): Use find_thread.
2592 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2594 * inferiors.c (find_inferior_in_random): Remove.
2595 * inferiors.h (find_inferior_in_random): Remove.
2596 * linux-low.c (status_pending_p_callback): Return bool, accept
2597 parameter ptid directly.
2598 (linux_wait_for_event_filtered): Use find_thread_in_random.
2599 (linux_wait_1): Likewise.
2601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2603 * inferiors.c (find_inferior_id): Remove.
2604 (find_thread_ptid): Move implemention from find_inferior_id to
2606 * inferiors.h (find_inferior_id): Remove.
2607 * server.c (handle_status): Use find_thread_ptid.
2608 (process_serial_event): Likewise.
2609 * thread-db.c (find_one_thread): Likewise.
2610 (thread_db_thread_handle): Likewise.
2611 * win32-low.c (thread_rec): Likewise.
2612 (child_delete_thread): Likewise.
2613 (win32_thread_alive): Likewise.
2614 (get_child_debug_event): Likewise.
2616 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2618 * linux-mips-low.c (update_watch_registers_callback): Return
2619 void, remove pid_p parameter, don't check for pid.
2620 (mips_insert_point, mips_remove_point): Use for_each_thread.
2622 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2624 * lynx.low (lynx_delete_thread_callback): Remove.
2625 (lynx_mourn): Use for_each_thread.
2627 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2629 * regcache.c (regcache_invalidate_one): Remove.
2630 (regcache_invalidate_pid): use for_each_thread.
2632 2017-11-26 Tom Tromey <tom@tromey.com>
2634 * linux-low.c (linux_create_inferior): Update.
2636 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2638 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2640 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2642 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2643 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2644 * linux-aarch64-tdesc-selftest.c: New file.
2645 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2647 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2649 * configure.srv: Add new file.
2650 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2651 * linux-aarch64-tdesc-selftest.c: New file.
2652 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2654 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2656 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2657 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2658 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2660 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2662 * configure.srv: Add new files.
2663 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2664 aarch64_linux_read_description.
2665 * linux-aarch64-low.c (aarch64_linux_read_description):
2666 Merge with aarch64_arch_setup.
2667 (aarch64_arch_setup): Call aarch64_linux_read_description.
2668 * linux-aarch64-tdesc.c: New file.
2669 * linux-aarch64-tdesc.h: New file.
2671 2017-11-24 Yao Qi <yao.qi@linaro.org>
2673 * configure.srv: Set $srv_regobj for tic6x-linux.
2674 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2675 (tic6x_read_description): Move some code to tic6x_arch_setup.
2676 (tic6x_tdesc_test): New function.
2677 (initialize_low_arch): Call selftests::register_test.
2679 2017-11-22 Yao Qi <yao.qi@linaro.org>
2681 * remote-utils.c (prepare_resume_reply): Use memcpy.
2683 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2685 * linux-low.c (kill_one_lwp_callback): Return void, take
2686 argument directly, don't filter on pid.
2687 (linux_kill): Use for_each_thread.
2689 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2691 * linux-low.c (need_step_over_p): Return bool, remove dummy
2693 (linux_resume, proceed_all_lwps): Use find_thread.
2695 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2697 * linux-low.c (resume_status_pending_p): Return bool, remove
2699 (linux_resume): Use find_thread.
2701 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2703 * linux-low.c (struct thread_resume_array): Remove.
2704 (linux_set_resume_request): Return void, take arguments
2706 (linux_resume): Use for_each_thread.
2708 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2710 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2711 return bool, remove data argument.
2712 (linux_stabilize_threads): Use find_thread.
2714 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2716 * linux-low.c (unsuspend_one_lwp): Remove.
2717 (unsuspend_all_lwps): Use for_each_thread, inline code from
2720 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2722 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2723 * linux-low.c (struct iterate_over_lwps_args): Remove.
2724 (iterate_over_lwps_filter): Remove.
2725 (iterate_over_lwps): Use find_thread.
2727 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2729 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2730 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2731 code from reset_lwp_ptrace_options_callback.
2733 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2735 * linux-arm-low.c (struct update_registers_data): Remove.
2736 (update_registers_callback): Return void, take arguments
2737 directly, don't check thread's pid.
2738 (arm_insert_point, arm_remove_point): Use for_each_thread.
2740 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2742 * win32-low.c (continue_one_thread): Return void, take argument
2744 (child_continue): Use for_each_thread.
2746 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2748 * win32-i386-low.c (update_debug_registers_callback): Rename
2750 (update_debug_registers): ... this, return void, remove pid_p arg.
2751 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2753 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2755 * inferiors.h (struct process_info): Add constructor, initialize
2757 <syscalls_to_catch>: Change type to std::vector<int>.
2758 * inferiors.c (add_process): Allocate process_info with new.
2759 (remove_process): Free process_info with delete.
2760 * linux-low.c (handle_extended_wait): Adjust.
2761 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2762 * server.c (handle_general_set): Adjust.
2764 2017-11-16 Pedro Alves <palves@redhat.com>
2766 * remote-utils.c (remote_close): Block SIGIO signals instead of
2767 uninstalling the SIGIO handler.
2769 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2771 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2773 2017-11-16 Yao Qi <yao.qi@linaro.org>
2775 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2776 (tic6x_store_gregset): Likewise.
2777 (tic6x_usrregs_info): Move it up.
2779 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2781 * Makefile.in: Update arch rules.
2782 * configure.srv: Explicitly mark arch/ files.
2784 2017-11-13 Andreas Schwab <schwab@suse.de>
2786 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2788 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2790 2017-11-06 Pedro Alves <palves@redhat.com>
2792 * config.in, configure: Regenerate.
2794 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2796 * target.c (struct thread_search): Remove.
2797 (thread_search_callback): Remove.
2798 (prepare_to_access_memory): Use for_each_thread instead of
2799 find_inferior. Inline code from thread_search_callback.
2801 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2803 * server.c (struct visit_actioned_threads_data): Remove.
2804 (visit_actioned_threads): Change prototype to take arguments
2806 (resume): Use find_thread instead of find_inferior.
2808 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2810 * server.c (queue_stop_reply_callback): Change prototype, return
2812 (find_status_pending_thread_callback): Remove.
2813 (handle_status): Replace find_inferior with find_thread and
2816 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2818 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2820 (aarch64_store_gregset): Likewise.
2821 (aarch64_fill_fpregset): Likewise.
2822 (aarch64_store_fpregset): Likewise.
2824 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2826 * gdbthread.h (find_thread, for_each_thread): New functions.
2827 * inferiors.c (thread_of_pid): Remove.
2828 (find_any_thread_of_pid): Use find_thread.
2829 * linux-low.c (num_lwps): Use for_each_thread.
2831 2017-10-17 Yao Qi <yao.qi@linaro.org>
2833 * Makefile.in: Remove one rule.
2834 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2836 2017-10-17 Yao Qi <yao.qi@linaro.org>
2838 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2839 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2841 2017-10-17 Yao Qi <yao.qi@linaro.org>
2843 * configure.srv: Rename arm.o with arch/arm.o.
2845 2017-10-17 Yao Qi <yao.qi@linaro.org>
2847 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2848 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2849 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2850 (arch-i386.o, arch-amd64.o): Remove rules.
2851 (arch/%.o): New rule.
2852 Update POSTCOMPILE and COMPILE.pre.
2853 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2854 * configure: Re-generated.
2855 * configure.srv: Replace arch-i386.o with arch/i386.o.
2856 Replace arch-amd64.o with arch/amd64.o.
2858 2017-10-16 Yao Qi <yao.qi@linaro.org>
2860 * configure: Regenerated.
2862 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2864 * inferiors.h: (struct inferior_list): Remove.
2865 (struct inferior_list_entry); Remove.
2866 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2867 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2868 get_first_inferior): Remove.
2869 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2870 find_inferior_id, find_inferior_in_random): Change signature.
2871 * inferiors.c (all_threads): Change type to
2872 std::list<thread_info *>.
2873 (get_thread): Remove macro.
2874 (find_inferior, find_inferior_id): Change signature, implement
2876 (find_inferior_in_random): Change signature, implement using
2877 find_thread_in_random.
2878 (for_each_inferior, for_each_inferior_with_data): Change
2879 signature, implement using for_each_thread.
2880 (add_inferior_to_list, remove_inferior): Remove.
2881 (add_thread, get_first_thread, thread_of_pid,
2882 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2883 (get_first_inferior, one_inferior_p, clear_inferior_list):
2885 (clear_inferiors, get_thread_process): Update.
2886 * gdbthread.h: Include <list>.
2887 (struct thread_info) <entry>: Remove field.
2889 (all_threads): Change type to std::list<thread_info *>.
2890 (get_first_inferior): Add doc.
2891 (find_thread, for_each_thread, find_thread_in_random): New
2893 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2894 * linux-arm-low.c (update_registers_callback): Update.
2895 * linux-low.c (second_thread_of_pid_p): Update.
2896 (kill_one_lwp_callback, linux_detach_lwp_callback,
2897 delete_lwp_callback, status_pending_p_callback, same_lwp,
2898 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2899 iterate_over_lwps, not_stopped_callback,
2900 resume_stopped_resumed_lwps, count_events_callback,
2901 select_singlestep_lwp_callback, select_event_lwp_callback,
2902 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2903 suspend_and_send_sigstop_callback, wait_for_sigstop,
2904 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2905 lwp_running, linux_set_resume_request, resume_status_pending_p,
2906 need_step_over_p, start_step_over, linux_resume_one_thread,
2907 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2908 reset_lwp_ptrace_options_callback): Update.
2909 * linux-mips-low.c (update_watch_registers_callback): Update.
2910 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2912 (free_register_cache_thread_one): Remove.
2913 (regcache_release): Update.
2914 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2915 handle_qxfer_threads_worker): Update.
2916 (handle_query): Update, use list iterator.
2917 (visit_actioned_threads, handle_pending_status,
2918 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2919 clear_pending_status_callback, set_pending_status_callback,
2920 find_status_pending_thread_callback, handle_status,
2921 process_serial_event): Update.
2922 * target.c (thread_search_callback): Update.
2923 * thread-db.c (thread_db_get_tls_address): Update.
2924 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2926 * win32-i386-low.c (update_debug_registers_callback): Update.
2927 * win32-low.c (delete_thread_info, child_delete_thread,
2928 continue_one_thread, suspend_one_thread,
2929 get_child_debug_event): Adjust.
2931 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2933 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2934 * inferiors.h: Include <list>.
2935 (struct process_info) <entry>: Remove field.
2937 (pid_of): Change macro to function.
2938 (ptid_of, lwpid_of): Remove macro.
2939 (all_processes): Change type to std::list<process_info *>.
2940 (ALL_PROCESSES): Remove macro.
2941 (for_each_process, find_process): New function.
2942 * inferiors.c (all_processes): Change type to
2943 std::list<process_info *>.
2944 (find_thread_process): Adjust.
2945 (add_process): Likewise.
2946 (remove_process): Likewise.
2947 (find_process_pid): Likewise.
2948 (get_first_process): Likewise.
2949 (started_inferior_callback): Remove.
2950 (have_started_inferiors_p): Adjust.
2951 (attached_inferior_callback): Remove.
2952 (have_attached_inferiors_p): Adjust.
2953 * linux-low.c (check_zombie_leaders): Likewise.
2954 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2955 (x86_linux_update_xmltarget): Adjust.
2956 * server.c (handle_query): Likewise.
2957 (gdb_reattached_process): Remove.
2958 (handle_status): Adjust.
2959 (kill_inferior_callback): Likewise.
2960 (detach_or_kill_inferior): Remove.
2961 (print_started_pid): Likewise.
2962 (print_attached_pid): Likewise.
2963 (detach_or_kill_for_exit): Update.
2964 (process_serial_event): Likewise.
2965 * linux-arm-low.c (arm_new_fork): Likewise.
2967 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2969 * dll.h: Include <list>.
2970 (struct dll_info): Add constructor.
2971 <entry>: Remove field.
2972 (all_dlls): Change type to std::list<dll_info>.
2973 * dll.c: Include <algorithm>.
2974 (get_dll): Remove macro.
2975 (all_dlls): Change type to std::list<dll_info *>.
2976 (free_one_dll): Remove.
2977 (match_dll): Likewise.
2978 (loaded_dll): Adjust.
2979 (unloaded_dll): Adjust to all_dlls type change, use
2980 std::find_if. Inline code from match_dll.
2981 (clear_dlls): Adjust to all_dlls type change.
2982 * server.c (emit_dll_description): Remove.
2983 (handle_qxfer_libraries): Adjust to all_dlls type change,
2984 integrate emit_dll_description's functionality.
2986 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2988 * linux-low.h (struct linux_target_ops) <delete_process>: New
2990 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2991 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2992 (struct linux_target_ops): Add delete_process callback.
2993 * linux-arm-low.c (arm_delete_process): New.
2994 (struct linux_target_ops): Add delete_process callback.
2995 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2996 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2997 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2998 * linux-mips-low.c (mips_linux_delete_process): New.
2999 (struct linux_target_ops): Add delete_process callback.
3000 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3001 * linux-s390-low.c (struct linux_target_ops): Likewise.
3002 * linux-sh-low.c (struct linux_target_ops): Likewise.
3003 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3004 * linux-tile-low.c (struct linux_target_ops): Likewise.
3005 * linux-x86-low.c (x86_linux_delete_process): New.
3006 (struct linux_target_ops): Add delete_process callback.
3007 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3009 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3011 * linux-aarch64-low.c (the_low_target): Add thread delete
3013 * linux-arm-low.c (arm_delete_thread): New function.
3014 (the_low_target): Add thread delete callback.
3015 * linux-bfin-low.c (the_low_target): Likewise.
3016 * linux-crisv32-low.c (the_low_target): Likewise.
3017 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3019 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3021 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3022 * linux-mips-low.c (mips_linux_delete_thread): New function.
3023 (the_low_target): Add thread delete callback.
3024 * linux-ppc-low.c (the_low_target): Likewise.
3025 * linux-s390-low.c (the_low_target): Likewise.
3026 * linux-sh-low.c (the_low_target): Likewise.
3027 * linux-tic6x-low.c (the_low_target): Likewise.
3028 * linux-tile-low.c (the_low_target): Likewise.
3029 * linux-x86-low.c (the_low_target): Likewise.
3030 * linux-xtensa-low.c (the_low_target): Likewise.
3032 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3034 * win32-low.c: Include "common-inferior.h".
3036 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3038 * inferiors.c (set_inferior_cwd): New function.
3039 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3040 (handle_query): Inform that QSetWorkingDir is supported.
3041 * win32-low.c (create_process): Pass the inferior's cwd to
3044 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3046 * inferiors.c (current_inferior_cwd): New global variable.
3047 (get_inferior_cwd): New function.
3048 * inferiors.h (struct process_info) <cwd>: New field.
3050 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3052 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3053 (OBS): Add gdb_tilde_expand.o.
3055 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3057 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3058 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3060 2017-09-29 Pedro Alves <palves@redhat.com>
3062 * ax.c (gdb_parse_agent_expr): Constify.
3063 * ax.h (gdb_parse_agent_expr): Constify.
3064 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3066 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3067 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3068 * remote-utils.h (read_ptid): Constify.
3069 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3070 (process_point_options, process_serial_event): Constify.
3071 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3072 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3073 (cmd_qtbuffer): Constify.
3075 2017-09-29 Pedro Alves <palves@redhat.com>
3077 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3080 2017-09-29 Pedro Alves <palves@redhat.com>
3082 * linux-low.c (handle_extended_wait): Pass parent thread instead
3083 of process to thread_db_notice_clone.
3084 * linux-low.h (thread_db_notice_clone): Replace parent process
3085 parameter with parent thread parameter.
3086 * thread-db.c (find_one_thread): Add comment.
3087 (thread_db_notice_clone): Replace parent process parameter with
3088 parent thread parameter. Temporarily switch to the parent thread.
3090 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3092 * gdbthread.h: Include "common-gdbthread.h".
3093 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3094 "if" when validating the ptid.
3095 * remote-utils.c: Include "gdbthread.h".
3096 (prepare_resume_reply): Use "switch_to_thread".
3097 * target.c (done_accessing_memory): Likewise.
3099 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3101 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3102 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3103 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3104 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3105 s390x-gs-linux64-ipa.o to ipa_obj.
3106 * linux-s390-low.c (HWCAP_S390_GS): New define.
3107 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3109 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3110 (s390_arch_setup): Check for guarded-storage support and choose
3112 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3113 init_registers_s390x_gs_linux64.
3114 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3116 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3117 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3119 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3121 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3123 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3125 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3126 (thread_db_thread_handle): Declare.
3127 * linux-low.c (linux_target_ops): Initialize thread_handle.
3128 * server.c (handle_qxfer_threads_worker): Add support for
3130 * target.h (struct target_ops): Add new function pointer,
3132 (target_thread_handle): Define.
3133 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3135 (thread_db_thread_handle): New function.
3137 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3139 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3140 * linux-low.h (thread_db_notice_clone): Declare.
3141 * thread-db.c (thread_db_notice_clone): New function.
3143 2017-09-21 Pedro Alves <palves@redhat.com>
3145 * server.c (gdb_read_memory, handle_status, process_serial_event)
3146 (handle_serial_event, handle_target_event): Adjust to
3147 set_desired_thread prototype change.
3148 * target.c (set_desired_thread): Remove 'use_general' parameter
3150 * target.h (set_desired_thread): Remove 'use_general' parameter.
3152 2017-09-20 Tom Tromey <tom@tromey.com>
3154 * target.c (target_terminal::terminal_state): Define.
3155 (target_terminal::init): Rename from target_terminal_init.
3156 (target_terminal::inferior): Rename from
3157 target_terminal_inferior.
3158 (target_terminal::ours): Rename from target_terminal_ours.
3159 (target_terminal::ours_for_output, target_terminal::info): New.
3161 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3163 * server.c (accumulate_file_name_length): Remove.
3164 (emit_dll_description): Adjust to std::string change.
3165 (handle_qxfer_libraries): Use std::string to hold document.
3167 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3169 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3170 return type of xml_escape_text.
3171 * server.c (emit_dll_description): Likewise.
3173 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3175 * server.c (captured_main): Accept argument for --selftest.
3176 Update run_tests call.
3177 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3178 when registering selftests.
3180 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3182 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3183 instead of "VEC" for "target_desc.reg_defs".
3184 (regcache_cpy): Likewise.
3185 (registers_to_string): Likewise.
3186 (registers_from_string): Likewise.
3187 (find_regno): Likewise.
3188 (supply_regblock): Likewise.
3189 (regcache_raw_read_unsigned): Likewise.
3190 * tdesc.c (init_target_desc): Likewise.
3191 (tdesc_create_reg): Likewise.
3192 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3193 (struct target_desc) <reg_defs>: Convert to "std::vector".
3194 (target_desc): Do not initialize "reg_defs".
3195 (~target_desc): Update code to use "std::vector" instead of "VEC"
3196 for "target_desc.reg_defs".
3197 (operator==): Likewise.
3199 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3201 * inferiors.h (thread_to_gdb_id): Remove.
3202 * inferiors.c (thread_to_gdb_id): Remove.
3203 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3204 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3205 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3207 * nto-low.c (nto_fetch_registers, nto_store_registers,
3208 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3210 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3212 * inferiors.h (gdb_id_to_thread_id): Remove.
3213 * inferiors.c (gdb_id_to_thread_id): Remove.
3214 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3215 removal. Move pid declaration closer to where it's used.
3217 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3219 * server.c (handle_detach): New function.
3220 (process_serial_event): Move code out, call handle_detach.
3222 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3224 * server.c (require_running): Rename to ...
3225 (require_running_or_return): ... this ...
3226 (require_running_or_break): ... and this.
3227 (handle_query, process_serial_event): Adjust.
3229 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3231 * linux-low.c (linux_set_resume_request): Remove unused
3234 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3236 * server.c (first_thread_of): Remove.
3237 (process_serial_event): Replace usage of first_thread_of with
3238 find_any_thread_of_pid.
3239 * tracepoint.c (same_process_p): Remove.
3240 (gdb_agent_about_to_close): Replace usage of same_process_p with
3241 find_any_thread_of_pid.
3242 * linux-x86-low.c (same_process_callback): Remove.
3243 (x86_arch_setup_process_callback): Replace usage of
3244 same_process_callback with find_any_thread_of_pid.
3245 * thread-db.c (any_thread_of): Remove.
3246 (switch_to_process): Replace usage of any_thread_of with
3247 find_any_thread_of_pid.
3248 * inferiors.c (thread_pid_matches_callback): Remove.
3249 (find_thread_process): Adjust to use find_any_thread_of_pid.
3251 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3253 * regcache.c (get_thread_regcache): Guard calls to "memset"
3256 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3258 * linux-low.c (handle_extended_wait): Use
3259 "allocate_target_description" instead of "XNEW".
3260 * linux-x86-low.c (initialize_low_arch): Likewise.
3262 2017-09-05 Yao Qi <yao.qi@linaro.org>
3264 * configure.srv (srv_i386_regobj): Remove.
3265 (srv_amd64_regobj): Remove.
3266 (srv_regobj): Set it to "" for x86 non-linux targets.
3267 * linux-x86-tdesc.c (i386_linux_read_description):
3268 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3269 (init_registers_i386): Remove the declaration.
3270 (tdesc_i386): Remove the declaration.
3271 (lynx_i386_arch_setup): Call i386_create_target_description.
3272 * nto-x86-low.c: Likewise.
3273 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3274 [!__x86_64__]: include arch/i386.h.
3275 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3277 2017-09-05 Yao Qi <yao.qi@linaro.org>
3279 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3280 i386/amd64-XXX-linux from it.
3282 2017-09-05 Yao Qi <yao.qi@linaro.org>
3284 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3286 (ipa_amd64_linux_regobj): Remove.
3287 (ipa_x32_linux_regobj): Remove.
3289 2017-09-05 Yao Qi <yao.qi@linaro.org>
3291 * Makefile.in (arch-amd64.o): New rule.
3292 * configure.srv: Append arch-amd64.o.
3293 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3294 (get_ipa_tdesc): Call amd64_linux_read_description.
3295 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3296 and init_registers_amd64_XXX.
3297 * linux-x86-low.c (x86_linux_read_description): Call
3298 amd64_linux_read_description.
3299 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3300 (initialize_low_arch): Don't call init_registers_x32_XXX and
3301 init_registers_amd64_XXX.
3302 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3303 and tdesc_amd64_XXX.
3304 [__x86_64__] (amd64_tdesc_test): New function.
3305 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3306 and init_registers_amd64_XXX.
3307 * linux-x86-tdesc.c: Include arch/amd64.h.
3308 (xcr0_to_tdesc_idx): New function.
3309 (i386_linux_read_description): New function.
3310 (amd64_get_ipa_tdesc_idx): New function.
3311 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3312 (amd64_get_ipa_tdesc): Declare.
3314 2017-09-05 Yao Qi <yao.qi@linaro.org>
3316 * configure.srv (srv_i386_linux_xmlfiles): Remove
3317 i386/i386-XXX-linux.xml from it.
3319 2017-09-05 Yao Qi <yao.qi@linaro.org>
3321 * configure.srv: Set srv_i386_linux_regobj empty if $development
3323 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3324 initialize_low_tdesc.
3325 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3326 with #if initialize_low_tdesc.
3327 * linux-x86-tdesc-selftest.c: New file.
3328 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3330 2017-09-05 Yao Qi <yao.qi@linaro.org>
3332 * Makefile.in (arch-i386.o): New rule.
3333 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3334 (x86_64-*-linux*): Likewise.
3335 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3336 include arch/i386.h.
3337 (i386_linux_read_description): Remove code and call
3338 i386_create_target_description.
3339 * tdesc.c (allocate_target_description): New function.
3340 * tdesc.h (set_tdesc_architecture): Remove declaration.
3341 (set_tdesc_osabi): Likewise.
3343 2017-09-05 Yao Qi <yao.qi@linaro.org>
3345 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3346 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3347 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3349 * server.c (get_features_xml): Call tdesc_get_features_xml.
3350 * tdesc.c (set_tdesc_architecture): New function.
3351 (set_tdesc_osabi): New function.
3352 (tdesc_get_features_xml): New function.
3353 (tdesc_create_feature): Add an argument.
3354 * tdesc.h (struct target_desc) <features>: New field.
3355 <arch, osabi>: New field.
3356 (~target_desc): xfree features, arch, and osabi.
3357 (target_desc::oerator==): Don't compare .xmltarget.
3358 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3359 (set_tdesc_osabi): Likewise.
3360 (tdesc_get_features_xml): Likewise.
3362 2017-09-05 Yao Qi <yao.qi@linaro.org>
3364 * linux-x86-tdesc.c: Include selftest.h.
3365 (i386_tdesc_test): New function.
3366 (initialize_low_tdesc): Call selftests::register_test.
3367 * tdesc.h: Include regdef.h.
3368 (target_desc): Override operator == and !=.
3370 2017-09-05 Yao Qi <yao.qi@linaro.org>
3372 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3373 (ipa_obj): Likewise.
3374 * linux-i386-ipa.c: Include common/x86-xstate.h
3375 (get_ipa_tdesc): Call i386_linux_read_description.
3376 (initialize_low_tracepoint): Don't call init_registers_XXX
3377 functions, call initialize_low_tdesc instead.
3378 * linux-x86-low.c (x86_linux_read_description): Call
3379 i386_linux_read_description.
3380 (initialize_low_arch): Don't call init_registers_i386_XXX
3381 functions, call initialize_low_tdesc.
3382 * linux-x86-tdesc.c: New file.
3383 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3384 (i386_get_ipa_tdesc_idx): Declare.
3385 (i386_get_ipa_tdesc): Declare.
3386 (initialize_low_tdesc): Declare.
3388 2017-09-05 Yao Qi <yao.qi@linaro.org>
3390 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3393 2017-09-05 Yao Qi <yao.qi@linaro.org>
3395 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3396 * regcache.c (get_thread_regcache): Use VEC_length.
3397 (init_register_cache): Likewise.
3398 (regcache_cpy): Likewise.
3399 (registers_to_string): Iterate reg_defs via VEC_iterate.
3400 (find_regno): Likewise.
3401 (find_register_by_number): Use VEC_index.
3402 (register_size): Call find_register_by_number.
3403 (register_data): Call find_register_by_number.
3404 (supply_regblock): Use VEC_length.
3405 (regcache_raw_read_unsigned): Likewise.
3406 * tdesc.c (init_target_desc): Iterate reg_defs via
3408 (default_description): Update initializer.
3409 (copy_target_description): Don't update field num_registers.
3410 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3411 <num_registers>: Remove.
3413 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3415 * Makefile.in (.SECONDARY): Define target.
3417 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3419 * linux-low.c (linux_wait_1): Adjust.
3420 * server.c (queue_stop_reply_callback): Adjust.
3422 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3424 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3425 QEnvironmentUnset and QEnvironmentReset packets.
3426 (handle_query): Inform remote that QEnvironmentHexEncoded,
3427 QEnvironmentUnset and QEnvironmentReset are supported.
3429 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3431 * inferiors.h (inferior_target_data): Rename to ...
3432 (thread_target_data): ... this.
3433 (inferior_regcache_data): Rename to ...
3434 (thread_regcache_data): ... this.
3435 (set_inferior_regcache_data): Rename to ...
3436 (set_thread_regcache_data): ... this.
3437 * inferiors.c (inferior_target_data): Rename to ...
3438 (thread_target_data): ... this.
3439 (inferior_regcache_data): Rename to ...
3440 (thread_regcache_data): ... this.
3441 (set_inferior_regcache_data): Rename to ...
3442 (set_thread_regcache_data): ... this.
3443 (free_one_thread): Update.
3444 * linux-low.h (get_thread_lwp): Update.
3445 * regcache.c (get_thread_regcache): Update.
3446 (regcache_invalidate_thread): Update.
3447 (free_register_cache_thread): Update.
3448 * win32-i386-low.c (update_debug_registers_callback): Update.
3449 (win32_get_current_dr): Update.
3450 * win32-low.c (thread_rec): Update.
3451 (delete_thread_info): Update.
3452 (continue_one_thread): Update.
3453 (suspend_one_thread): Update.
3455 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3457 * inferiors.c (set_inferior_target_data): Remove.
3458 * inferiors.h (set_inferior_target_data): Remove.
3460 2017-08-18 Yao Qi <yao.qi@linaro.org>
3462 * Makefile.in (OBS): Add selftest.o.
3463 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3464 * configure, config.in: Re-generated.
3465 * server.c: Include common/sefltest.h.
3466 (captured_main): Handle option --selftest.
3468 2017-08-09 Yao Qi <yao.qi@linaro.org>
3470 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3471 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3472 i386-avx-mpx.o and i386-mmx.o.
3473 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3474 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3475 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3476 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3477 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3478 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3479 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3480 i386/amd64-avx-mpx.xml.
3482 2017-08-09 Yao Qi <yao.qi@linaro.org>
3484 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3485 and x32-avx-avx512.o.
3486 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3487 i386/x32-avx-avx512.xml.
3489 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3491 * tracepoint.h (enum class fast_tpoint_collect_result): New
3493 (fast_tracepoint_collecting): Change return type to
3494 fast_tpoint_collect_result.
3495 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3496 * linux-low.h: Include tracepoint.h.
3497 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3498 fast_tpoint_collect_result.
3499 * linux-low.c (handle_tracepoints): Adjust.
3500 (linux_fast_tracepoint_collecting): Change return type to
3501 fast_tpoint_collect_result.
3502 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3503 linux_wait_1, stuck_in_jump_pad_callback,
3504 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3505 proceed_one_lwp): Adjust to type change.
3507 2017-07-10 Yao Qi <yao.qi@linaro.org>
3509 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3511 2017-06-29 Yao Qi <yao.qi@linaro.org>
3513 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3515 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3517 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3519 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3521 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3523 * linux-low.c (linux_create_inferior): Adjust code to access the
3524 environment information via 'gdb_environ' class.
3525 * lynx-low.c (lynx_create_inferior): Likewise.
3526 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3527 (get_environ): Return a pointer to 'our_environ'.
3528 (captured_main): Initialize 'our_environ'.
3529 * server.h (get_environ): Adjust prototype.
3530 * spu-low.c (spu_create_inferior): Adjust code to access the
3531 environment information via 'gdb_environ' class.
3533 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3535 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3536 usage of "register" keyword.
3538 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3540 * configure: Re-generate.
3542 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3544 * configure: Re-generate.
3546 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3548 * Makefile.in (COMPILE.pre): Add "-x c++".
3550 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3552 * fork-child.c: Conditionally include <signal.h>.
3554 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3556 * server.c (handle_general_set): Handle new packet
3557 "QStartupWithShell".
3558 (handle_query): Add "QStartupWithShell" to the list of supported
3560 (gdbserver_usage): Add help text explaining the
3561 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3563 (captured_main): Recognize and act upon the presence of the new
3566 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3567 Pedro Alves <palves@redhat.com>
3569 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3570 * configure: Regenerate.
3571 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3573 (i[34567]86-*-lynxos*): Likewise.
3574 (spu*-*-*): Likewise.
3575 * fork-child.c: New file.
3576 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3578 (linux_ptrace_fun): New function.
3579 (linux_create_inferior): Adjust function prototype to reflect
3580 change on "target.h". Adjust function code to use
3582 (linux_request_interrupt): Delete "signal_pid".
3583 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3584 (lynx_ptrace_fun): New function.
3585 (lynx_create_inferior): Adjust function prototype to reflect
3586 change on "target.h". Adjust function code to use
3588 * nto-low.c (nto_create_inferior): Adjust function prototype and
3589 code to reflect change on "target.h". Update comments.
3590 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3591 "common-terminal.h" and "environ.h".
3592 (terminal_fd): Moved to fork-child.c.
3593 (old_foreground_pgrp): Likewise.
3594 (restore_old_foreground_pgrp): Likewise.
3595 (last_status): Make it global.
3596 (last_ptid): Likewise.
3597 (our_environ): New variable.
3598 (startup_with_shell): Likewise.
3599 (program_name): Likewise.
3600 (program_argv): Rename to...
3601 (program_args): ...this.
3602 (wrapper_argv): New variable.
3603 (start_inferior): Delete function.
3604 (get_exec_wrapper): New function.
3605 (get_exec_file): Likewise.
3606 (get_environ): Likewise.
3607 (prefork_hook): Likewise.
3608 (post_fork_inferior): Likewise.
3609 (postfork_hook): Likewise.
3610 (postfork_child_hook): Likewise.
3611 (handle_v_run): Update code to deal with arguments coming from the
3612 remote host. Update calls from "start_inferior" to
3614 (captured_main): Likewise. Initialize environment variable. Call
3616 * server.h (post_fork_inferior): New prototype.
3617 (get_environ): Likewise.
3618 (last_status): Declare.
3619 (last_ptid): Likewise.
3620 (signal_pid): Likewise.
3621 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3622 (spu_ptrace_fun): New function.
3623 (spu_create_inferior): Adjust function prototype to reflect change
3624 on "target.h". Adjust function code to use "fork_inferior".
3625 * target.c (target_terminal_init): New function.
3626 (target_terminal_inferior): Likewise.
3627 (target_terminal_ours): Likewise.
3628 * target.h: Include <vector>.
3629 (struct target_ops) <create_inferior>: Update prototype.
3630 (create_inferior): Update macro.
3631 * utils.c (gdb_flush_out_err): New function.
3632 * win32-low.c (win32_create_inferior): Adjust function prototype
3633 and code to reflect change on "target.h".
3635 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3637 * inferiors.c (switch_to_thread): New function.
3639 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3641 * Makefile.in (SFILE): Add "common/job-control.c".
3642 (OBS): Add "job-control.o".
3644 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3646 * Makefile: Remove "@host_makefile_frag@".
3648 2017-05-05 Pedro Alves <palves@redhat.com>
3650 * configure: Regenerate.
3652 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3654 * configure: Regenerate.
3656 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3658 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3659 software_single_step change of return type to
3660 std::vector<CORE_ADDR>.
3661 * linux-low.c (install_software_single_step_breakpoints):
3663 * linux-low.h (install_software_single_step_breakpoints):
3666 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3668 * remote-utils.c: Include "gdb_termios.h" instead of
3670 * terminal.h: Delete file.
3672 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3674 * server.c: Include <vector>.
3675 <program_argv, wrapper_argv>: Convert to std::vector.
3676 (start_inferior): Rewrite function to use C++.
3677 (handle_v_run): Likewise. Update code that calculates the argv
3678 based on the vRun packet; use C++.
3679 (captured_main): Likewise.
3681 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3683 * server.c (handle_v_cont): Initialize thread_resume::thread
3686 2017-04-05 Pedro Alves <palves@redhat.com>
3688 * configure: Regenerate.
3690 2017-04-05 Pedro Alves <palves@redhat.com>
3692 * gdbreplay.c (sync_error): Constify.
3693 * linux-x86-low.c (push_opcode): Constify.
3695 2017-04-05 Pedro Alves <palves@redhat.com>
3697 * win32-low.c (get_child_debug_event)
3698 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3699 Report TARGET_WAITKIND_SPURIOUS instead.
3701 2017-04-05 Pedro Alves <palves@redhat.com>
3703 * remote-utils.c (remote_prepare, remote_open): Constify.
3704 * remote-utils.h (remote_prepare, remote_open): Constify.
3705 * server.c (captured_main): Constify 'port' handling.
3707 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3709 * Makefile.in (clean): Clear .deps.
3711 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3713 * .gitignore: Remove generated files, replace with wildcard.
3714 * (clean): Replace removal of generated files with wildcard.
3715 (version.c): Replace with...
3716 (version-generated.c): ...this.
3717 (xml-builtin.c): Replace with...
3718 (xml-builtin-generated.c): ...this.
3719 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3720 (%.c: *regformats*): Replace with...
3721 (%-generated.c: *regformats*): ...this.
3723 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3725 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3726 (xtensa_fill_gregset): Call collect_register_by_name for
3728 (xtensa_store_gregset): Call supply_register_by_name for
3731 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3733 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3734 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3735 (xtensa_store_gregset): Call supply_register for all registers in
3736 a0_regnum..a0_regnum + C0_NREGS range.
3738 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3740 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3741 (ax-ipa.o: ax.c): Remove.
3742 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3743 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3744 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3745 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3746 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3748 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3750 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3751 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3752 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3753 (errors-ipa.o: ../common/errors.c): Remove.
3754 (format-ipa.o: ../common/format.c): Remove.
3755 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3757 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3759 * Makefile.in (%-ipa.o: %.c): New rule.
3760 (tracepoint-ipa.o: tracepoint.c): Remove.
3761 (utils-ipa.o: utils.c): Remove.
3762 (remote-utils-ipa.o: remote-utils.c): Remove.
3763 (regcache-ipa.o: regcache.c): Remove.
3764 (i386-linux-ipa.o: i386-linux.c): Remove.
3765 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3766 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3767 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3768 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3769 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3770 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3771 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3772 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3773 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3774 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3775 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3776 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3777 (aarch64-ipa.o: aarch64.c): Remove.
3778 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3779 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3780 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3781 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3782 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3783 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3784 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3785 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3786 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3787 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3788 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3789 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3790 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3791 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3792 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3793 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3794 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3795 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3796 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3797 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3798 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3799 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3800 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3801 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3802 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3803 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3804 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3805 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3806 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3807 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3808 (tdesc-ipa.o: tdesc.c): Remove.
3809 (x32-linux-ipa.o: x32-linux.c): Remove.
3810 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3811 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3813 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3815 * Makefile.in (%.o: ../arch/%.c): New rule.
3816 (arm.o: ../arch/arm.c): Remove.
3817 (arm-linux.o: ../arch/arm-linux.c): Remove.
3818 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3819 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3821 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3823 * Makefile.in (%.o: ../nat/%.c): New rule.
3824 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3825 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3826 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3827 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3828 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3829 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3830 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3831 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3832 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3833 (linux-personality.o: ../nat/linux-personality.c): Remove.
3834 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3835 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3836 (x86-linux.o: ../nat/x86-linux.c): Remove.
3837 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3838 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3840 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3842 * Makefile.in (%.o: ../common/%.c): New rule.
3843 (signals.o: ../common/signals.c): Remove.
3844 (print-utils.o: ../common/print-utils.c): Remove.
3845 (rsp-low.o: ../common/rsp-low.c): Remove.
3846 (common-utils.o: ../common/common-utils.c): Remove.
3847 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3848 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3849 (vec.o: ../common/vec.c): Remove.
3850 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3851 (xml-utils.o: ../common/xml-utils.c): Remove.
3852 (ptid.o: ../common/ptid.c): Remove.
3853 (buffer.o: ../common/buffer.c): Remove.
3854 (format.o: ../common/format.c): Remove.
3855 (filestuff.o: ../common/filestuff.c): Remove.
3856 (agent.o: ../common/agent.c): Remove.
3857 (errors.o: ../common/errors.c): Remove.
3858 (environ.o: ../common/environ.c): Remove.
3859 (common-debug.o: ../common/common-debug.c): Remove.
3860 (cleanups.o: ../common/cleanups.c): Remove.
3861 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3862 (fileio.o: ../common/fileio.c): Remove.
3863 (common-regcache.o: ../common/common-regcache.c): Remove.
3864 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3865 (new-op.o: ../common/new-op.c): Remove.
3866 (btrace-common.o: ../common/btrace-common.c): Remove.
3868 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3870 * Makefile.in (%.o: ../target/%.c): New rule.
3871 (waitstatus.o: ../target/waitstatus.c): Remove.
3873 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3876 (%.c: ../regformats/%.dat,
3877 (%.c: ../regformats/arm/%.dat,
3878 (%.c: ../regformats/i386/%.dat,
3879 (%.c: ../regformats/rs6000/%.dat): New rules.
3880 (aarch64.c): Remove.
3881 (reg-arm.c): Remove.
3882 (arm-with-iwmmxt.c): Remove.
3883 (arm-with-vfpv2.c): Remove.
3884 (arm-with-vfpv3.c): Remove.
3885 (arm-with-neon.c): Remove.
3886 (reg-bfin.c): Remove.
3887 (reg-cris.c): Remove.
3888 (reg-crisv32.c): Remove.
3890 (i386-linux.c): Remove.
3891 (i386-avx.c): Remove.
3892 (i386-avx-linux.c): Remove.
3893 (i386-avx-avx512.c): Remove.
3894 (i386-avx-avx512-linux.c): Remove.
3895 (i386-mpx.c): Remove.
3896 (i386-mpx-linux.c): Remove.
3897 (i386-avx-mpx-avx512-pku.c): Remove.
3898 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3899 (i386-avx-mpx.c): Remove.
3900 (i386-avx-mpx-linux.c): Remove.
3901 (i386-mmx.c): Remove.
3902 (i386-mmx-linux.c): Remove.
3903 (reg-ia64.c): Remove.
3904 (reg-m32r.c): Remove.
3905 (reg-m68k.c): Remove.
3907 (mips-linux.c): Remove.
3908 (mips-dsp-linux.c): Remove.
3909 (mips64-linux.c): Remove.
3910 (mips64-dsp-linux.c): Remove.
3911 (nios2-linux.c): Remove.
3912 (powerpc-32.c): Remove.
3913 (powerpc-32l.c): Remove.
3914 (powerpc-altivec32l.c): Remove.
3915 (powerpc-cell32l.c): Remove.
3916 (powerpc-vsx32l.c): Remove.
3917 (powerpc-isa205-32l.c): Remove.
3918 (powerpc-isa205-altivec32l.c): Remove.
3919 (powerpc-isa205-vsx32l.c): Remove.
3920 (powerpc-e500l.c): Remove.
3921 (powerpc-64l.c): Remove.
3922 (powerpc-altivec64l.c): Remove.
3923 (powerpc-cell64l.c): Remove.
3924 (powerpc-vsx64l.c): Remove.
3925 (powerpc-isa205-64l.c): Remove.
3926 (powerpc-isa205-altivec64l.c): Remove.
3927 (powerpc-isa205-vsx64l.c): Remove.
3928 (s390-linux32.c): Remove.
3929 (s390-linux32v1.c): Remove.
3930 (s390-linux32v2.c): Remove.
3931 (s390-linux64.c): Remove.
3932 (s390-linux64v1.c): Remove.
3933 (s390-linux64v2.c): Remove.
3934 (s390-te-linux64.c): Remove.
3935 (s390-vx-linux64.c): Remove.
3936 (s390-tevx-linux64.c): Remove.
3937 (s390x-linux64.c): Remove.
3938 (s390x-linux64v1.c): Remove.
3939 (s390x-linux64v2.c): Remove.
3940 (s390x-te-linux64.c): Remove.
3941 (s390x-vx-linux64.c): Remove.
3942 (s390x-tevx-linux64.c): Remove.
3943 (tic6x-c64xp-linux.c): Remove.
3944 (tic6x-c64x-linux.c): Remove.
3945 (tic6x-c62x-linux.c): Remove.
3947 (reg-sparc64.c): Remove.
3948 (reg-spu.c): Remove.
3950 (amd64-linux.c): Remove.
3951 (amd64-avx.c): Remove.
3952 (amd64-avx-linux.c): Remove.
3953 (amd64-avx-avx512.c): Remove.
3954 (amd64-avx-avx512-linux.c): Remove.
3955 (amd64-mpx.c): Remove.
3956 (amd64-mpx-linux.c): Remove.
3957 (amd64-avx-mpx-avx512-pku.c): Remove.
3958 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3959 (amd64-avx-mpx.c): Remove.
3960 (amd64-avx-mpx-linux.c): Remove.
3962 (x32-linux.c): Remove.
3963 (x32-avx.c): Remove.
3964 (x32-avx-linux.c): Remove.
3965 (x32-avx-avx512.c): Remove.
3966 (x32-avx-avx512-linux.c): Remove.
3967 (reg-xtensa.c): Remove.
3968 (reg-tilegx.c): Remove.
3969 (reg-tilegx32.c): Remove.
3971 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3973 * Makefile.in (SFILES): Add "common/environ.c".
3974 (OBJS): Add "common/environ.h".
3976 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3978 * configure.ac: Check if the fs_base and gs_base members of
3979 `struct user_regs_struct' exist.
3980 * config.in: Regenerated.
3981 * configure: Likewise.
3983 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3985 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3987 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3988 (get_next_pcs_syscall_next_pc): Likewise.
3990 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3992 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3993 * nto-x86-low.c: Likewise.
3995 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3997 * Makefile.in: Include disable-implicit-rules.mk.
3999 2016-11-23 Pedro Alves <palves@redhat.com>
4001 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4002 (debug_vprintf): Use std::chrono::steady_clock instead of
4003 gettimeofday. Use '.' instead of ':'.
4004 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4005 (get_timestamp): Use std::chrono::steady_clock instead of
4008 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4010 * Makefile.in: Fix whitespace formatting.
4012 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4014 * Makefile.in (SFILES, OBS): Flatten list and order
4017 2016-11-23 Pedro Alves <palves@redhat.com>
4019 * event-loop.c (handle_file_event): Use warning.
4020 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4021 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4024 2016-11-23 Pedro Alves <palves@redhat.com>
4026 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4028 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4029 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4030 debug_printf and debug_flush for debug output.
4031 * server.c (handle_general_set): Likewise.
4032 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4035 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4037 * Makefile.in (.c.o): Replace rule with ...
4038 (%.o: %.c): ... this one.
4040 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4042 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4043 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4045 * configure.ac: Remove checks for the make program.
4046 * configure: Re-generate.
4048 2016-10-28 Pedro Alves <palves@redhat.com>
4050 * Makefile.in (CXX_DIALECT): Get from configure.
4051 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4052 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4053 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4054 * config.in: Regenerate.
4055 * configure: Regenerate.
4057 2016-10-27 Yao Qi <yao.qi@linaro.org>
4059 * linux-low.c (linux_supports_range_stepping): Return true if
4060 can_software_single_step return true.
4062 2016-10-27 Yao Qi <yao.qi@linaro.org>
4064 * inferiors.c (find_inferior_in_random): New function.
4065 * inferiors.h (find_inferior_in_random): Declare.
4066 * linux-low.c (linux_wait_for_event_filtered): Call
4067 find_inferior_in_random instead of find_inferior.
4069 2016-10-27 Yao Qi <yao.qi@linaro.org>
4071 * linux-low.c (linux_wait_1): If single-step breakpoints are
4072 inserted, remove them.
4074 2016-10-26 Pedro Alves <palves@redhat.com>
4076 * linux-low.c (handle_extended_wait): Link parent/child fork
4078 (linux_wait_1): Unlink them.
4079 (linux_set_resume_request): Ignore resume requests for
4080 already-resumed and unhandled fork child threads.
4081 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4082 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4084 (handle_v_requests) <vCont>: Don't call require_running.
4085 * server.h (in_queued_stop_replies): New declaration.
4087 2016-10-24 Yao Qi <yao.qi@linaro.org>
4090 * linux-aarch64-low.c (append_insns): Cast the return value to
4093 2016-10-10 Yao Qi <yao.qi@linaro.org>
4095 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4097 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4099 * target.c (target_supports_multi_process): New function, moved
4101 * target.h (target_supports_multi_process): ... here. Remove
4104 2016-10-05 Tom Tromey <tom@tromey.com>
4107 * tracepoint.c (handle_tracepoint_bkpts): Check
4108 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4110 2016-10-05 Yao Qi <yao.qi@linaro.org>
4112 * configure.srv: Update the path of arm-*.xml files.
4114 2016-10-05 Terry Guo <terry.guo@arm.com>
4115 Yao Qi <yao.qi@linaro.org>
4117 * Makefile.in: Adjust the path of rules.
4118 * configure.srv: Update the path of xml files.
4119 * regformats/arm-with-iwmmxt.dat: Regenerated.
4120 * regformats/arm-with-neon.dat: Likewise.
4121 * regformats/arm-with-vfpv2.dat: Likewise.
4122 * regformats/arm-with-vfpv3.dat Likewise.
4124 2016-09-30 Yao Qi <yao.qi@linaro.org>
4127 * target.c (target_stop_and_wait): Don't call
4128 target_continue_no_signal, use resume_stop instead.
4130 2016-09-26 Yao Qi <yao.qi@linaro.org>
4132 * linux-low.c (linux_wait_1): Call debug_exit.
4134 2016-09-23 Pedro Alves <palves@redhat.com>
4136 * Makefile.in (SFILES): Add common/new-op.c.
4137 (OBS): Add common/new-op.o.
4138 (new-op.o): New rule.
4140 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4142 * .gitinore: Ignore more files.
4144 2016-09-21 Yao Qi <yao.qi@linaro.org>
4146 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4149 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4151 * server.c (start_inferior): Call target_mourn_inferior instead of
4152 mourn_inferior; pass ptid_t argument to it.
4154 (handle_target_event): Likewise.
4155 * target.c (target_mourn_inferior): New function.
4156 * target.h (mourn_inferior): Delete macro.
4158 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4160 * linux-low.c (lwp_is_stepping): New function.
4162 2016-09-06 Carl Love <cel@us.ibm.com>
4164 * server.c (start_inferior): Fixed comment, requested comment change
4165 didn't get updated correctly. Removed reference to ptrace () call as
4166 it is only true on Linux systems.
4168 2016-09-06 Carl Love <cel@us.ibm.com>
4170 * server.c (start_inferior): Do not call
4171 function target_post_create_inferior () if the
4172 inferior process has already exited.
4174 2016-09-05 Pedro Alves <palves@redhat.com>
4176 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4177 (COMPILE.pre, CC_LD): Use CXX directly.
4178 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4179 * acinclude.m4: Don't include build-with-cxx.m4.
4180 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4181 * configure: Regenerate.
4183 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4186 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4187 call writing data to own_buf.
4189 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4191 * target.c (mywait): Call target_wait instead of
4193 (target_wait): New function.
4195 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4197 * server.c (start_inferior): New variable 'ptid'. Replace calls
4198 to the_target->resume by target_continue{,_no_signal}, depending
4200 * target.c (target_stop_and_wait): Call target_continue_no_signal
4201 instead of the_target->resume.
4202 (target_continue): New function.
4204 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4206 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4208 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4211 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4213 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4214 * linux-arm-low.c (ps_get_thread_area): Likewise.
4215 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4216 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4217 * linux-mips-low.c (ps_get_thread_area): Likewise.
4218 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4219 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4220 * linux-x86-low.c (ps_get_thread_area): Likewise.
4221 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4223 2016-08-19 Pedro Alves <palves@redhat.com>
4225 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4227 2016-08-19 Pedro Alves <palves@redhat.com>
4229 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4230 comment. Use memcpy instead of casting through unsigned long.
4232 2016-08-19 Pedro Alves <palves@redhat.com>
4234 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4235 allocating around 0x80000000.
4237 2016-08-19 Pedro Alves <palves@redhat.com>
4240 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4241 (x32-avx512-linux-ipa.o): New rules.
4242 * configure.ac (x86_64-*-linux*): New x32 check.
4243 * configure.srv (ipa_x32_linux_regobj): New.
4244 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4245 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4247 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4249 * configure: Regenerate.
4251 2016-08-09 Pedro Alves <palves@redhat.com>
4254 * Makefile.in (OBS): Add signals-state-save-restore.o.
4255 (signals-state-save-restore.o): New rule.
4256 * config.in: Regenerate.
4257 * configure: Regenerate.
4258 * linux-low.c: Include "signals-state-save-restore.h".
4259 (linux_create_inferior): Call
4260 restore_original_signals_state.
4261 * server.c: Include "dispositions-save-restore.h".
4262 (captured_main): Call save_original_signals_state.
4264 2016-08-05 Pedro Alves <palves@redhat.com>
4266 * configure: Regenerate.
4268 2016-08-04 Yao Qi <yao.qi@linaro.org>
4270 * linux-low.c (regsets_fetch_inferior_registers): Check
4271 errno is ESRCH or not.
4273 2016-08-02 Yao Qi <yao.qi@linaro.org>
4275 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4276 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4277 (thread_db_load_search): Update.
4278 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4279 td_ta_set_event and td_ta_event_getmsg.
4281 2016-07-26 Pedro Alves <palves@redhat.com>
4284 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4285 of unsigned long for 64-bit registers and use uint32_t instead of
4286 unsigned int for 32-bit registers.
4288 2016-07-26 Pedro Alves <palves@redhat.com>
4290 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4293 2016-07-21 Tom Tromey <tom@tromey.com>
4295 * configure: Rebuild.
4297 2016-07-21 Yao Qi <yao.qi@linaro.org>
4299 * mem-break.c (find_gdb_breakpoint): Cast bp to
4300 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4302 2016-07-21 Yao Qi <yao.qi@linaro.org>
4304 * server.c (handle_v_requests): Support s and S actions
4305 if target_supports_software_single_step return true.
4307 2016-07-21 Yao Qi <yao.qi@linaro.org>
4309 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4310 is resume_step, call maybe_hw_step.
4311 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4313 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4315 (proceed_one_lwp): If resume request is resume_step, install
4316 reinsert breakpoints and call maybe_hw_step.
4318 2016-07-21 Yao Qi <yao.qi@linaro.org>
4320 * linux-low.c (proceed_one_lwp): Declare.
4321 (linux_resume_one_thread): Remove local variable 'step'.
4322 Lift code enqueue signal. Call proceed_one_lwp instead of
4323 linux_resume_one_lwp.
4325 2016-07-21 Yao Qi <yao.qi@linaro.org>
4327 * linux-low.c (linux_resume_one_thread): Call
4328 enqueue_pending_signal.
4330 2016-07-21 Yao Qi <yao.qi@linaro.org>
4332 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4333 * inferiors.c (do_restore_current_thread_cleanup): New function.
4334 (make_cleanup_restore_current_thread): Likewise.
4335 * linux-low.c (install_software_single_step_breakpoints): Call
4336 make_cleanup_restore_current_thread. Switch current_thread to
4339 2016-07-21 Yao Qi <yao.qi@linaro.org>
4341 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4342 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4343 (clone_one_breakpoint): Likewise.
4344 (delete_reinsert_breakpoints): Change parameter to thread.
4346 (has_reinsert_breakpoints): Likewise.
4347 (uninsert_reinsert_breakpoints): Likewise.
4348 (reinsert_reinsert_breakpoints): Likewise.
4349 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4350 (delete_reinsert_breakpoints): Likewise.
4351 (reinsert_reinsert_breakpoints): Likewise.
4352 (uninsert_reinsert_breakpoints): Likewise.
4353 (has_reinsert_breakpoints): Likewise.
4355 2016-07-21 Yao Qi <yao.qi@linaro.org>
4357 * inferiors.c (get_thread_process): Make parameter const.
4358 * inferiors.h (get_thread_process): Update declaration.
4359 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4360 Add new parameters child_thread and parent_thread. Callers
4362 * mem-break.h (clone_all_breakpoints): Update declaration.
4364 2016-07-21 Yao Qi <yao.qi@linaro.org>
4366 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4367 <command_list, handler>: Remove.
4368 (struct gdb_breakpoint): New.
4369 (struct other_breakpoint): New.
4370 (struct reinsert_breakpoint): New.
4371 (is_gdb_breakpoint): New function.
4372 (any_persistent_commands): Update command_list if
4373 is_gdb_breakpoint returns true.
4374 (set_breakpoint): Create breakpoints according to their types.
4375 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4376 (set_gdb_breakpoint_1): Likewise.
4377 (set_gdb_breakpoint): Likewise.
4378 (clear_breakpoint_conditions): Change parameter type to
4379 'struct gdb_breakpoint *'.
4380 (clear_breakpoint_commands): Likewise.
4381 (clear_breakpoint_conditions_and_commands): Likewise.
4382 (add_condition_to_breakpoint): Likewise.
4383 (add_breakpoint_condition): Likewise.
4384 (add_commands_to_breakpoint): Likewise.
4385 (check_breakpoints): Check other_breakpoint.
4386 (clone_one_breakpoint): Clone breakpopint according to its type.
4387 * mem-break.h (struct gdb_breakpoint): Declare.
4388 (set_gdb_breakpoint): Update declaration.
4389 (clear_breakpoint_conditions_and_commands): Likewise.
4390 (add_breakpoint_condition): Likewise.
4391 (add_breakpoint_commands): Likewise.
4392 * server.c (process_point_options): Change parameter type to
4393 'struct gdb_breakpoint *'.
4395 2016-07-21 Yao Qi <yao.qi@linaro.org>
4397 * mem-break.c (set_breakpoint_at): Rename it to ...
4398 (set_breakpoint_type_at): ... it.
4399 (set_breakpoint_at): Call set_breakpoint_type_at.
4400 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4401 * mem-break.h (set_breakpoint_at): Update comments.
4403 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4405 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4407 (nios2_store_gregset): Likewise.
4409 2016-07-01 Pedro Alves <palves@redhat.com>
4410 Antoine Tremblay <antoine.tremblay@ericsson.com>
4412 * linux-low.c: Change interface to take the target lwp_info
4413 pointer directly and return void. Handle detaching from a zombie
4415 (linux_detach_lwp_callback): New function.
4416 (linux_detach): Detach from the leader thread after detaching from
4419 2016-06-28 Yao Qi <yao.qi@linaro.org>
4421 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4422 for variable new_offset.
4423 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4424 (aarch64_ftrace_insn_reloc_cb): Likewise.
4425 (aarch64_ftrace_insn_reloc_tb): Likewise.
4426 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4427 PRIx64 instead of PRIx32.
4429 2016-06-28 Yao Qi <yao.qi@linaro.org>
4431 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4432 (the_low_target): Install arm_get_syscall_trapinfo.
4434 2016-06-28 Yao Qi <yao.qi@linaro.org>
4436 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4438 (the_low_target): Install aarch64_get_syscall_trapinfo.
4440 2016-06-28 Yao Qi <yao.qi@linaro.org>
4442 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4444 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4445 Remove parameter sysno.
4446 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4449 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4451 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4452 (s390_emit_ne_goto): Likewise.
4453 (s390_emit_lt_goto): Likewise.
4454 (s390_emit_le_goto): Likewise.
4455 (s390_emit_gt_goto): Likewise.
4456 (s390_emit_ge_goto): Likewise.
4457 (s390x_emit_eq_goto): Likewise.
4458 (s390x_emit_ne_goto): Likewise.
4459 (s390x_emit_lt_goto): Likewise.
4460 (s390x_emit_le_goto): Likewise.
4461 (s390x_emit_gt_goto): Likewise.
4462 (s390x_emit_ge_goto): Likewise.
4463 (s390_emit_ops_impl): Mark variable static.
4464 (s390x_emit_ops): Likewise.
4466 2016-06-17 Yao Qi <yao.qi@linaro.org>
4468 * linux-low.c (handle_extended_wait): Call
4469 uninsert_reinsert_breakpoints for the parent process. Remove
4470 reinsert breakpoints from the child process. Reinsert them to
4471 the parent process when vfork is done.
4472 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4473 (reinsert_reinsert_breakpoints): New function.
4474 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4475 (reinsert_reinsert_breakpoints): Declare.
4477 2016-06-17 Yao Qi <yao.qi@linaro.org>
4479 * linux-low.c (handle_extended_wait): If the parent is doing
4480 step-over, remove the reinsert breakpoints from the forked child.
4482 2016-06-17 Yao Qi <yao.qi@linaro.org>
4484 * linux-low.c (unsuspend_all_lwps): Declare.
4485 (linux_low_filter_event): If thread exited, call finish_step_over.
4486 If step-over is finished, unsuspend other threads.
4488 2016-06-17 Yao Qi <yao.qi@linaro.org>
4490 * linux-low.c (linux_resume_one_lwp_throw): Assert
4491 has_reinsert_breakpoints returns false.
4492 * mem-break.c (delete_disabled_breakpoints): Assert
4493 bp type isn't reinsert_breakpoint.
4495 2016-06-17 Yao Qi <yao.qi@linaro.org>
4497 * linux-low.c (maybe_hw_step): New function.
4498 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4499 (finish_step_over): Switch current_thread to lwp temporarily,
4500 and assert has_reinsert_breakpoints returns true.
4501 (proceed_one_lwp): Call maybe_hw_step.
4502 * mem-break.c (has_reinsert_breakpoints): New function.
4503 * mem-break.h (has_reinsert_breakpoints): Declare.
4505 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4507 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4509 2016-05-17 Yao Qi <yao.qi@linaro.org>
4511 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4512 instead of find_inferior.
4514 2016-05-05 Yao Qi <yao.qi@linaro.org>
4516 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4517 Initialize res to zero.
4519 2016-05-05 Yao Qi <yao.qi@linaro.org>
4521 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4524 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4526 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4527 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4528 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4530 2016-04-28 Par Olsson <par.olsson@windriver.com>
4531 Simon Marchi <simon.marchi@ericsson.com>
4533 * tracepoint.c (write_inferior_int8): New function.
4534 (cmd_qtenable_disable): Write enable flag using
4535 write_inferior_int8.
4537 2016-04-25 Yao Qi <yao.qi@linaro.org>
4539 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4540 (need_step_over_p): Return zero if the LWP has pending signals
4541 can be delivered on software single step target.
4543 2016-04-25 Yao Qi <yao.qi@linaro.org>
4545 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4546 return instead of error.
4548 2016-04-22 Yao Qi <yao.qi@linaro.org>
4550 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4553 2016-04-22 Yao Qi <yao.qi@linaro.org>
4555 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4556 signal when stepping over breakpoint with software single
4559 2016-04-21 Pedro Alves <palves@redhat.com>
4561 * linux-s390-low.c (s390_collect_ptrace_register)
4562 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4564 (s390_check_regset): Use void * instead of gdb_byte *.
4566 2016-04-20 Pedro Alves <palves@redhat.com>
4568 * configure: Renegerate.
4570 2016-04-20 Yao Qi <yao.qi@linaro.org>
4572 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4573 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4575 (arm_store_gregset): Likewise.
4577 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4579 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4580 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4581 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4582 (amd64-avx-mpx-linux.c): New rules.
4583 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4584 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4585 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4586 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4587 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4588 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4589 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4590 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4591 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4592 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4593 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4594 * linux-x86-low.c (x86_linux_read_description): Add case for
4595 X86_XSTATE_AVX_MPX_MASK.
4596 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4597 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4598 init_registers_i386_avx_mpx_linux.
4599 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4600 (initialize_low_tracepoint): Call
4601 init_registers_i386_avx_mpx_linux.
4602 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4603 (initialize_low_tracepoint): Call
4604 init_registers_amd64_avx_mpx_linux.
4605 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4606 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4607 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4610 2016-04-18 Pedro Alves <palves@redhat.com>
4612 * configure: Regenerate.
4614 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4616 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4617 (aarch64_emit_sub): Likewise.
4619 2016-04-12 Pedro Alves <palves@redhat.com>
4621 * utils.c (prepare_to_throw_exception): Delete.
4623 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4625 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4627 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4629 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4631 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4633 * linux-aarch64-ipa.c: Add <elf.h> include.
4634 * linux-ppc-ipa.c: Add <elf.h> include.
4635 * linux-s390-ipa.c: Add <elf.h> include.
4637 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4639 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4640 (get_raw_reg_ptr): Likewise.
4641 (get_trace_state_variable_value_ptr): Likewise.
4642 (set_trace_state_variable_value_ptr): Likewise.
4643 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4646 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4647 Marcin Kościelnicki <koriakin@0x04.net>
4650 * linux-ppc-low.c (emit_insns): New function.
4651 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4652 (ppc_emit_prologue): New function.
4653 (ppc_emit_epilogue): New function.
4654 (ppc_emit_add): New function.
4655 (ppc_emit_sub): New function.
4656 (ppc_emit_mul): New function.
4657 (ppc_emit_lsh): New function.
4658 (ppc_emit_rsh_signed): New function.
4659 (ppc_emit_rsh_unsigned): New function.
4660 (ppc_emit_ext): New function.
4661 (ppc_emit_zero_ext): New function.
4662 (ppc_emit_log_not): New function.
4663 (ppc_emit_bit_and): New function.
4664 (ppc_emit_bit_or): New function.
4665 (ppc_emit_bit_xor): New function.
4666 (ppc_emit_bit_not): New function.
4667 (ppc_emit_equal): New function.
4668 (ppc_emit_less_signed): New function.
4669 (ppc_emit_less_unsigned): New function.
4670 (ppc_emit_ref): New function.
4671 (ppc_emit_const): New function.
4672 (ppc_emit_reg): New function.
4673 (ppc_emit_pop): New function.
4674 (ppc_emit_stack_flush): New function.
4675 (ppc_emit_swap): New function.
4676 (ppc_emit_stack_adjust): New function.
4677 (ppc_emit_call): New function.
4678 (ppc_emit_int_call_1): New function.
4679 (ppc_emit_void_call_2): New function.
4680 (ppc_emit_if_goto): New function.
4681 (ppc_emit_goto): New function.
4682 (ppc_emit_eq_goto): New function.
4683 (ppc_emit_ne_goto): New function.
4684 (ppc_emit_lt_goto): New function.
4685 (ppc_emit_le_goto): New function.
4686 (ppc_emit_gt_goto): New function.
4687 (ppc_emit_ge_goto): New function.
4688 (ppc_write_goto_address): New function.
4689 (ppc_emit_ops_impl): New static variable.
4690 (ppc64v1_emit_prologue): New function.
4691 (ppc64v2_emit_prologue): New function.
4692 (ppc64_emit_epilogue): New function.
4693 (ppc64_emit_add): New function.
4694 (ppc64_emit_sub): New function.
4695 (ppc64_emit_mul): New function.
4696 (ppc64_emit_lsh): New function.
4697 (ppc64_emit_rsh_signed): New function.
4698 (ppc64_emit_rsh_unsigned): New function.
4699 (ppc64_emit_ext): New function.
4700 (ppc64_emit_zero_ext): New function.
4701 (ppc64_emit_log_not): New function.
4702 (ppc64_emit_bit_and): New function.
4703 (ppc64_emit_bit_or): New function.
4704 (ppc64_emit_bit_xor): New function.
4705 (ppc64_emit_bit_not): New function.
4706 (ppc64_emit_equal): New function.
4707 (ppc64_emit_less_signed): New function.
4708 (ppc64_emit_less_unsigned): New function.
4709 (ppc64_emit_ref): New function.
4710 (ppc64_emit_const): New function.
4711 (ppc64v1_emit_reg): New function.
4712 (ppc64v2_emit_reg): New function.
4713 (ppc64_emit_pop): New function.
4714 (ppc64_emit_stack_flush): New function.
4715 (ppc64_emit_swap): New function.
4716 (ppc64v1_emit_call): New function.
4717 (ppc64v2_emit_call): New function.
4718 (ppc64v1_emit_int_call_1): New function.
4719 (ppc64v2_emit_int_call_1): New function.
4720 (ppc64v1_emit_void_call_2): New function.
4721 (ppc64v2_emit_void_call_2): New function.
4722 (ppc64_emit_if_goto): New function.
4723 (ppc64_emit_eq_goto): New function.
4724 (ppc64_emit_ne_goto): New function.
4725 (ppc64_emit_lt_goto): New function.
4726 (ppc64_emit_le_goto): New function.
4727 (ppc64_emit_gt_goto): New function.
4728 (ppc64_emit_ge_goto): New function.
4729 (ppc64v1_emit_ops_impl): New static variable.
4730 (ppc64v2_emit_ops_impl): New static variable.
4731 (ppc_emit_ops): New function.
4732 (linux_low_target): Wire in ppc_emit_ops.
4734 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4735 Marcin Kościelnicki <koriakin@0x04.net>
4738 * Makefile.in: Add powerpc-*-ipa.o
4739 * configure.srv: Add ipa_obj for powerpc*-linux.
4740 * linux-ppc-ipa.c: New file.
4741 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4743 (PPC_FIELD): New macro.
4744 (PPC_SEXT): New macro.
4745 (PPC_OP6): New macro.
4746 (PPC_BO): New macro.
4747 (PPC_LI): New macro.
4748 (PPC_BD): New macro.
4749 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4750 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4751 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4752 (ppc_get_thread_area): New function.
4753 (is_elfv2_inferior): New function.
4754 (gen_ds_form): New function.
4755 (GEN_STD): New macro.
4756 (GEN_STDU): New macro.
4757 (GEN_LD): New macro.
4758 (GEN_LDU): New macro.
4759 (gen_d_form): New function.
4760 (GEN_ADDI): New macro.
4761 (GEN_ADDIS): New macro.
4762 (GEN_LI): New macro.
4763 (GEN_LIS): New macro.
4764 (GEN_ORI): New macro.
4765 (GEN_ORIS): New macro.
4766 (GEN_LWZ): New macro.
4767 (GEN_STW): New macro.
4768 (GEN_STWU): New macro.
4769 (gen_xfx_form): New function.
4770 (GEN_MFSPR): New macro.
4771 (GEN_MTSPR): New macro.
4772 (GEN_MFCR): New macro.
4773 (GEN_MTCR): New macro.
4774 (GEN_SYNC): New macro.
4775 (GEN_LWSYNC): New macro.
4776 (gen_x_form): New function.
4777 (GEN_OR): New macro.
4778 (GEN_MR): New macro.
4779 (GEN_LWARX): New macro.
4780 (GEN_STWCX): New macro.
4781 (GEN_CMPW): New macro.
4782 (gen_md_form): New function.
4783 (GEN_RLDICL): New macro.
4784 (GEN_RLDICR): New macro.
4785 (gen_i_form): New function.
4787 (GEN_BL): New macro.
4788 (gen_b_form): New function.
4789 (GEN_BNE): New macro.
4790 (GEN_LOAD): New macro.
4791 (GEN_STORE): New macro.
4792 (gen_limm): New function.
4793 (gen_atomic_xchg): New function.
4794 (gen_call): New function.
4795 (ppc_relocate_instruction): New function.
4796 (ppc_install_fast_tracepoint_jump_pad): New function.
4797 (ppc_get_min_fast_tracepoint_insn_len): New function.
4798 (ppc_get_ipa_tdesc_idx): New function.
4799 (the_low_target): Wire in the new functions.
4800 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4802 * linux-ppc-tdesc.h: New file.
4804 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4806 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4807 (alloc_jump_pad_buffer): New function.
4808 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4809 (alloc_jump_pad_buffer): New function.
4810 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4811 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4812 (alloc_jump_pad_buffer): New function.
4813 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4814 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4815 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4816 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4818 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4820 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4821 * linux-amd64-ipa.c: Likewise.
4822 * linux-i386-ipa.c: Likewise.
4823 * linux-s390-ipa.c: Likewise.
4824 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4825 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4826 set_trace_state_variable_value_ptr.
4827 (struct ipa_sym_addresses): Likewise.
4828 (symbol_list): Likewise.
4829 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4830 accessing gdb_collect directly.
4831 (gdb_collect_ptr_type): New typedef.
4832 (get_raw_reg_ptr_type): New typedef.
4833 (get_trace_state_variable_value_ptr_type): New typedef.
4834 (set_trace_state_variable_value_ptr_type): New typedef.
4835 (gdb_collect_ptr): New global.
4836 (get_raw_reg_ptr): New global.
4837 (get_trace_state_variable_value_ptr): New global.
4838 (set_trace_state_variable_value_ptr): New global.
4839 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4840 accessing get_raw_reg directly.
4841 (get_get_tsv_func_addr): Likewise for
4842 get_trace_state_variable_value_ptr.
4843 (get_set_tsv_func_addr): Likewise for
4844 set_trace_state_variable_value_ptr.
4845 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4847 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4849 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4851 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4853 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4855 (relocate_instruction): Remove own_buf.
4856 * server.c (own_buf): Make global.
4857 (handle_v_requests): Make global.
4858 * server.h (own_buf): New declaration.
4859 (handle_v_requests): New prototype.
4861 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4864 * linux-s390-low.c (add_insns): New function.
4865 (s390_emit_prologue): New function.
4866 (s390_emit_epilogue): New function.
4867 (s390_emit_add): New function.
4868 (s390_emit_sub): New function.
4869 (s390_emit_mul): New function.
4870 (s390_emit_lsh): New function.
4871 (s390_emit_rsh_signed): New function.
4872 (s390_emit_rsh_unsigned): New function.
4873 (s390_emit_ext): New function.
4874 (s390_emit_log_not): New function.
4875 (s390_emit_bit_and): New function.
4876 (s390_emit_bit_or): New function.
4877 (s390_emit_bit_xor): New function.
4878 (s390_emit_bit_not): New function.
4879 (s390_emit_equal): New function.
4880 (s390_emit_less_signed): New function.
4881 (s390_emit_less_unsigned): New function.
4882 (s390_emit_ref): New function.
4883 (s390_emit_if_goto): New function.
4884 (s390_emit_goto): New function.
4885 (s390_write_goto_address): New function.
4886 (s390_emit_litpool): New function.
4887 (s390_emit_const): New function.
4888 (s390_emit_call): New function.
4889 (s390_emit_reg): New function.
4890 (s390_emit_pop): New function.
4891 (s390_emit_stack_flush): New function.
4892 (s390_emit_zero_ext): New function.
4893 (s390_emit_swap): New function.
4894 (s390_emit_stack_adjust): New function.
4895 (s390_emit_set_r2): New function.
4896 (s390_emit_int_call_1): New function.
4897 (s390_emit_void_call_2): New function.
4898 (s390_emit_eq_goto): New function.
4899 (s390_emit_ne_goto): New function.
4900 (s390_emit_lt_goto): New function.
4901 (s390_emit_le_goto): New function.
4902 (s390_emit_gt_goto): New function.
4903 (s390_emit_ge_goto): New function.
4904 (s390x_emit_prologue): New function.
4905 (s390x_emit_epilogue): New function.
4906 (s390x_emit_add): New function.
4907 (s390x_emit_sub): New function.
4908 (s390x_emit_mul): New function.
4909 (s390x_emit_lsh): New function.
4910 (s390x_emit_rsh_signed): New function.
4911 (s390x_emit_rsh_unsigned): New function.
4912 (s390x_emit_ext): New function.
4913 (s390x_emit_log_not): New function.
4914 (s390x_emit_bit_and): New function.
4915 (s390x_emit_bit_or): New function.
4916 (s390x_emit_bit_xor): New function.
4917 (s390x_emit_bit_not): New function.
4918 (s390x_emit_equal): New function.
4919 (s390x_emit_less_signed): New function.
4920 (s390x_emit_less_unsigned): New function.
4921 (s390x_emit_ref): New function.
4922 (s390x_emit_if_goto): New function.
4923 (s390x_emit_const): New function.
4924 (s390x_emit_call): New function.
4925 (s390x_emit_reg): New function.
4926 (s390x_emit_pop): New function.
4927 (s390x_emit_stack_flush): New function.
4928 (s390x_emit_zero_ext): New function.
4929 (s390x_emit_swap): New function.
4930 (s390x_emit_stack_adjust): New function.
4931 (s390x_emit_int_call_1): New function.
4932 (s390x_emit_void_call_2): New function.
4933 (s390x_emit_eq_goto): New function.
4934 (s390x_emit_ne_goto): New function.
4935 (s390x_emit_lt_goto): New function.
4936 (s390x_emit_le_goto): New function.
4937 (s390x_emit_gt_goto): New function.
4938 (s390x_emit_ge_goto): New function.
4939 (s390_emit_ops): New function.
4940 (struct linux_target_ops): Fill in emit_ops hook.
4942 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4945 * Makefile.in: Add s390 IPA files.
4946 * configure.srv: Build IPA for s390.
4947 * linux-s390-ipa.c: New file.
4948 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4949 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4950 (tdesc_s390_linux32): Likewise.
4951 (init_registers_s390_linux32v1): Likewise.
4952 (tdesc_s390_linux32v1): Likewise.
4953 (init_registers_s390_linux32v2): Likewise.
4954 (tdesc_s390_linux32v2): Likewise.
4955 (init_registers_s390_linux64): Likewise.
4956 (tdesc_s390_linux64): Likewise.
4957 (init_registers_s390_linux64v1): Likewise.
4958 (tdesc_s390_linux64v1): Likewise.
4959 (init_registers_s390_linux64v2): Likewise.
4960 (tdesc_s390_linux64v2): Likewise.
4961 (init_registers_s390_te_linux64): Likewise.
4962 (tdesc_s390_te_linux64): Likewise.
4963 (init_registers_s390_vx_linux64): Likewise.
4964 (tdesc_s390_vx_linux64): Likewise.
4965 (init_registers_s390_tevx_linux64): Likewise.
4966 (tdesc_s390_tevx_linux64): Likewise.
4967 (init_registers_s390x_linux64): Likewise.
4968 (tdesc_s390x_linux64): Likewise.
4969 (init_registers_s390x_linux64v1): Likewise.
4970 (tdesc_s390x_linux64v1): Likewise.
4971 (init_registers_s390x_linux64v2): Likewise.
4972 (tdesc_s390x_linux64v2): Likewise.
4973 (init_registers_s390x_te_linux64): Likewise.
4974 (tdesc_s390x_te_linux64): Likewise.
4975 (init_registers_s390x_vx_linux64): Likewise.
4976 (tdesc_s390x_vx_linux64): Likewise.
4977 (init_registers_s390x_tevx_linux64): Likewise.
4978 (tdesc_s390x_tevx_linux64): Likewise.
4979 (have_hwcap_s390_vx): New static variable.
4980 (s390_arch_setup): Fill have_hwcap_s390_vx.
4981 (s390_get_thread_area): New function.
4982 (s390_ft_entry_gpr_esa): New const.
4983 (s390_ft_entry_gpr_zarch): New const.
4984 (s390_ft_entry_misc): New const.
4985 (s390_ft_entry_fr): New const.
4986 (s390_ft_entry_vr): New const.
4987 (s390_ft_main_31): New const.
4988 (s390_ft_main_64): New const.
4989 (s390_ft_exit_fr): New const.
4990 (s390_ft_exit_vr): New const.
4991 (s390_ft_exit_misc): New const.
4992 (s390_ft_exit_gpr_esa): New const.
4993 (s390_ft_exit_gpr_zarch): New const.
4994 (append_insns): New function.
4995 (s390_relocate_instruction): New function.
4996 (s390_install_fast_tracepoint_jump_pad): New function.
4997 (s390_get_min_fast_tracepoint_insn_len): New function.
4998 (s390_get_ipa_tdesc_idx): New function.
4999 (struct linux_target_ops): Wire in the above functions.
5000 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5001 * linux-s390-tdesc.h: New file.
5003 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5005 * linux-s390-low.c (s390_supports_tracepoints): New function.
5006 (struct linux_target_ops): Fill supports_tracepoints hook.
5008 2016-03-18 Yao Qi <yao.qi@linaro.org>
5010 * linux-low.c (lwp_signal_can_be_delivered): New function.
5011 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5013 2016-03-18 Yao Qi <yao.qi@linaro.org>
5015 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5016 0 if signal is enqueued. Remove 'signal' from one debugging
5017 message. Move one debugging message to some lines below.
5018 Remove code setting 'signal' to 0.
5020 2016-03-18 Yao Qi <yao.qi@linaro.org>
5022 * linux-low.c (linux_low_filter_event): Remove redundant
5023 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5025 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5027 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5028 (struct linux_target_ops): Wire in the above.
5030 2016-03-03 Yao Qi <yao.qi@linaro.org>
5032 * linux-low.c: Update comments to start_step_over.
5034 2016-03-03 Yao Qi <yao.qi@linaro.org>
5037 * linux-low.c (handle_extended_wait): Set child suspended
5038 if event_lwp->bp_reinsert isn't zero.
5040 2016-03-02 Yao Qi <yao.qi@linaro.org>
5042 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5043 enqueue_pending_signal.
5045 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5047 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5050 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5052 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5053 (s390_regmap_3264) [!__s390x__]: New global.
5054 (s390_collect_ptrace_register): Skip map entries containing -1.
5055 (s390_supply_ptrace_register): Ditto.
5056 (s390_fill_gprs_high): New function.
5057 (s390_store_gprs_high): New function.
5058 (s390_regsets): Add NT_S390_HIGH_GPRS.
5059 (s390_get_hwcap): Enable on 31-bit.
5060 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5061 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5062 Detect NT_S390_HIGH_GPRS.
5063 (s390_usrregs_info_3264): Enable on 31-bit.
5064 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5065 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5067 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5070 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5071 * configure.srv: Ditto.
5072 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5073 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5074 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5075 (init_registers_amd64_linux): Remove prototype.
5076 (tdesc_amd64_linux): Remove declaration.
5077 (get_ipa_tdesc): New function.
5078 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5079 initialize remaining tdescs.
5080 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5081 (init_registers_i386_linux): Remove prototype.
5082 (tdesc_i386_linux): Remove declaration.
5083 (get_ipa_tdesc): New function.
5084 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5085 initialize remaining tdescs.
5086 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5087 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5088 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5089 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5090 (x86_get_ipa_tdesc_idx): New function.
5091 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5092 * linux-x86-tdesc.h: New file.
5093 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5094 (target_get_ipa_tdesc_idx): New macro.
5095 * tracepoint.c (ipa_tdesc_idx): New macro.
5096 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5097 (symbol_list): Add ipa_tdesc_idx.
5098 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5099 (ipa_tdesc): Remove.
5100 (ipa_tdesc_idx): New variable.
5101 (get_context_regcache): Use get_ipa_tdesc.
5102 (gdb_collect): Ditto.
5104 * tracepoint.h (get_ipa_tdesc): New prototype.
5105 (ipa_tdesc): Remove.
5107 2016-02-24 Pedro Alves <palves@redhat.com>
5109 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5110 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5111 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5112 Factor out common code between the USE_SIGTRAP_SIGINFO and
5113 !USE_SIGTRAP_SIGINFO blocks.
5114 (linux_low_filter_event): Call save_stop_reason instead of
5115 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5117 (linux_wait_1): Update comments.
5119 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5121 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5122 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5123 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5124 ppc_insert_point, ppc_remove_point.
5126 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5128 * linux-s390-low.c (s390_supports_z_point_type): New function.
5129 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5131 2016-02-16 Yao Qi <yao.qi@linaro.org>
5133 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5134 PC. Get pc from regcache_read_pc.
5136 2016-02-12 Yao Qi <yao.qi@linaro.org>
5138 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5139 or linux_get_pc_32bit.
5140 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5142 2016-02-12 Yao Qi <yao.qi@linaro.org>
5144 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5145 arm_linux_get_next_pcs_fixup.
5147 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5149 * tracepoint.c (x_tracepoint_action_download): Change
5150 write_inferior_data_ptr to write_inferior_data_pointer.
5151 (cmd_qtstart): Likewise.
5152 (write_inferior_data_ptr): Remove.
5153 (download_agent_expr): Change write_inferior_data_ptr to
5154 write_inferior_data_pointer.
5155 (download_tracepoint_1): Likewise.
5156 (download_tracepoint): Likewise.
5157 (download_trace_state_variables): Likewise.
5159 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5160 Marcin Kościelnicki <koriakin@0x04.net>
5162 * tracepoint.c (struct tracepoint_action_ops): Remove.
5163 (struct tracepoint_action): Remove ops.
5164 (m_tracepoint_action_download, r_tracepoint_action_download)
5165 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5166 size and offset accordingly.
5167 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5168 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5169 (tracepoint_action_send, tracepoint_action_download): New functions.
5170 Helpers for trace action handlers.
5171 (add_tracepoint_action): Remove setup actions ops.
5172 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5174 2016-02-10 Yao Qi <yao.qi@linaro.org>
5176 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5178 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5180 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5182 * configure: Regenerate.
5184 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5186 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5187 void * to gdb_byte *.
5188 * linux-low.c (siginfo_fixup): Likewise.
5189 (linux_xfer_siginfo): Likewise.
5190 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5192 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5194 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5196 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5198 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5200 * linux-x86-low.c [__x86_64__]: Include
5201 "nat/amd64-linux-siginfo.h".
5202 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5203 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5204 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5205 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5206 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5207 (cpt_si_fd, si_timerid, si_overrun): Move from
5208 nat/amd64-linux-siginfo.c.
5209 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5211 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5213 * server.c (skip_to_semicolon): Remove.
5214 (process_point_options): Use strchrnul instead of
5217 2016-01-26 Yao Qi <yao.qi@linaro.org>
5219 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5220 * linux-low.c (install_software_single_step_breakpoints): Don't
5221 call regcache_read_pc.
5222 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5225 2016-01-26 Yao Qi <yao.qi@linaro.org>
5227 * linux-low.c (install_software_single_step_breakpoints): Call
5228 regcache_read_pc instead of get_pc.
5230 2016-01-26 Yao Qi <yao.qi@linaro.org>
5232 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5233 (unblock_async_io): Rename to ...
5234 (block_unblock_async_io): ... it. New function.
5235 (enable_async_io): Don't install SIGIO handler. Unblock it
5237 (disable_async_io): Don't ignore SIGIO. Block it instead.
5238 (initialize_async_io): Install SIGIO handler. Don't call
5241 2016-01-26 Yao Qi <yao.qi@linaro.org>
5243 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5244 first character is '\003', call *the_target->request_interrupt.
5246 2016-01-25 Yao Qi <yao.qi@linaro.org>
5248 * remote-utils.c (new_thread_notify): Remove.
5249 (dead_thread_notify): Likewise.
5250 * remote-utils.h (new_thread_notify): Remove declaration.
5251 (dead_thread_notify): Likewise.
5253 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5255 * gdb.trace/pending.exp: Fix expected message on continue.
5257 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5259 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5260 it works properly on big-endian machines where sizeof (CORE_ADDR)
5263 2016-01-21 Pedro Alves <palves@redhat.com>
5265 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5266 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5267 * configure: Regenerate.
5269 2016-01-21 Yao Qi <yao.qi@linaro.org>
5271 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5272 is_thumb and set it according to CPSR saved on the stack.
5273 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5274 arm_sigreturn_next_pc.
5276 2016-01-18 Yao Qi <yao.qi@linaro.org>
5278 * linux-low.c (linux_set_pc_64bit): New function.
5279 (linux_get_pc_64bit): New function.
5280 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5282 * linux-sparc-low.c (debug_threads): Remove declaration.
5283 (sparc_get_pc): Remove.
5284 (the_low_target): Use linux_get_pc_64bit instead of
5286 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5287 (the_low_target): Use linux_get_pc_64bit and
5290 2016-01-18 Yao Qi <yao.qi@linaro.org>
5292 * linux-arm-low.c (debug_threads): Remove declaration.
5293 (arm_get_pc, arm_set_pc): Remove.
5294 (the_low_target): Use linux_get_pc_32bit and
5296 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5297 (the_low_target): Use linux_get_pc_32bit and
5299 * linux-cris-low.c (debug_threads): Remove declaration.
5300 (cris_get_pc, cris_set_pc,): Remove.
5301 (the_low_target): Use linux_get_pc_32bit and
5303 * linux-crisv32-low.c (debug_threads): Remove declaration.
5304 (cris_get_pc, cris_set_pc): Remove.
5305 (the_low_target): Use linux_get_pc_32bit and
5307 * linux-low.c: Include inttypes.h.
5308 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5309 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5310 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5311 (the_low_target): Use linux_get_pc_32bit and
5313 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5314 (the_low_target): Use linux_get_pc_32bit and
5316 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5317 (the_low_target): Use linux_get_pc_32bit and
5319 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5320 (the_low_target): Use linux_get_pc_32bit and
5322 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5323 (the_low_target): Use linux_get_pc_32bit and
5326 2016-01-18 Gary Benson <gbenson@redhat.com>
5328 * configure.ac (AC_FUNC_FORK): New check.
5329 * config.in: Regenerate.
5330 * configure: Likewise.
5332 2016-01-14 Yao Qi <yao.qi@linaro.org>
5334 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5335 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5336 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5337 arm_get_next_pcs_ctor.
5339 2016-01-12 Josh Stone <jistone@redhat.com>
5340 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5342 * inferiors.h: Include "gdb_vecs.h".
5343 (struct process_info): Add syscalls_to_catch.
5344 * inferiors.c (remove_process): Free syscalls_to_catch.
5345 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5346 syscall_return stops.
5347 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5348 * server.c (handle_general_set): Handle QCatchSyscalls.
5349 (handle_query): Report support for QCatchSyscalls.
5350 * target.h (struct target_ops): Add supports_catch_syscall.
5351 (target_supports_catch_syscall): New macro.
5352 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5353 (struct lwp_info): Add syscall_state.
5354 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5355 Maintain syscall_state and syscalls_to_catch across exec.
5356 (get_syscall_trapinfo): New function, proxy to the_low_target.
5357 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5358 (linux_low_filter_event): Toggle syscall_state entry/return for
5359 syscall traps, and set it ignored for all others.
5360 (gdb_catching_syscalls_p): New function.
5361 (gdb_catch_this_syscall_p): New function.
5362 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5363 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5364 (linux_supports_catch_syscall): New function.
5365 (linux_target_ops): Install it.
5366 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5367 (the_low_target): Install it.
5369 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5371 * acinclude.m4: Include new ../warning.m4 file.
5372 * configure: Regenerated.
5373 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5375 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5377 * ax.c (is_goto_target): Mark static.
5378 * linux-low.c (register_addr): Likewise.
5379 (linux_fetch_registers, linux_store_registers): Likewise.
5380 * mem-break.c (any_persistent_commands): Fix old prototype.
5381 (add_commands_to_breakpoint): Mark static.
5382 * regcache.c (find_register_by_name): Delete unused func.
5383 * remote-utils.c (hex_or_minus_one): Mark static.
5384 * server.c (monitor_show_help): Mark static.
5385 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5386 handle_v_requests): Likewise.
5388 2016-01-12 Pedro Alves <palves@redhat.com>
5390 Remove use of the registered trademark symbol throughout.
5392 2016-01-08 Yao Qi <yao.qi@linaro.org>
5394 * remote-utils.c (getpkt): If c is '\003', call target hook
5397 2016-01-06 Yao Qi <yao.qi@linaro.org>
5399 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5400 linux-aarch32-low.c.
5401 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5402 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5403 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5404 (thumb2_breakpoint): Declare.
5405 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5406 linux-aarch32-low.h.
5407 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5408 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5409 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5411 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5413 * gdbreplay.c (gdbreplay_version): Change copyright year in
5415 * server.c (gdbserver_version): Likewise.
5417 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5419 * server.c (crc32_table): Delete.
5420 (crc32): Use libiberty's xcrc32 function.
5422 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5424 * lynx-low.c (lynx_delete_thread_callback): New function.
5425 (lynx_mourn): Properly delete our process and all of its
5426 threads. Remove call to clear_inferiors.
5428 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5430 * target.c (thread_search_callback): Add check that
5431 the thread_stopped target callback is not NULL before
5434 2015-12-21 Yao Qi <yao.qi@linaro.org>
5436 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5439 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5441 * server.c (handle_query): Call target_supports_software_single_step.
5443 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5445 * linux-low.c (single_step): New function.
5446 (linux_resume_one_lwp_throw): Call single_step.
5447 (start_step_over): Likewise.
5449 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5451 * Makefile.in (SFILES): Append arch/arm-linux.c,
5452 arch/arm-get-next-pcs.c.
5453 (arm-linux.o): New rule.
5454 (arm-get-next-pcs.o): New rule.
5455 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5457 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5458 to linux-aarch32-low.c.
5459 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5460 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5461 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5462 (thumb2_breakpoint_len): Likewise.
5463 (arm_is_thumb_mode): Make non-static.
5464 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5465 from linux-aarch32-low.c.
5466 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5467 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5468 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5469 (thumb2_breakpoint_len): Likewise.
5470 (arm_is_thumb_mode): New declaration.
5471 * linux-arm-low.c: Include arch/arm-linux.h
5472 aarch/arm-get-next-pcs.h, sys/syscall.h.
5473 (get_next_pcs_ops): New struct.
5474 (get_next_pcs_addr_bits_remove): New function.
5475 (get_next_pcs_is_thumb): New function.
5476 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5477 (arm_sigreturn_next_pc): Likewise.
5478 (get_next_pcs_syscall_next_pc): Likewise.
5479 (arm_gdbserver_get_next_pcs): Likewise.
5480 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5482 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5483 * server.h: Include gdb_vecs.h.
5485 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5487 * Makefile.in (SFILES): Append common/common-regcache.c.
5488 (OBS): Append common-regcache.o.
5489 (common-regcache.o): New rule.
5490 * regcache.c (init_register_cache): Initialize cache to
5492 (regcache_raw_read_unsigned): New function.
5493 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5494 register_status enum.
5496 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5498 * linux-aarch64-low.c (the_low_targets): Rename
5499 breakpoint_reinsert_addr to get_next_pcs.
5500 * linux-arm-low.c (the_low_targets): Likewise.
5501 * linux-bfin-low.c (the_low_targets): Likewise.
5502 * linux-cris-low.c (the_low_targets): Likewise.
5503 * linux-crisv32-low.c (the_low_targets): Likewise.
5504 * linux-low.c (can_software_single_step): Likewise.
5505 (install_software_single_step_breakpoints): New function.
5506 (start_step_over): Use install_software_single_step_breakpoints.
5507 * linux-low.h: New CORE_ADDR vector.
5508 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5510 * linux-mips-low.c (the_low_targets): Likewise.
5511 * linux-nios2-low.c (the_low_targets): Likewise.
5512 * linux-sparc-low.c (the_low_targets): Likewise.
5514 2015-12-17 Pedro Alves <palves@redhat.com>
5516 * linux-low.c (linux_kill_one_lwp): Remove references to
5518 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5520 (linux_init_signals): Delete.
5521 (initialize_low): Adjust.
5522 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5524 2015-12-16 Pedro Alves <palves@redhat.com>
5526 * configure.ac (compiler warning flags): When testing a
5527 -Wno-foo option, check whether -Wfoo works instead.
5528 * configure: Regenerate.
5530 2015-12-11 Don Breazeal <donb@codesourcery.com>
5532 * server.c (process_serial_event): Don't exit from gdbserver
5533 in remote mode if there are still active inferiors.
5535 2015-12-11 Yao Qi <yao.qi@linaro.org>
5537 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5538 arm_breakpoint_at if the process is 32-bit.
5540 2015-12-11 Yao Qi <yao.qi@linaro.org>
5542 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5545 2015-12-07 Yao Qi <yao.qi@linaro.org>
5547 * configure.srv: Append arm.o to srv_tgtobj for
5548 aarch64*-*-linux* target.
5549 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5550 from linux-arm-low.c.
5551 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5552 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5553 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5554 (thumb2_breakpoint_len): Likewise.
5555 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5556 (arm_breakpoint_kinds): Likewise.
5557 (arm_breakpoint_kind_from_pc): Likewise.
5558 (arm_sw_breakpoint_from_kind): Likewise.
5559 (arm_breakpoint_kind_from_current_state): Likewise.
5560 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5561 (arm_sw_breakpoint_from_kind): Declare.
5562 (arm_breakpoint_kind_from_current_state): Declare.
5563 (arm_breakpoint_at): Declare.
5564 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5565 arm_sw_breakpoint_from_kind if process is 32-bit.
5566 (aarch64_breakpoint_kind_from_pc): New function.
5567 (aarch64_breakpoint_kind_from_current_state): New function.
5568 (the_low_target): Initialize fields breakpoint_kind_from_pc
5569 and breakpoint_kind_from_current_state.
5570 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5571 linux-aarch32-low.c.
5572 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5573 (arm_breakpoint, arm_breakpoint_len): Likewise.
5574 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5575 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5576 (arm_is_thumb_mode): Likewise.
5577 (arm_breakpoint_at): Likewise.
5578 (arm_breakpoint_kind_from_pc): Likewise.
5579 (arm_sw_breakpoint_from_kind): Likewise.
5580 (arm_breakpoint_kind_from_current_state): Likewise.
5583 2015-08-04 Yao Qi <yao.qi@linaro.org>
5585 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5586 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5587 * server.c (extended_protocol): Remove "static".
5588 * server.h (extended_protocol): Declare it.
5590 2015-12-04 Josh Stone <jistone@redhat.com>
5592 * target.h (struct target_ops) <arch_setup>: Rename to ...
5593 (struct target_ops) <post_create_inferior>: ... this.
5594 (target_arch_setup): Rename to ...
5595 (target_post_create_inferior): ... this, calling post_create_inferior.
5596 * server.c (start_inferior): Update target_arch_setup calls to
5597 target_post_create_inferior.
5598 * linux-low.c (linux_low_ptrace_options): Forward declare.
5599 (linux_arch_setup): Update its comment for general use.
5600 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5601 (struct linux_target_ops): Use linux_post_create_inferior.
5602 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5603 to post_create_inferior.
5604 * nto-low.c (struct nto_target_ops): Likewise.
5605 * spu-low.c (struct spu_target_ops): Likewise.
5606 * win32-low.c (struct win32_target_ops): Likewise.
5608 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5610 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5612 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5614 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5615 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5616 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5617 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5618 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5619 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5620 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5621 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5622 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5623 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5624 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5625 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5627 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5629 * linux-low.c (linux_look_up_symbols): Don't call
5630 linux_supports_traceclone.
5631 * linux-low.h (thread_db_init): Remove use_events argument.
5632 * thread-db.c (thread_db_use_event): Remove global variable.
5633 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5634 (struct thread_db) <td_create_bp>: Remove field.
5635 (thread_db_create_event): Remove function.
5636 (thread_db_enable_reporting): Likewise.
5637 (find_one_thread): Don't check for thread_db_use_events.
5638 (attach_thread): Likewise.
5639 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5640 (try_thread_db_load_1): Don't check for thread_db_use_events.
5641 (thread_db_init): Remove use_events argument and thread events
5643 (remove_thread_event_breakpoints): Remove function.
5644 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5646 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5648 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5650 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5651 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5652 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5653 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5654 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5656 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5658 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5659 * linux-low.c (can_hardware_single_step): Use
5660 supports_hardware_single_step.
5661 (can_software_single_step): New function.
5662 (start_step_over): Call can_software_single_step.
5663 (linux_supports_hardware_single_step): New function.
5664 (struct target_ops) <supports_software_single_step>: Initialize.
5665 * linux-low.h (struct linux_target_ops)
5666 <supports_hardware_single_step>: Initialize.
5667 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5668 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5669 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5670 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5671 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5672 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5673 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5674 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5675 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5676 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5678 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5679 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5681 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5682 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5683 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5686 * target.h (struct target_ops): <supports_software_single_step>:
5688 (target_supports_software_single_step): New macro.
5690 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5692 * linux-low.c (linux_wait_1): Fix pc advance condition.
5693 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5694 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5696 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5698 * linux-arm-low.c (arm_is_thumb_mode): New function.
5699 (arm_breakpoint_at): Use arm_is_thumb_mode.
5700 (arm_breakpoint_kind_from_current_state): New function.
5701 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5703 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5704 (linux_breakpoint_kind_from_current_state): New function.
5705 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5706 * linux-low.h (struct linux_target_ops)
5707 <breakpoint_kind_from_current_state>: New field.
5708 * target.h (struct target_ops): Likewise.
5709 (target_breakpoint_kind_from_current_state): New macro.
5711 2015-11-30 Pedro Alves <palves@redhat.com>
5713 * linux-low.c (linux_resume): Wake up the event loop before
5716 2015-11-30 Pedro Alves <palves@redhat.com>
5718 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5720 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5722 * target.c (struct thread_search): New structure.
5723 (thread_search_callback): New function.
5724 (prev_general_thread): New global.
5725 (prepare_to_access_memory, done_accessing_memory): New functions.
5726 * target.h (prepare_to_access_memory, done_accessing_memory):
5727 Replace macros with function declarations.
5729 2015-11-30 Pedro Alves <palves@redhat.com>
5732 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5733 report TARGET_WAITKIND_NO_RESUMED.
5734 * remote-utils.c (prepare_resume_reply): Handle
5735 TARGET_WAITKIND_NO_RESUMED.
5736 * server.c (report_no_resumed): New global.
5737 (handle_query) <qSupported>: Handle "no-resumed+". Report
5738 "no-resumed+" support.
5739 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5740 return error if the client doesn't support no-resumed events.
5741 (push_stop_notification): New function.
5742 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5743 events if the client supports them.
5745 2015-11-30 Pedro Alves <palves@redhat.com>
5747 * linux-low.c (thread_still_has_status_pending_p): Don't check
5749 (lwp_resumed): New function.
5750 (status_pending_p_callback): Return early if the LWP is not
5751 supposed to be resumed.
5753 2015-11-30 Pedro Alves <palves@redhat.com>
5755 * linux-low.c (handle_extended_wait): Assert that the LWP's
5756 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5757 thread create events, leave the new child's status pending.
5758 (linux_low_filter_event): If GDB wants to hear about thread exit
5759 events, leave the LWP marked dead and don't delete it.
5760 (linux_wait_for_event_filtered): Don't check for thread exit.
5761 (filter_exit_event): New function.
5762 (linux_wait_1): Use it, when returning an exit event.
5763 (linux_resume_one_lwp_throw): Assert that the LWP's
5764 waitstatus is TARGET_WAITKIND_IGNORE.
5765 * remote-utils.c (prepare_resume_reply): Handle
5766 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5767 * server.c (report_thread_events): New global.
5768 (handle_general_set): Handle QThreadEvents.
5769 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5770 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5771 TARGET_WAITKIND_THREAD_EXITED.
5772 * server.h (report_thread_events): Declare.
5774 2015-11-30 Pedro Alves <palves@redhat.com>
5776 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5777 the thread's last_resume_kind was resume_stop.
5779 2015-11-30 Pedro Alves <palves@redhat.com>
5781 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5784 2015-11-30 Pedro Alves <palves@redhat.com>
5786 * server.c (handle_v_requests): Handle vCtrlC.
5788 2015-11-30 Pedro Alves <palves@redhat.com>
5790 * gdbthread.h (find_any_thread_of_pid): Declare.
5791 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5793 * server.c (handle_query): If current_thread is NULL, look for
5794 another thread of the selected process.
5796 2015-11-26 Daniel Colascione <dancol@dancol.org>
5797 Simon Marchi <simon.marchi@ericsson.com>
5799 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5800 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5802 * target.h (struct target_ops) <thread_name>: New field.
5803 (target_thread_name): New macro.
5805 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5807 * regcache.h (regcache_invalidate_pid): Add declaration.
5808 * regcache.c (regcache_invalidate_pid): New function, extracted
5809 from regcache_invalidate.
5810 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5811 Add trivial documentation comment.
5812 * lynx-low.c: Use regcache_invalidate_pid instead of
5813 regcache_invalidate.
5815 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5817 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5818 and Elf64_auxv_t if the target is Android.
5820 2015-11-22 Doug Evans <xdje42@gmail.com>
5822 * target.h: #include <sys/types.h>.
5824 2015-11-19 Pedro Alves <palves@redhat.com>
5826 * linux-low.c (linux_process_qsupported): Change prototype.
5828 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5830 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5831 and adjust to loop over all features.
5832 * server.c (handle_query) <qSupported>: Adjust to call
5833 target_process_qsupported once, passing it a vector of unprocessed
5835 * target.h (struct target_ops) <process_qsupported>: Change
5837 (target_process_qsupported): Adjust.
5839 2015-11-19 Pedro Alves <palves@redhat.com>
5841 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5843 * configure: Regenerate.
5845 2015-11-19 Pedro Alves <palves@redhat.com>
5847 * configure: Regenerate.
5849 2015-11-19 Yao Qi <yao.qi@linaro.org>
5851 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5854 2015-11-19 Yao Qi <yao.qi@linaro.org>
5856 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5857 (struct aarch64_operand): Move enum out.
5859 2015-11-19 Yao Qi <yao.qi@linaro.org>
5861 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5862 struct user_fpsimd_state *.
5863 (aarch64_store_fpregset): Likewise.
5865 2015-11-19 Yao Qi <yao.qi@linaro.org>
5867 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5868 struct user_pt_regs *.
5869 (aarch64_store_gregset): Likewise.
5871 2015-11-18 Pedro Alves <palves@redhat.com>
5873 * Makefile.in (all_object_files): Add $IPA_OBJS.
5875 2015-11-17 Pedro Alves <palves@redhat.com>
5877 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5878 GDB_SIGNAL_0 and gdb_signal_to_string.
5880 2015-11-17 Pedro Alves <palves@redhat.com>
5882 * win32-low.c (handle_output_debug_string): Remove parameter.
5883 (win32_kill): Remove our_status local and adjust call to
5884 handle_output_debug_string.
5885 (get_child_debug_event): Adjust call to
5886 handle_output_debug_string.
5888 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5890 * linux-mips-low.c (mips_fill_gregset): Add cast.
5891 (mips_store_gregset): Likewise.
5892 (mips_fill_fpregset): Likewise.
5893 (mips_store_fpregset): Likewise.
5895 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5897 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5900 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5902 * linux-mips-low.c (mips_linux_new_thread): Change type of
5903 watch_type to enum target_hw_bp_type.
5905 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5907 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5908 Change return type to arm_hwbp_type.
5910 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5912 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5913 (arm_store_gregset): Likewise.
5914 * linux-arm-low.c (arm_get_hwcap): Likewise.
5915 (arm_read_description): Likewise.
5917 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5919 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5921 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5923 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5924 (ppc_fill_vsxregset): Likewise.
5925 (ppc_store_vsxregset): Likewise.
5926 (ppc_fill_vrregset): Likewise.
5927 (ppc_store_vrregset): Likewise.
5928 (ppc_fill_evrregset): Likewise.
5929 (ppc_store_evrregset): Likewise.
5931 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5933 * linux-ppc-low.c (ppc_usrregs_info): Remove
5934 forward-declaration.
5935 (ppc_arch_setup): Move lower in file.
5937 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5939 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5940 (ps_pdwrite): Likewise.
5942 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5944 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5945 to after assert checks.
5947 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5949 * proc-service.c (ps_pdread): Add/adjust casts.
5950 (ps_pdwrite): Add/adjust casts.
5952 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5954 * server.c (handle_search_memory_1): Cast return value of
5957 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5959 * server.c (write_qxfer_response): Change type of data to
5962 2015-10-29 Pedro Alves <palves@redhat.com>
5964 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5966 2015-10-29 Pedro Alves <palves@redhat.com>
5968 * tracepoint.c (clear_installed_tracepoints): Add casts.
5970 2015-10-29 Pedro Alves <palves@redhat.com>
5972 * server.c (handle_v_cont, process_serial_event): Add enum
5973 gdb_signal casts to signal parsing code.
5975 2015-10-29 Pedro Alves <palves@redhat.com>
5977 * linux-low.h (NULL_REGSET): Define.
5978 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5979 * linux-arm-low.c (arm_regsets): Likewise.
5980 * linux-crisv32-low.c (cris_regsets): Likewise.
5981 * linux-m68k-low.c (m68k_regsets): Likewise.
5982 * linux-mips-low.c (mips_regsets): Likewise.
5983 * linux-nios2-low.c (nios2_regsets): Likewise.
5984 * linux-ppc-low.c (ppc_regsets): Likewise.
5985 * linux-s390-low.c (s390_regsets): Likewise.
5986 * linux-sh-low.c (sh_regsets): Likewise.
5987 * linux-sparc-low.c (sparc_regsets): Likewise.
5988 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5989 * linux-tile-low.c (tile_regsets): Likewise.
5990 * linux-x86-low.c (x86_regsets): Likewise.
5991 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5993 2015-10-29 Pedro Alves <palves@redhat.com>
5995 * linux-low.h (NULL_REGSET): Define.
5996 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5997 * linux-arm-low.c (arm_regsets): Likewise.
5998 * linux-crisv32-low.c (cris_regsets): Likewise.
5999 * linux-m68k-low.c (m68k_regsets): Likewise.
6000 * linux-mips-low.c (mips_regsets): Likewise.
6001 * linux-nios2-low.c (nios2_regsets): Likewise.
6002 * linux-ppc-low.c (ppc_regsets): Likewise.
6003 * linux-s390-low.c (s390_regsets): Likewise.
6004 * linux-sh-low.c (sh_regsets): Likewise.
6005 * linux-sparc-low.c (sparc_regsets): Likewise.
6006 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6007 * linux-tile-low.c (tile_regsets): Likewise.
6008 * linux-x86-low.c (x86_regsets): Likewise.
6009 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6011 2015-10-26 Doug Evans <dje@google.com>
6013 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6015 2015-10-26 Doug Evans <dje@google.com>
6017 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6019 2015-10-26 Doug Evans <dje@google.com>
6021 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6023 (attach_thread, find_new_threads_callback): Ditto.
6025 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6027 * mem-break.h (set_breakpoint_data): Remove.
6029 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6031 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6032 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6033 (initialize_low): Remove set_breakpoint_data call.
6034 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6035 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6036 (initialize_low): Remove set_breakpoint_data call.
6037 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6038 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6039 (initialize_low): Remove set_breakpoint_data call.
6041 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6043 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6044 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6045 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6046 * target.h (target_breakpoint_kind_from_pc): New macro.
6048 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6050 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6051 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6052 the default breakpoint kind.
6054 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6056 * linux-arm-low.c (arm_supports_z_point_type): Add software
6059 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6061 * linux-arm-low.c: Refactor breakpoint definitions.
6062 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6063 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6065 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6067 * Makefile.in: Add arm.c/o.
6068 * configure.srv: Likewise.
6069 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6070 (arm_breakpoint_kind_from_pc): New function.
6071 (arm_sw_breakpoint_from_kind): Return proper kind.
6072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6074 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6076 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6078 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6079 (struct raw_breakpoint) <size>: Remove.
6080 (struct raw_breakpoint) <kind>: Add.
6081 (bp_size): New function.
6082 (bp_opcode): Likewise.
6083 (find_raw_breakpoint_at): Adjust for kind.
6084 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6085 (remove_memory_breakpoint): Adjust for kind call bp_size.
6086 (set_raw_breakpoint_at): Adjust for kind.
6087 (set_breakpoint): Likewise.
6088 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6089 (delete_raw_breakpoint): Adjust for kind.
6090 (delete_breakpoint): Likewise.
6091 (find_gdb_breakpoint): Likewise.
6092 (set_gdb_breakpoint_1): Likewise.
6093 (set_gdb_breakpoint): Likewise.
6094 (delete_gdb_breakpoint_1): Likewise.
6095 (delete_gdb_breakpoint): Likewise.
6096 (uninsert_raw_breakpoint): Likewise.
6097 (reinsert_raw_breakpoint): Likewise.
6098 (set_breakpoint_data): Remove.
6099 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6100 (check_mem_read): Adjust for kind call bp_size.
6101 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6102 (clone_one_breakpoint): Adjust for kind.
6103 * mem-break.h (set_gdb_breakpoint): Likewise.
6104 (delete_gdb_breakpoint): Likewise.
6105 * server.c (process_serial_event): Likewise.
6107 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6109 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6110 (struct linux_target_ops) <breakpoint>: Remove.
6111 (struct linux_target_ops) <breakpoint_len>: Remove.
6112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6114 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6115 (arm_sw_breakpoint_from_kind): New function.
6116 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6117 (struct linux_target_ops) <breakpoint>: Remove.
6118 (struct linux_target_ops) <breakpoint_len>: Remove.
6119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6121 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6122 (struct linux_target_ops) <breakpoint>: Remove.
6123 (struct linux_target_ops) <breakpoint_len>: Remove.
6124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6126 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6127 (struct linux_target_ops) <breakpoint>: Remove.
6128 (struct linux_target_ops) <breakpoint_len>: Remove.
6129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6131 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6132 and sw_breakpoint_from_kind to increment the pc.
6133 (linux_breakpoint_kind_from_pc): New function.
6134 (linux_sw_breakpoint_from_kind): New function.
6135 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6136 (initialize_low): Call breakpoint_kind_from_pc and
6137 sw_breakpoint_from_kind to replace breakpoint_data/len.
6138 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6141 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6142 (struct linux_target_ops) <breakpoint>: Remove.
6143 (struct linux_target_ops) <breakpoint_len>: Remove.
6144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6146 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6147 (struct linux_target_ops) <breakpoint>: Remove.
6148 (struct linux_target_ops) <breakpoint_len>: Remove.
6149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6151 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6152 (struct linux_target_ops) <breakpoint>: Remove.
6153 (struct linux_target_ops) <breakpoint_len>: Remove.
6154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6156 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6157 (struct linux_target_ops) <breakpoint>: Remove.
6158 (struct linux_target_ops) <breakpoint_len>: Remove.
6159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6161 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6172 (struct linux_target_ops) <breakpoint>: Remove.
6173 (struct linux_target_ops) <breakpoint_len>: Remove.
6174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6176 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6177 (struct linux_target_ops) <breakpoint>: Remove.
6178 (struct linux_target_ops) <breakpoint_len>: Remove.
6179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6181 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6182 (struct linux_target_ops) <breakpoint>: Remove.
6183 (struct linux_target_ops) <breakpoint_len>: Remove.
6184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6186 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6187 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6188 (struct linux_target_ops) <breakpoint>: Remove.
6189 (struct linux_target_ops) <breakpoint_len>: Remove.
6190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6192 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6193 (struct linux_target_ops) <breakpoint>: Remove.
6194 (struct linux_target_ops) <breakpoint_len>: Remove.
6195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6198 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6200 * linux-cris-low.c (cris_get_pc): Remove void arg.
6202 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6204 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6207 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6209 * inferiors.c (thread_pid_matches_callback): New function.
6210 (find_thread_process): New function.
6211 (remove_thread): Reset current_thread.
6212 (remove_process): Assert threads have been removed first.
6214 2015-10-15 Yao Qi <yao.qi@linaro.org>
6216 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6218 (aarch64_remove_point): Likewise.
6219 * regcache.c (regcache_register_size): New function.
6221 2015-10-12 Yao Qi <yao.qi@linaro.org>
6223 * linux-aarch64-low.c: Update all callers as emit_load_store
6224 is renamed to aarch64_emit_load_store.
6226 2015-10-12 Yao Qi <yao.qi@linaro.org>
6228 * linux-aarch64-low.c: Update all callers of function renaming
6229 from emit_insn to aarch64_emit_insn.
6231 2015-10-12 Yao Qi <yao.qi@linaro.org>
6233 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6234 arch/aarch64-insn.h.
6235 (struct aarch64_memory_operand): Likewise.
6237 (emit_insn): Move to arch/aarch64-insn.c.
6238 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6239 (emit_load_store): Move to arch/aarch64-insn.c.
6240 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6241 (can_encode_int32): Remove.
6243 2015-10-12 Yao Qi <yao.qi@linaro.org>
6245 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6246 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6247 (aarch64_relocate_instruction): Likewise.
6248 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6249 (struct aarch64_insn_visitor): Likewise.
6251 2015-10-12 Yao Qi <yao.qi@linaro.org>
6253 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6254 (struct aarch64_insn_visitor): New.
6255 (struct aarch64_insn_relocation_data): New.
6256 (aarch64_ftrace_insn_reloc_b): New function.
6257 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6258 (aarch64_ftrace_insn_reloc_cb): Likewise.
6259 (aarch64_ftrace_insn_reloc_tb): Likewise.
6260 (aarch64_ftrace_insn_reloc_adr): Likewise.
6261 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6262 (aarch64_ftrace_insn_reloc_others): Likewise.
6264 (aarch64_relocate_instruction): Use visitor.
6266 2015-10-12 Yao Qi <yao.qi@linaro.org>
6268 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6269 int. Add argument buf.
6270 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6271 aarch64_relocate_instruction.
6273 2015-10-12 Yao Qi <yao.qi@linaro.org>
6275 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6276 argument insn. Remove local variable insn. Don't call
6278 (aarch64_install_fast_tracepoint_jump_pad): Call
6281 2015-09-30 Yao Qi <yao.qi@linaro.org>
6283 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6284 (emit_load_store_pair): Likewise.
6286 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6288 * dll.c (match_dll): Add cast(s).
6289 (unloaded_dll): Likewise.
6290 * linux-low.c (second_thread_of_pid_p): Likewise.
6291 (delete_lwp_callback): Likewise.
6292 (count_events_callback): Likewise.
6293 (select_event_lwp_callback): Likewise.
6294 (linux_set_resume_request): Likewise.
6295 * server.c (accumulate_file_name_length): Likewise.
6296 (emit_dll_description): Likewise.
6297 (handle_qxfer_threads_worker): Likewise.
6298 (visit_actioned_threads): Likewise.
6299 * thread-db.c (any_thread_of): Likewise.
6300 * tracepoint.c (same_process_p): Likewise.
6301 (match_blocktype): Likewise.
6302 (build_traceframe_info_xml): Likewise.
6304 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6306 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6308 (gdb_unparse_agent_expr): Likewise.
6309 * hostio.c (require_data): Likewise.
6310 (handle_pread): Likewise.
6311 * linux-low.c (disable_regset): Likewise.
6312 (fetch_register): Likewise.
6313 (store_register): Likewise.
6314 (get_dynamic): Likewise.
6315 (linux_qxfer_libraries_svr4): Likewise.
6316 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6317 (set_fast_tracepoint_jump): Likewise.
6318 (uninsert_fast_tracepoint_jumps_at): Likewise.
6319 (reinsert_fast_tracepoint_jumps_at): Likewise.
6320 (validate_inserted_breakpoint): Likewise.
6321 (clone_agent_expr): Likewise.
6322 * regcache.c (init_register_cache): Likewise.
6323 * remote-utils.c (putpkt_binary_1): Likewise.
6324 (decode_M_packet): Likewise.
6325 (decode_X_packet): Likewise.
6326 (look_up_one_symbol): Likewise.
6327 (relocate_instruction): Likewise.
6328 (monitor_output): Likewise.
6329 * server.c (handle_search_memory): Likewise.
6330 (handle_qxfer_exec_file): Likewise.
6331 (handle_qxfer_libraries): Likewise.
6332 (handle_qxfer): Likewise.
6333 (handle_query): Likewise.
6334 (handle_v_cont): Likewise.
6335 (handle_v_run): Likewise.
6336 (captured_main): Likewise.
6337 * target.c (write_inferior_memory): Likewise.
6338 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6339 * tracepoint.c (init_trace_buffer): Likewise.
6340 (add_tracepoint_action): Likewise.
6341 (add_traceframe): Likewise.
6342 (add_traceframe_block): Likewise.
6343 (cmd_qtdpsrc): Likewise.
6344 (cmd_qtdv): Likewise.
6345 (cmd_qtstatus): Likewise.
6346 (response_source): Likewise.
6347 (response_tsv): Likewise.
6348 (cmd_qtnotes): Likewise.
6349 (gdb_collect): Likewise.
6350 (initialize_tracepoint): Likewise.
6352 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6354 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6355 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6356 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6358 (enum aarch64_condition_codes): New enum.
6359 (w0): New static global.
6362 (struct aarch64_memory_operand) <type>: New
6363 MEMORY_OPERAND_POSTINDEX type.
6364 (postindex_memory_operand): New helper function.
6365 (emit_ret): New function.
6366 (emit_load_store_pair): New function, factored out of emit_stp
6367 with support for MEMORY_OPERAND_POSTINDEX.
6368 (emit_stp): Rewrite using emit_load_store_pair.
6369 (emit_ldp): New function.
6370 (emit_load_store): Likewise.
6371 (emit_ldr): Mention post-index instruction in comment.
6372 (emit_ldrh): New function.
6373 (emit_ldrb): New function.
6374 (emit_ldrsw): Mention post-index instruction in comment.
6375 (emit_str): Likewise.
6376 (emit_subs): New function.
6377 (emit_cmp): Likewise.
6378 (emit_and): Likewise.
6379 (emit_orr): Likewise.
6380 (emit_orn): Likewise.
6381 (emit_eor): Likewise.
6382 (emit_mvn): Likewise.
6383 (emit_lslv): Likewise.
6384 (emit_lsrv): Likewise.
6385 (emit_asrv): Likewise.
6386 (emit_mul): Likewise.
6387 (emit_sbfm): Likewise.
6388 (emit_sbfx): Likewise.
6389 (emit_ubfm): Likewise.
6390 (emit_ubfx): Likewise.
6391 (emit_csinc): Likewise.
6392 (emit_cset): Likewise.
6393 (emit_nop): Likewise.
6394 (emit_ops_insns): New helper function.
6395 (emit_pop): Likewise.
6396 (emit_push): Likewise.
6397 (aarch64_emit_prologue): New function.
6398 (aarch64_emit_epilogue): Likewise.
6399 (aarch64_emit_add): Likewise.
6400 (aarch64_emit_sub): Likewise.
6401 (aarch64_emit_mul): Likewise.
6402 (aarch64_emit_lsh): Likewise.
6403 (aarch64_emit_rsh_signed): Likewise.
6404 (aarch64_emit_rsh_unsigned): Likewise.
6405 (aarch64_emit_ext): Likewise.
6406 (aarch64_emit_log_not): Likewise.
6407 (aarch64_emit_bit_and): Likewise.
6408 (aarch64_emit_bit_or): Likewise.
6409 (aarch64_emit_bit_xor): Likewise.
6410 (aarch64_emit_bit_not): Likewise.
6411 (aarch64_emit_equal): Likewise.
6412 (aarch64_emit_less_signed): Likewise.
6413 (aarch64_emit_less_unsigned): Likewise.
6414 (aarch64_emit_ref): Likewise.
6415 (aarch64_emit_if_goto): Likewise.
6416 (aarch64_emit_goto): Likewise.
6417 (aarch64_write_goto_address): Likewise.
6418 (aarch64_emit_const): Likewise.
6419 (aarch64_emit_call): Likewise.
6420 (aarch64_emit_reg): Likewise.
6421 (aarch64_emit_pop): Likewise.
6422 (aarch64_emit_stack_flush): Likewise.
6423 (aarch64_emit_zero_ext): Likewise.
6424 (aarch64_emit_swap): Likewise.
6425 (aarch64_emit_stack_adjust): Likewise.
6426 (aarch64_emit_int_call_1): Likewise.
6427 (aarch64_emit_void_call_2): Likewise.
6428 (aarch64_emit_eq_goto): Likewise.
6429 (aarch64_emit_ne_goto): Likewise.
6430 (aarch64_emit_lt_goto): Likewise.
6431 (aarch64_emit_le_goto): Likewise.
6432 (aarch64_emit_gt_goto): Likewise.
6433 (aarch64_emit_ge_got): Likewise.
6434 (aarch64_emit_ops_impl): New static global variable.
6435 (aarch64_emit_ops): New target function, return
6436 &aarch64_emit_ops_impl.
6437 (struct linux_target_ops): Install it.
6439 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6441 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6442 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6444 * linux-aarch64-ipa.c: New file.
6445 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6447 (aarch64_get_thread_area): New target method.
6448 (extract_signed_bitfield): New helper function.
6449 (aarch64_decode_ldr_literal): New function.
6450 (enum aarch64_opcodes): New enum.
6451 (struct aarch64_register): New struct.
6452 (struct aarch64_operand): New struct.
6453 (x0): New static global.
6462 (aarch64_register): New helper function.
6463 (register_operand): Likewise.
6464 (immediate_operand): Likewise.
6465 (struct aarch64_memory_operand): New struct.
6466 (offset_memory_operand): New helper function.
6467 (preindex_memory_operand): Likewise.
6468 (enum aarch64_system_control_registers): New enum.
6469 (ENCODE): New macro.
6470 (emit_insn): New helper function.
6471 (emit_b): New function.
6472 (emit_bcond): Likewise.
6473 (emit_cb): Likewise.
6474 (emit_tb): Likewise.
6475 (emit_blr): Likewise.
6476 (emit_stp): Likewise.
6477 (emit_ldp_q_offset): Likewise.
6478 (emit_stp_q_offset): Likewise.
6479 (emit_load_store): Likewise.
6480 (emit_ldr): Likewise.
6481 (emit_ldrsw): Likewise.
6482 (emit_str): Likewise.
6483 (emit_ldaxr): Likewise.
6484 (emit_stxr): Likewise.
6485 (emit_stlr): Likewise.
6486 (emit_data_processing_reg): Likewise.
6487 (emit_data_processing): Likewise.
6488 (emit_add): Likewise.
6489 (emit_sub): Likewise.
6490 (emit_mov): Likewise.
6491 (emit_movk): Likewise.
6492 (emit_mov_addr): Likewise.
6493 (emit_mrs): Likewise.
6494 (emit_msr): Likewise.
6495 (emit_sevl): Likewise.
6496 (emit_wfe): Likewise.
6497 (append_insns): Likewise.
6498 (can_encode_int32_in): New helper function.
6499 (aarch64_relocate_instruction): New function.
6500 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6501 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6502 (struct linux_target_ops): Install aarch64_get_thread_area,
6503 aarch64_install_fast_tracepoint_jump_pad and
6504 aarch64_get_min_fast_tracepoint_insn_len.
6506 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6508 * Makefile.in (aarch64-insn.o): New rule.
6509 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6511 2015-09-21 Yao Qi <yao.qi@linaro.org>
6513 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6515 2015-09-21 Yao Qi <yao.qi@linaro.org>
6517 * tracepoint.c (max_jump_pad_size): Remove.
6519 2015-09-18 Yao Qi <yao.qi@linaro.org>
6521 * linux-aarch64-low.c: Don't include sys/uio.h.
6522 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6524 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6526 * tracepoint.c (eval_result_type): Change prototype.
6527 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6529 2015-09-15 Pedro Alves <palves@redhat.com>
6531 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6532 Check whether to report exec events instead of checking whether
6533 multiprocess is enabled.
6535 2015-09-15 Pedro Alves <palves@redhat.com>
6538 * remote-utils.c (prepare_resume_reply): Merge
6539 TARGET_WAITKIND_VFORK_DONE switch case with the
6540 TARGET_WAITKIND_FORKED case.
6542 2015-09-15 Yao Qi <yao.qi@linaro.org>
6544 * server.c (handle_query): Check string comparison using
6545 "else if" instead of "if".
6547 2015-09-15 Yao Qi <yao.qi@linaro.org>
6549 * server.c (vCont_supported): New global variable.
6550 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6551 matches. Append ";vContSupported+" to own_buf.
6552 (handle_v_requests): Append ";s;S" to own_buf if target supports
6553 hardware single step or vCont_supported is false.
6554 (capture_main): Set vCont_supported to zero.
6556 2015-09-15 Yao Qi <yao.qi@linaro.org>
6558 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6560 (linux_supports_hardware_single_step): ... New function.
6561 (linux_target_ops): Update.
6562 * lynx-low.c (lynx_target_ops): Set field
6563 supports_hardware_single_step to target_can_do_hardware_single_step.
6564 * nto-low.c (nto_target_ops): Likewise.
6565 * spu-low.c (spu_target_ops): Likewise.
6566 * win32-low.c (win32_target_ops): Likewise.
6567 * target.c (target_can_do_hardware_single_step): New function.
6568 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6569 Remove. <supports_hardware_single_step>: New field.
6570 (target_supports_conditional_breakpoints): Remove.
6571 (target_supports_hardware_single_step): New macro.
6572 (target_can_do_hardware_single_step): Declare.
6573 * server.c (handle_query): Use target_supports_hardware_single_step
6574 instead of target_supports_conditional_breakpoints.
6576 2015-09-15 Yao Qi <yao.qi@linaro.org>
6578 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6580 (struct linux_target_ops the_low_target): Install
6581 aarch64_linux_siginfo_fixup.
6583 2015-09-11 Don Breazeal <donb@codesourcery.com>
6584 Luis Machado <lgustavo@codesourcery.com>
6586 * linux-low.c (linux_mourn): Static declaration.
6587 (linux_arch_setup): Move in front of
6588 handle_extended_wait.
6589 (linux_arch_setup_thread): New function.
6590 (handle_extended_wait): Handle exec events. Call
6591 linux_arch_setup_thread. Make event_lwp argument a
6592 pointer-to-a-pointer.
6593 (check_zombie_leaders): Do not check stopped threads.
6594 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6595 (linux_low_filter_event): Add lwp and thread for exec'ing
6596 non-leader thread if leader thread has been deleted.
6597 Refactor code into linux_arch_setup_thread and call it.
6598 Pass child lwp pointer by reference to handle_extended_wait.
6599 (linux_wait_for_event_filtered): Update comment.
6600 (linux_wait_1): Prevent clobbering exec event status.
6601 (linux_supports_exec_events): New function.
6602 (linux_target_ops) <supports_exec_events>: Initialize new member.
6603 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6605 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6606 * server.c (report_exec_events): New global variable.
6607 (handle_query): Handle qSupported query for exec-events feature.
6608 (captured_main): Initialize report_exec_events.
6609 * server.h (report_exec_events): Declare new global variable.
6610 * target.h (struct target_ops) <supports_exec_events>: New
6612 (target_supports_exec_events): New macro.
6613 * win32-low.c (win32_target_ops) <supports_exec_events>:
6614 Initialize new member.
6616 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6618 * linux-low.c (linux_low_enable_btrace): Remove.
6619 (linux_target_ops): Replace linux_low_enable_btrace with
6620 linux_enable_btrace.
6622 2015-09-03 Yao Qi <yao.qi@linaro.org>
6624 * linux-aarch64-low.c (aarch64_insert_point): Call
6625 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6628 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6630 * linux-low.c (check_stopped_by_breakpoint): Use
6631 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6633 2015-08-27 Pedro Alves <palves@redhat.com>
6635 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6637 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6639 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6640 the XNEW-family equivalent.
6641 (compile_bytecodes): Likewise.
6642 * dll.c (loaded_dll): Likewise.
6643 * event-loop.c (append_callback_event): Likewise.
6644 (create_file_handler): Likewise.
6645 (create_file_event): Likewise.
6646 * hostio.c (handle_open): Likewise.
6647 * inferiors.c (add_thread): Likewise.
6648 (add_process): Likewise.
6649 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6650 * linux-arm-low.c (arm_new_process): Likewise.
6651 (arm_new_thread): Likewise.
6652 * linux-low.c (add_to_pid_list): Likewise.
6653 (linux_add_process): Likewise.
6654 (handle_extended_wait): Likewise.
6655 (add_lwp): Likewise.
6656 (enqueue_one_deferred_signal): Likewise.
6657 (enqueue_pending_signal): Likewise.
6658 (linux_resume_one_lwp_throw): Likewise.
6659 (linux_resume_one_thread): Likewise.
6660 (linux_read_memory): Likewise.
6661 (linux_write_memory): Likewise.
6662 * linux-mips-low.c (mips_linux_new_process): Likewise.
6663 (mips_linux_new_thread): Likewise.
6664 (mips_add_watchpoint): Likewise.
6665 * linux-x86-low.c (initialize_low_arch): Likewise.
6666 * lynx-low.c (lynx_add_process): Likewise.
6667 * mem-break.c (set_raw_breakpoint_at): Likewise.
6668 (set_breakpoint): Likewise.
6669 (add_condition_to_breakpoint): Likewise.
6670 (add_commands_to_breakpoint): Likewise.
6671 (clone_agent_expr): Likewise.
6672 (clone_one_breakpoint): Likewise.
6673 * regcache.c (new_register_cache): Likewise.
6674 * remote-utils.c (look_up_one_symbol): Likewise.
6675 * server.c (queue_stop_reply): Likewise.
6676 (start_inferior): Likewise.
6677 (queue_stop_reply_callback): Likewise.
6678 (handle_target_event): Likewise.
6679 * spu-low.c (fetch_ppc_memory): Likewise.
6680 (store_ppc_memory): Likewise.
6681 * target.c (set_target_ops): Likewise.
6682 * thread-db.c (thread_db_load_search): Likewise.
6683 (try_thread_db_load_1): Likewise.
6684 * tracepoint.c (add_tracepoint): Likewise.
6685 (add_tracepoint_action): Likewise.
6686 (create_trace_state_variable): Likewise.
6687 (cmd_qtdpsrc): Likewise.
6688 (cmd_qtro): Likewise.
6689 (add_while_stepping_state): Likewise.
6690 * win32-low.c (child_add_thread): Likewise.
6691 (get_image_name): Likewise.
6693 2015-08-25 Yao Qi <yao.qi@linaro.org>
6695 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6697 2015-08-25 Yao Qi <yao.qi@linaro.org>
6699 * Makefile.in (aarch64-linux.o): New rule.
6700 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6702 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6703 (aarch64_init_debug_reg_state): Make it extern.
6704 (aarch64_linux_prepare_to_resume): Remove.
6706 2015-08-25 Yao Qi <yao.qi@linaro.org>
6708 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6709 lwp_arch_private_info and ptid_of_lwp.
6711 2015-08-25 Yao Qi <yao.qi@linaro.org>
6713 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6714 Find proc_info by find_process_pid. All callers updated.
6716 2015-08-25 Yao Qi <yao.qi@linaro.org>
6718 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6720 (debug_reg_change_callback): Remove.
6721 (aarch64_notify_debug_reg_change): Remove.
6723 2015-08-25 Yao Qi <yao.qi@linaro.org>
6725 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6726 Call current_lwp_ptid.
6728 2015-08-25 Yao Qi <yao.qi@linaro.org>
6730 * linux-aarch64-low.c (debug_reg_change_callback): Use
6733 2015-08-25 Yao Qi <yao.qi@linaro.org>
6735 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6737 2015-08-25 Yao Qi <yao.qi@linaro.org>
6739 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6741 2015-08-25 Yao Qi <yao.qi@linaro.org>
6743 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6746 2015-08-25 Yao Qi <yao.qi@linaro.org>
6748 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6750 (debug_reg_change_callback): Remove argument entry and add argument
6751 lwp. Remove local variable thread. Don't print thread id in the
6752 debugging output. Don't check whether pid of thread equals to pid.
6753 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6754 iterate_over_lwps instead find_inferior.
6756 2015-08-24 Pedro Alves <palves@redhat.com>
6758 * inferiors.c (get_first_process): New function.
6759 * inferiors.h (get_first_process): New declaration.
6760 * remote-utils.c (read_ptid): Default to the first process in the
6761 list, instead of to the current thread's process.
6763 2015-08-24 Pedro Alves <palves@redhat.com>
6765 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6766 * event-loop.c: Likewise.
6767 * remote-utils.c: Likewise.
6768 * tracepoint.c: Likewise.
6770 2015-08-24 Pedro Alves <palves@redhat.com>
6772 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6775 2015-08-21 Pedro Alves <palves@redhat.com>
6777 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6778 instead of literal 1.
6780 2015-08-21 Pedro Alves <palves@redhat.com>
6782 * tdesc.c (default_description): Explicitly zero-initialize.
6784 2015-08-21 Pedro Alves <palves@redhat.com>
6787 * inferiors.c (remove_thread): Discard any pending stop reply for
6789 * server.c (remove_all_on_match_pid): Rename to ...
6790 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6792 (discard_queued_stop_replies): Change parameter to a ptid. Now
6794 (handle_v_kill, kill_inferior_callback, captured_main)
6795 (process_serial_event): Adjust.
6796 * server.h (discard_queued_stop_replies): Declare.
6798 2015-08-21 Pedro Alves <palves@redhat.com>
6800 * linux-low.c (wait_for_sigstop): Always switch to no thread
6801 selected if the previously current thread dies.
6802 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6803 process instead of the current thread's.
6804 * remote-utils.c (input_interrupt): Don't check if there's no
6806 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6807 current thread to the general thread fails, error out.
6808 (handle_qxfer_auxv, handle_qxfer_libraries)
6809 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6810 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6811 (handle_query): Check if there's a thread selected instead of
6812 checking whether there's any thread in the thread list.
6813 (handle_qxfer_threads, handle_qxfer_btrace)
6814 (handle_qxfer_btrace_conf): Don't error out early if there's no
6815 thread in the thread list.
6816 (handle_v_cont, myresume): Don't set the current thread to the
6818 (process_serial_event) <Hg handling>: Also set thread_id if the
6819 previous general thread is still alive.
6820 (process_serial_event) <g/G handling>: If setting the current
6821 thread to the general thread fails, error out.
6822 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6823 thread's lwp instead of the current thread's.
6824 * target.c (set_desired_thread): If the desired thread was not
6825 found, leave the current thread pointing to NULL. Return an int
6826 (boolean) indicating success.
6827 * target.h (set_desired_thread): Change return type to int.
6829 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6831 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6832 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6834 (ps_get_thread_area): New function.
6836 2015-08-19 Gary Benson <gbenson@redhat.com>
6838 * hostio.c (handle_pread): Do not attempt to read more data
6839 than hostio_reply_with_data can fit in a packet.
6841 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6843 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6845 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6847 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6849 2015-08-06 Pedro Alves <palves@redhat.com>
6851 * tracepoint.c (expr_eval_result): Now an int.
6853 2015-08-06 Pedro Alves <palves@redhat.com>
6855 * gdbthread.h (struct regcache): Forward declare.
6856 (struct thread_info) <regcache_data>: Now a struct regcache
6858 * inferiors.c (inferior_regcache_data)
6859 (set_inferior_regcache_data): Now work with struct regcache
6861 * inferiors.h (struct regcache): Forward declare.
6862 (inferior_regcache_data, set_inferior_regcache_data): Now work
6863 with struct regcache pointers.
6864 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6865 (free_register_cache_thread): Remove struct regcache pointer
6868 2015-08-06 Pedro Alves <palves@redhat.com>
6870 * server.c (captured_main): On error, print the exception message
6871 to stderr, and if run_once is set, throw a quit.
6873 2015-08-06 Pedro Alves <palves@redhat.com>
6875 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6878 2015-08-06 Pedro Alves <palves@redhat.com>
6880 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6881 reading beyond the passed in buffer length.
6883 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6885 * tracepoint.c (symbol_list) <required>: Remove.
6887 2015-08-06 Pedro Alves <palves@redhat.com>
6889 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6890 count if stopping and suspending threads.
6891 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6892 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6893 (linux_detach): Complete an ongoing step-over.
6894 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6896 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6897 (linux_wait_1): If passing a signal to the inferior after
6898 finishing a step-over, unsuspend and re-resume all lwps. If we
6899 see a single-step event but the thread should be continuing, don't
6900 pass the trap to gdb.
6901 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6902 internal_error instead of gdb_assert.
6903 (enqueue_pending_signal): New function.
6904 (check_ptrace_stopped_lwp_gone): Add debug output.
6905 (start_step_over): Use internal_error instead of gdb_assert.
6906 (complete_ongoing_step_over): New function.
6907 (linux_resume_one_thread): Don't resume a suspended thread.
6908 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6911 2015-08-06 Pedro Alves <palves@redhat.com>
6913 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6914 (linux_thread_alive): Use lwp_is_marked_dead.
6915 (extended_event_reported): Delete.
6916 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6917 instead of extended_event_reported.
6918 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6920 (lwp_is_marked_dead): New function.
6921 (lwp_running): Use lwp_is_marked_dead.
6922 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6925 2015-08-06 Pedro Alves <palves@redhat.com>
6927 * linux-low.c (linux_wait_1): Move fork event output out of the
6928 !report_to_gdb check. Pass event_child->waitstatus to
6929 target_waitstatus_to_string instead of ourstatus.
6931 2015-08-04 Yao Qi <yao.qi@linaro.org>
6933 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6934 if current_thread is 32 bit.
6936 2015-08-04 Yao Qi <yao.qi@linaro.org>
6938 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6939 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6940 * server.c (extended_protocol): Remove "static".
6941 * server.h (extended_protocol): Declare it.
6943 2015-08-04 Yao Qi <yao.qi@linaro.org>
6945 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6946 both aarch64 and aarch32.
6947 (aarch64_set_pc): Likewise.
6949 2015-08-04 Yao Qi <yao.qi@linaro.org>
6951 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6952 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6953 arm-with-neon.xml to srv_xmlfiles.
6954 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6955 (is_64bit_tdesc): New function.
6956 (aarch64_linux_read_description): New function.
6957 (aarch64_arch_setup): Call aarch64_linux_read_description.
6958 (regs_info): Rename to regs_info_aarch64.
6959 (aarch64_regs_info): Return right regs_info.
6960 (initialize_low_arch): Call initialize_low_arch_aarch32.
6962 2015-08-04 Yao Qi <yao.qi@linaro.org>
6964 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6965 * linux-aarch32-low.c: New file.
6966 * linux-aarch32-low.h: New file.
6967 * linux-arm-low.c (arm_fill_gregset): Move it to
6968 linux-aarch32-low.c.
6969 (arm_store_gregset): Likewise.
6970 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6971 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6972 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6973 (regs_info): Rename to regs_info_arm.
6974 (arm_regs_info): Return regs_info_aarch32 if
6975 have_ptrace_getregset is 1 and target description is
6976 arm_with_neon or arm_with_vfpv3.
6977 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6978 Call initialize_low_arch_aarch32 instead.
6980 2015-08-04 Yao Qi <yao.qi@linaro.org>
6982 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6983 * linux-low.c: ... here.
6984 * linux-low.h (have_ptrace_getregset): Declare it.
6986 2015-08-04 Pedro Alves <palves@redhat.com>
6988 * thread-db.c (struct thread_db): Use new typedefs.
6989 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6991 (disable_thread_event_reporting): Cast result of dlsym to
6992 destination function pointer type.
6993 (thread_db_mourn): Use td_ta_delete_ftype.
6995 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6997 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6999 (CDX_BREAKPOINT): Define for R2.
7000 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7001 (the_low_target): Add comments.
7003 2015-07-30 Yao Qi <yao.qi@linaro.org>
7005 * linux-arm-low.c (arm_hwcap): Remove it.
7006 (arm_read_description): New local variable arm_hwcap. Don't
7007 set arm_hwcap to zero.
7009 2015-07-30 Yao Qi <yao.qi@linaro.org>
7011 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7012 Use regcache->tdesc instead.
7013 (arm_store_wmmxregset): Likewise.
7014 (arm_fill_vfpregset): Likewise.
7015 (arm_store_vfpregset): Likewise.
7017 2015-07-30 Yao Qi <yao.qi@linaro.org>
7019 * linux-arm-low.c: Include arch/arm.h.
7020 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7021 (arm_store_gregset): Likewise.
7023 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7025 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7026 ptrace's 4th parameter.
7028 2015-07-27 Yao Qi <yao.qi@linaro.org>
7030 * configure.srv (case aarch64*-*-linux*): Don't set
7033 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7035 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7037 * linux-arm-low.c: Likewise.
7038 * linux-cris-low.c: Likewise.
7039 * linux-crisv32-low.c: Likewise.
7040 * linux-low.c: Likewise.
7041 * linux-m68k-low.c: Likewise.
7042 * linux-mips-low.c: Likewise.
7043 * linux-nios2-low.c: Likewise.
7044 * linux-s390-low.c: Likewise.
7045 * linux-sparc-low.c: Likewise.
7046 * linux-tic6x-low.c: Likewise.
7047 * linux-tile-low.c: Likewise.
7048 * linux-x86-low.c: Likewise.
7050 2015-07-24 Pedro Alves <palves@redhat.com>
7052 * config.in: Regenerate.
7053 * configure: Regenerate.
7055 2015-07-24 Pedro Alves <palves@redhat.com>
7057 * acinclude.m4: Include ../ptrace.m4.
7058 * configure.ac: Call GDB_AC_PTRACE.
7059 * config.in, configure: Regenerate.
7061 2015-07-24 Yao Qi <yao.qi@linaro.org>
7063 * linux-low.c (linux_create_inferior): Remove setting to
7064 proc->priv->new_inferior.
7065 (linux_attach): Likewise.
7066 (linux_low_filter_event): Likewise.
7067 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7069 2015-07-24 Yao Qi <yao.qi@linaro.org>
7071 * linux-low.c (linux_arch_setup): New function.
7072 (linux_low_filter_event): If proc->tdesc is NULL and
7073 proc->attached is true, call the_low_target.arch_setup.
7074 Otherwise, keep status pending, and return.
7075 (linux_resume_one_lwp_throw): Don't call get_pc if
7076 thread->while_stepping isn't NULL. Don't call
7077 get_thread_regcache if proc->tdesc is NULL.
7078 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7079 (linux_target_ops): Install arch_setup.
7080 * server.c (start_inferior): Call the_target->arch_setup.
7081 * target.h (struct target_ops) <arch_setup>: New field.
7082 (target_arch_setup): New marco.
7083 * lynx-low.c (lynx_target_ops): Update.
7084 * nto-low.c (nto_target_ops): Update.
7085 * spu-low.c (spu_target_ops): Update.
7086 * win32-low.c (win32_target_ops): Update.
7088 2015-07-24 Yao Qi <yao.qi@linaro.org>
7090 * linux-low.c (linux_add_process): Don't set
7091 proc->priv->new_inferior.
7092 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7093 (linux_attach): Likewise.
7095 2015-07-24 Yao Qi <yao.qi@linaro.org>
7097 * server.c (start_inferior): Code refactor.
7099 2015-07-24 Yao Qi <yao.qi@linaro.org>
7101 * server.c (process_serial_event): Set general_thread.
7103 2015-07-21 Yao Qi <yao.qi@linaro.org>
7105 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7106 aarch64_linux_get_debug_reg_capacity.
7108 2015-07-17 Yao Qi <yao.qi@linaro.org>
7110 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7111 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7112 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7113 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7114 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7115 (AARCH64_HWP_ALIGNMENT): Likewise.
7116 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7117 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7118 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7119 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7120 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7121 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7122 (struct aarch64_debug_reg_state): Likewise.
7123 (struct arch_lwp_info): Likewise.
7124 (aarch64_align_watchpoint): Likewise.
7125 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7126 (aarch64_watchpoint_length): Likewise.
7127 (aarch64_point_encode_ctrl_reg): Likewise
7128 (aarch64_point_is_aligned): Likewise.
7129 (aarch64_align_watchpoint): Likewise.
7130 (aarch64_linux_set_debug_regs):
7131 (aarch64_dr_state_insert_one_point): Likewise.
7132 (aarch64_dr_state_remove_one_point): Likewise.
7133 (aarch64_handle_breakpoint): Likewise.
7134 (aarch64_handle_aligned_watchpoint): Likewise.
7135 (aarch64_handle_unaligned_watchpoint): Likewise.
7136 (aarch64_handle_watchpoint): Likewise.
7138 2015-07-17 Yao Qi <yao.qi@linaro.org>
7140 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7141 and don't aarch64_get_debug_reg_state. All callers update.
7142 (aarch64_handle_aligned_watchpoint): Likewise.
7143 (aarch64_handle_unaligned_watchpoint): Likewise.
7144 (aarch64_handle_watchpoint): Likewise.
7145 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7146 (aarch64_remove_point): Likewise.
7148 2015-07-17 Yao Qi <yao.qi@linaro.org>
7150 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7152 (aarch64_handle_unaligned_watchpoint): Likewise.
7154 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7156 Revert the previous 3 commits:
7157 Move gdb_regex* to common/
7158 Move linux_find_memory_regions_full & co.
7159 gdbserver build-id attribute generator
7161 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7162 Jan Kratochvil <jan.kratochvil@redhat.com>
7164 gdbserver build-id attribute generator.
7165 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7166 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7167 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7169 (get_dynamic): Use find_pdhr to traverse program headers.
7170 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7171 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7172 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7173 (get_hex_build_id): New.
7174 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7175 to reply XML document.
7177 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7178 Jan Kratochvil <jan.kratochvil@redhat.com>
7180 * target.c: Include target/target-utils.h and fcntl.h.
7181 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7182 (target_fileio_read_stralloc): New functions.
7184 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7186 * Makefile.in (OBS): Add gdb_regex.o.
7188 * config.in: Rebuilt.
7189 * configure: Rebuilt.
7191 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7192 Jan Kratochvil <jan.kratochvil@redhat.com>
7194 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7195 * Makefile.in (OBS): Add target-utils.o.
7196 (linux-maps.o, target-utils.o): New.
7197 * configure.srv (srv_linux_obj): Add linux-maps.o.
7199 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7201 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7203 (the_low_target): Install it.
7205 2015-07-14 Pedro Alves <palves@redhat.com>
7207 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7208 Instead, ignore ECHILD, and throw an error for other errnos.
7210 2015-07-10 Pedro Alves <palves@redhat.com>
7212 * event-loop.c (struct callback_event) <data>: Change type to
7213 gdb_client_data instance instead of gdb_client_data pointer.
7214 (append_callback_event): Adjust.
7216 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7218 * linux-aarch64-low.c: Add comments for each linux_target_ops
7219 method. Remove comments already covered in target_ops and
7220 linux_target_ops definitions.
7221 (the_low_target): Add comments for each unimplemented method.
7223 2015-07-09 Yao Qi <yao.qi@linaro.org>
7225 * linux-aarch64-low.c (aarch64_regmap): Remove.
7226 (aarch64_usrregs_info): Remove.
7227 (regs_info): Set field usrregs to NULL.
7229 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7231 * linux-low.c: Include "rsp-low.h"
7232 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7233 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7234 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7235 (handle_btrace_enable_pt): New.
7236 (handle_btrace_general_set): Support "pt".
7237 (handle_btrace_conf_general_set): Support "pt:size".
7239 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7241 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7244 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7246 * linux-aarch64-low.c: Remove comment about endianness.
7247 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7248 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7251 2015-06-24 Gary Benson <gbenson@redhat.com>
7253 * linux-i386-ipa.c (stdint.h): Do not include.
7254 * lynx-i386-low.c (stdint.h): Likewise.
7255 * lynx-ppc-low.c (stdint.h): Likewise.
7256 * mem-break.c (stdint.h): Likewise.
7257 * thread-db.c (stdint.h): Likewise.
7258 * tracepoint.c (stdint.h): Likewise.
7259 * win32-low.c (stdint.h): Likewise.
7261 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7263 * server.c (write_qxfer_response): Update call to
7264 remote_escape_output.
7266 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7267 Jan Kratochvil <jan.kratochvil@redhat.com>
7269 Merge multiple hex conversions.
7270 * gdbreplay.c (tohex): Rename to 'fromhex'.
7271 (logchar): Use fromhex.
7273 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7275 * server.c (handle_qxfer_libraries): Set `version' attribute for
7278 2015-06-10 Gary Benson <gbenson@redhat.com>
7280 * target.h (struct target_ops) <multifs_open>: New field.
7281 <multifs_unlink>: Likewise.
7282 <multifs_readlink>: Likewise.
7283 * linux-low.c (nat/linux-namespaces.h): New include.
7284 (linux_target_ops): Initialize the_target->multifs_open,
7285 the_target->multifs_unlink and the_target->multifs_readlink.
7286 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7287 * hostio.c (hostio_fs_pid): New static variable.
7288 (hostio_handle_new_gdb_connection): New function.
7289 (handle_setfs): Likewise.
7290 (handle_open): Use the_target->multifs_open as appropriate.
7291 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7292 (handle_readlink): Use the_target->multifs_readlink as
7294 (handle_vFile): Handle vFile:setfs packets.
7295 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7296 after target_handle_new_gdb_connection.
7298 2015-06-10 Gary Benson <gbenson@redhat.com>
7300 * configure.ac (AC_CHECK_FUNCS): Add setns.
7301 * config.in: Regenerate.
7302 * configure: Likewise.
7303 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7304 (linux-namespaces.o): New rule.
7305 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7307 2015-06-09 Gary Benson <gbenson@redhat.com>
7309 * hostio.c (handle_open): Process mode argument with
7310 fileio_to_host_mode.
7312 2015-06-01 Yao Qi <yao.qi@linaro.org>
7314 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7315 * linux-x86-low.c: Likewise.
7317 2015-05-28 Don Breazeal <donb@codesourcery.com>
7319 * linux-low.c (handle_extended_wait): Initialize
7320 thread_info.last_resume_kind for new fork children.
7322 2015-05-15 Pedro Alves <palves@redhat.com>
7324 * target.h (target_handle_new_gdb_connection): Rewrite using if
7325 wrapped in do/while.
7327 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7329 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7330 * configure, config.in: Regenerate.
7331 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7334 2015-05-12 Don Breazeal <donb@codesourcery.com>
7336 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7337 PTRACE_EVENT_VFORK_DONE.
7338 (linux_low_ptrace_options, extended_event_reported): Add vfork
7340 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7341 and "vforkdone" for RSP 'T' Stop Reply Packet.
7342 * server.h (report_vfork_events): Declare
7345 2015-05-12 Don Breazeal <donb@codesourcery.com>
7347 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7348 (the_low_target) <new_fork>: Initialize new member.
7349 * linux-arm-low.c (arm_new_fork): New function.
7350 (the_low_target) <new_fork>: Initialize new member.
7351 * linux-low.c (handle_extended_wait): Call new target function
7353 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7354 * linux-mips-low.c (mips_add_watchpoint): New function
7355 extracted from mips_insert_point.
7356 (the_low_target) <new_fork>: Initialize new member.
7357 (mips_linux_new_fork): New function.
7358 (mips_insert_point): Call mips_add_watchpoint.
7359 * linux-x86-low.c (x86_linux_new_fork): New function.
7360 (the_low_target) <new_fork>: Initialize new member.
7362 2015-05-12 Don Breazeal <donb@codesourcery.com>
7364 * linux-low.c (handle_extended_wait): Implement return value,
7365 rename argument 'event_child' to 'event_lwp', handle
7366 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7367 (linux_low_ptrace_options): New function.
7368 (linux_low_filter_event): Call linux_low_ptrace_options,
7369 use different argument fo linux_enable_event_reporting,
7370 use return value from handle_extended_wait.
7371 (extended_event_reported): New function.
7372 (linux_wait_1): Call extended_event_reported and set
7373 status to report fork events.
7374 (linux_write_memory): Add pid to debug message.
7375 (reset_lwp_ptrace_options_callback): New function.
7376 (linux_handle_new_gdb_connection): New function.
7377 (linux_target_ops): Initialize new structure member.
7378 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7379 * lynx-low.c: Initialize new structure member.
7380 * remote-utils.c (prepare_resume_reply): Implement stop reason
7381 "fork" for "T" stop message.
7382 * server.c (handle_query): Call handle_new_gdb_connection.
7383 * server.h (report_fork_events): Declare global flag.
7384 * target.h (struct target_ops) <handle_new_gdb_connection>:
7386 (target_handle_new_gdb_connection): New macro.
7387 * win32-low.c: Initialize new structure member.
7389 2015-05-12 Don Breazeal <donb@codesourcery.com>
7391 * mem-break.c (APPEND_TO_LIST): Define macro.
7392 (clone_agent_expr): New function.
7393 (clone_one_breakpoint): New function.
7394 (clone_all_breakpoints): New function.
7395 * mem-break.h: Declare new functions.
7397 2015-05-12 Don Breazeal <donb@codesourcery.com>
7399 * linux-low.c (linux_supports_fork_events): New function.
7400 (linux_supports_vfork_events): New function.
7401 (linux_target_ops): Initialize new structure members.
7402 (initialize_low): Call linux_check_ptrace_features.
7403 * lynx-low.c (lynx_target_ops): Initialize new structure
7405 * server.c (report_fork_events, report_vfork_events):
7407 (handle_query): Add new features to qSupported packet and
7409 (captured_main): Initialize new global variables.
7410 * target.h (struct target_ops) <supports_fork_events>:
7412 <supports_vfork_events>: New member.
7413 (target_supports_fork_events): New macro.
7414 (target_supports_vfork_events): New macro.
7415 * win32-low.c (win32_target_ops): Initialize new structure
7418 2015-05-12 Gary Benson <gbenson@redhat.com>
7420 * server.c (handle_qxfer_exec_file): Use current process
7423 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7425 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7426 Remove HAVE_PTRACE_GETREGS conditionals.
7427 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7428 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7430 2015-05-08 Yao Qi <yao.qi@linaro.org>
7432 * linux-low.c (linux_supports_conditional_breakpoints): New
7434 (linux_target_ops): Install new target method.
7435 * lynx-low.c (lynx_target_ops): Install NULL hook for
7436 supports_conditional_breakpoints.
7437 * nto-low.c (nto_target_ops): Likewise.
7438 * spu-low.c (spu_target_ops): Likewise.
7439 * win32-low.c (win32_target_ops): Likewise.
7440 * server.c (handle_query): Check
7441 target_supports_conditional_breakpoints.
7442 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7444 (target_supports_conditional_breakpoints): New macro.
7446 2015-05-06 Pedro Alves <palves@redhat.com>
7449 * server.c (start_inferior): If the process exits, mourn it.
7451 2015-04-21 Gary Benson <gbenson@redhat.com>
7453 * hostio.c (fileio_open_flags_to_host): Factored out to
7454 fileio_to_host_openflags in common/fileio.c. Single use
7457 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7459 * linux-xtensa-low.c (xtensa_fill_gregset)
7460 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7463 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7465 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7466 (regs_info): Replace usrregs pointer with NULL.
7468 2015-04-17 Gary Benson <gbenson@redhat.com>
7470 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7471 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7472 * server.c (handle_qxfer_exec_file): New function.
7473 (qxfer_packets): Add exec-file entry.
7474 (handle_query): Report qXfer:exec-file:read as supported packet.
7476 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7478 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7480 2015-04-09 Gary Benson <gbenson@redhat.com>
7482 * hostio-errno.c (errno_to_fileio_error): Remove function.
7483 Update caller to use remote_fileio_to_fio_error.
7485 2015-04-09 Yao Qi <yao.qi@linaro.org>
7487 * linux-low.c (linux_insert_point): Call
7488 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7489 (linux_remove_point): Call remove_memory_breakpoint if type is
7491 * linux-x86-low.c (x86_insert_point): Don't call
7492 insert_memory_breakpoint.
7493 (x86_remove_point): Don't call remove_memory_breakpoint.
7495 2015-04-01 Pedro Alves <palves@redhat.com>
7496 Cleber Rosa <crosa@redhat.com>
7498 * server.c (gdbserver_usage): Reorganize and extend the usage
7501 2015-03-24 Pedro Alves <palves@redhat.com>
7503 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7504 output. Also dump TRAP_TRACE.
7505 (linux_low_filter_event): In debug output, distinguish a
7506 resume_stop SIGSTOP from a delayed SIGSTOP.
7508 2015-03-24 Gary Benson <gbenson@redhat.com>
7510 * linux-x86-low.c (x86_linux_new_thread): Moved to
7512 (x86_linux_prepare_to_resume): Likewise.
7514 2015-03-24 Gary Benson <gbenson@redhat.com>
7516 * Makefile.in (x86-linux-dregs.o): New rule.
7517 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7518 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7519 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7520 (x86_linux_dr_get): Likewise.
7521 (x86_linux_dr_set): Likewise.
7522 (update_debug_registers_callback): Likewise.
7523 (x86_linux_dr_set_addr): Likewise.
7524 (x86_linux_dr_get_addr): Likewise.
7525 (x86_linux_dr_set_control): Likewise.
7526 (x86_linux_dr_get_control): Likewise.
7527 (x86_linux_dr_get_status): Likewise.
7528 (x86_linux_update_debug_registers): Likewise.
7530 2015-03-24 Gary Benson <gbenson@redhat.com>
7532 * linux-x86-low.c (x86_linux_update_debug_registers):
7533 New function, factored out from...
7534 (x86_linux_prepare_to_resume): ...this.
7536 2015-03-24 Gary Benson <gbenson@redhat.com>
7538 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7539 (x86_linux_dr_set): Likewise.
7540 (update_debug_registers_callback): Likewise.
7541 (x86_linux_dr_set_addr): Likewise.
7542 (x86_linux_dr_get_addr): Likewise.
7543 (x86_linux_dr_set_control): Likewise.
7544 (x86_linux_dr_get_control): Likewise.
7545 (x86_linux_dr_get_status): Likewise.
7546 (x86_linux_prepare_to_resume): Likewise.
7548 2015-03-24 Gary Benson <gbenson@redhat.com>
7550 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7551 Use perror_with_name. Pass string through gettext.
7552 (x86_linux_dr_set): Likewise.
7554 2015-03-24 Gary Benson <gbenson@redhat.com>
7556 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7557 (x86_linux_dr_set_addr): ...this.
7558 (x86_dr_low_get_addr): Rename to...
7559 (x86_linux_dr_get_addr): ...this.
7560 (x86_dr_low_set_control): Rename to...
7561 (x86_linux_dr_set_control): ...this.
7562 (x86_dr_low_get_control): Rename to...
7563 (x86_linux_dr_get_control): ...this.
7564 (x86_dr_low_get_status): Rename to...
7565 (x86_linux_dr_get_status): ...this.
7566 (x86_dr_low): Update with new function names.
7568 2015-03-24 Gary Benson <gbenson@redhat.com>
7570 * Makefile.in (x86-linux.o): New rule.
7571 * configure.srv: Add x86-linux.o to relevant targets.
7572 * linux-low.c (lwp_set_arch_private_info): New function.
7573 (lwp_arch_private_info): Likewise.
7574 * linux-x86-low.c: Include nat/x86-linux.h.
7575 (arch_lwp_info): Removed structure.
7576 (update_debug_registers_callback):
7577 Use lwp_set_debug_registers_changed.
7578 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7579 and lwp_set_debug_registers_changed.
7580 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7582 2015-03-24 Gary Benson <gbenson@redhat.com>
7584 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7585 * linux-arm-low.c (arm_new_thread): Likewise.
7586 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7587 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7588 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7589 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7591 2015-03-24 Gary Benson <gbenson@redhat.com>
7593 * linux-low.c (ptid_of_lwp): New function.
7594 (lwp_is_stopped): Likewise.
7595 (lwp_stop_reason): Likewise.
7596 * linux-x86-low.c (update_debug_registers_callback):
7598 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7601 2015-03-24 Gary Benson <gbenson@redhat.com>
7603 * linux-low.h (linux_stop_lwp): Remove declaration.
7605 2015-03-24 Gary Benson <gbenson@redhat.com>
7607 * linux-low.h: Include nat/linux-nat.h.
7608 * linux-low.c (iterate_over_lwps_args): New structure.
7609 (iterate_over_lwps_filter): New function.
7610 (iterate_over_lwps): Likewise.
7611 * linux-x86-low.c (update_debug_registers_callback):
7612 Update signature to what iterate_over_lwps expects.
7613 Remove PID check that iterate_over_lwps now performs.
7614 (x86_dr_low_set_addr): Use iterate_over_lwps.
7615 (x86_dr_low_set_control): Likewise.
7617 2015-03-24 Gary Benson <gbenson@redhat.com>
7619 * linux-x86-low.c (x86_debug_reg_state): New function.
7620 (x86_linux_prepare_to_resume): Use the above.
7622 2015-03-24 Gary Benson <gbenson@redhat.com>
7624 * linux-low.c (current_lwp_ptid): New function.
7625 * linux-x86-low.c: Include nat/linux-nat.h.
7626 (x86_dr_low_get_addr): Use current_lwp_ptid.
7627 (x86_dr_low_get_control): Likewise.
7628 (x86_dr_low_get_status): Likewise.
7630 2015-03-20 Pedro Alves <palves@redhat.com>
7632 * tracepoint.c (cmd_qtstatus): Make "str" const.
7634 2015-03-20 Pedro Alves <palves@redhat.com>
7636 * server.c (handle_general_set): Make "req_str" const.
7638 2015-03-19 Pedro Alves <palves@redhat.com>
7640 * linux-low.c (linux_resume_one_lwp): Rename to ...
7641 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7642 instead call perror_with_name.
7643 (check_ptrace_stopped_lwp_gone): New function.
7644 (linux_resume_one_lwp): Reimplement as wrapper around
7645 linux_resume_one_lwp_throw that swallows errors if the LWP is
7648 2015-03-19 Pedro Alves <palves@redhat.com>
7650 * linux-low.c (count_events_callback, select_event_lwp_callback):
7651 No longer check whether the thread has resume_stop as last resume
7654 2015-03-19 Pedro Alves <palves@redhat.com>
7656 * linux-low.c (count_events_callback, select_event_lwp_callback):
7657 Use the lwp's status_pending_p field, not the thread's.
7659 2015-03-19 Pedro Alves <palves@redhat.com>
7661 * linux-low.c (select_event_lwp_callback): Update comments to
7662 no longer mention SIGTRAP.
7664 2015-03-18 Gary Benson <gbenson@redhat.com>
7666 * server.c (handle_query): Do not report vFile:fstat as supported.
7668 2015-03-11 Gary Benson <gbenson@redhat.com>
7670 * hostio.c (sys/types.h): New include.
7671 (sys/stat.h): Likewise.
7672 (common-remote-fileio.h): Likewise.
7673 (handle_fstat): New function.
7674 (handle_vFile): Handle vFile:fstat packets.
7676 2015-03-11 Gary Benson <gbenson@redhat.com>
7678 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7679 struct stat.st_blocks and struct stat.st_blksize.
7680 * configure: Regenerate.
7681 * config.in: Likewise.
7682 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7683 (OBS): Add common-remote-fileio.o.
7684 (common-remote-fileio.o): New rule.
7686 2015-03-09 Pedro Alves <palves@redhat.com>
7688 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7689 'struct sockaddr' pointer in 'accept' call.
7691 2015-03-09 Pedro Alves <palves@redhat.com>
7694 2015-03-07 Pedro Alves <palves@redhat.com>
7695 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7696 or <winsock2.h> here. Instead include "gdb_socket.h".
7697 (remote_open): Use union gdb_sockaddr_u.
7698 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7699 or <winsock2.h> here. Instead include "gdb_socket.h".
7700 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7701 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7703 (init_named_socket, gdb_agent_helper_thread): Use union
7706 2015-03-07 Pedro Alves <palves@redhat.com>
7708 * configure.ac (build_warnings): Move
7709 -Wdeclaration-after-statement to the C-specific set.
7710 * configure: Regenerate.
7712 2015-03-07 Pedro Alves <palves@redhat.com>
7714 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7715 or <winsock2.h> here. Instead include "gdb_socket.h".
7716 (remote_open): Use union gdb_sockaddr_u.
7717 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7718 or <winsock2.h> here. Instead include "gdb_socket.h".
7719 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7720 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7722 (init_named_socket, gdb_agent_helper_thread): Use union
7725 2015-03-07 Pedro Alves <palves@redhat.com>
7727 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7730 2015-03-06 Yao Qi <yao.qi@linaro.org>
7732 * linux-aarch64-low.c (aarch64_insert_point): Use
7733 show_debug_regs as a boolean.
7734 (aarch64_remove_point): Likewise.
7736 2015-03-05 Pedro Alves <palves@redhat.com>
7738 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7739 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7740 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7741 * nto-low.c (nto_target_ops): Likewise.
7742 * spu-low.c (spu_target_ops): Likewise.
7743 * win32-low.c (win32_target_ops): Likewise.
7745 2015-03-04 Pedro Alves <palves@redhat.com>
7747 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7748 Decide whether a breakpoint triggered based on the SIGTRAP's
7750 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7751 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7752 (linux_low_filter_event): Check for breakpoints before checking
7754 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7756 (linux_stopped_by_sw_breakpoint)
7757 (linux_supports_stopped_by_sw_breakpoint)
7758 (linux_stopped_by_hw_breakpoint)
7759 (linux_supports_stopped_by_hw_breakpoint): New functions.
7760 (linux_target_ops): Install new target methods.
7762 2015-03-04 Pedro Alves <palves@redhat.com>
7764 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7765 * server.c (swbreak_feature, hwbreak_feature): New globals.
7766 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7767 (captured_main): Clear swbreak_feature and hwbreak_feature.
7768 * server.h (swbreak_feature, hwbreak_feature): Declare.
7769 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7770 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7771 supports_stopped_by_hw_breakpoint>: New fields.
7772 (target_supports_stopped_by_sw_breakpoint)
7773 (target_stopped_by_sw_breakpoint)
7774 (target_supports_stopped_by_hw_breakpoint)
7775 (target_stopped_by_hw_breakpoint): Declare.
7777 2015-03-04 Pedro Alves <palves@redhat.com>
7779 enum lwp_stop_reason -> enum target_stop_reason
7780 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7781 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7782 (linux_wait_1, stuck_in_jump_pad_callback)
7783 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7784 (linux_stopped_by_watchpoint):
7785 * linux-low.h (enum lwp_stop_reason): Delete.
7786 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7787 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7789 2015-03-04 Yao Qi <yao.qi@linaro.org>
7791 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7793 2015-03-03 Gary Benson <gbenson@redhat.com>
7795 * hostio.c (handle_vFile): Fix prefix lengths.
7797 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7799 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7802 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7804 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7805 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7806 (clean): Add "rm -f" for above C files.
7807 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7808 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7809 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7810 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7811 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7812 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7813 (init_registers_s390x_vx_linux64)
7814 (init_registers_s390x_tevx_linux64)
7815 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7816 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7818 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7819 (s390_store_vxrs_high): New functions.
7820 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7822 (s390_arch_setup): Add logic for selecting one of the new target
7823 descriptions. Activate the new vector regsets if applicable.
7824 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7825 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7826 and init_registers_s390x_tevx_linux64.
7828 2015-03-01 Pedro Alves <palves@redhat.com>
7830 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7833 2015-02-27 Pedro Alves <palves@redhat.com>
7835 * linux-x86-low.c (u_debugreg_offset): New function.
7836 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7838 2015-02-27 Pedro Alves <palves@redhat.com>
7840 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7841 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7842 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7843 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7844 (ps_lsetfpregs, ps_getpid)
7845 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7846 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7847 (ps_lsetxregs, ps_plog): Declare.
7849 2015-02-27 Pedro Alves <palves@redhat.com>
7851 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7852 IP_AGENT_EXPORT_FUNC.
7853 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7854 IP_AGENT_EXPORT_FUNC.
7855 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7856 (IP_AGENT_EXPORT): Delete.
7857 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7858 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7859 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7860 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7861 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7862 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7863 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7864 (traceframe_read_count, traceframe_write_count)
7865 (traceframes_created, trace_state_variables, get_raw_reg)
7866 (get_trace_state_variable_value, set_trace_state_variable_value)
7867 (ust_loaded, helper_thread_id, cmd_buf): Use
7868 IPA_SYM_EXPORTED_NAME.
7869 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7870 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7871 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7872 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7873 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7874 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7875 EXTERN_C_PUSH/EXTERN_C_POP.
7876 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7877 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7878 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7879 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7880 (traceframe_write_count, traceframe_read_count)
7881 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7882 (about_to_request_buffer_space, get_trace_state_variable_value)
7883 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7884 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7885 EXTERN_C_PUSH/EXTERN_C_POP.
7886 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7887 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7888 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7889 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7890 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7891 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7892 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7893 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7895 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7896 (IP_AGENT_EXPORT_VAR_DECL): Define.
7898 (gdb_agent_get_raw_reg): Declare.
7900 2015-02-27 Tom Tromey <tromey@redhat.com>
7901 Pedro Alves <palves@redhat.com>
7903 Rename symbols whose names are reserved C++ keywords throughout.
7905 2015-02-27 Pedro Alves <palves@redhat.com>
7907 * Makefile.in (COMPILER): New, get it from autoconf.
7908 (CXX): Get from autoconf instead.
7909 (COMPILE.pre): Use COMPILER.
7910 (CC-LD): Rename to ...
7911 (CC_LD): ... this. Use COMPILER.
7912 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7913 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7914 * acinclude.m4: Include build-with-cxx.m4.
7915 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7916 Disable -Werror by default if building in C++ mode.
7917 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7918 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7919 the C++ compiler. Save/restore CXXFLAGS too.
7920 * configure: Regenerate.
7922 2015-02-27 Pedro Alves <palves@redhat.com>
7924 * acinclude.m4: Include libiberty.m4.
7925 * configure.ac: Call libiberty_INIT.
7926 * config.in, configure: Regenerate.
7928 2015-02-26 Pedro Alves <palves@redhat.com>
7930 * linux-low.c (linux_wait_1): When incrementing the PC past a
7931 program breakpoint always use the_low_target.breakpoint_len as
7932 increment, rather than the maximum between that and
7933 the_low_target.decr_pc_after_break.
7935 2015-02-23 Pedro Alves <palves@redhat.com>
7937 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7938 thread was doing a step-over; always adjust the PC if
7939 we stepped over a permanent breakpoint.
7940 (linux_wait_1): If we stepped over breakpoint that was on top of a
7941 permanent breakpoint, manually advance the PC past it.
7943 2015-02-23 Pedro Alves <palves@redhat.com>
7945 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7947 (x86_fill_gregset, x86_store_gregset): Use it when handling
7950 2015-02-20 Pedro Alves <palves@redhat.com>
7952 * thread-db.c: Include "nat/linux-procfs.h".
7953 (thread_db_init): Skip listing new threads if the kernel supports
7954 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7956 2015-02-20 Pedro Alves <palves@redhat.com>
7958 * linux-low.c (status_pending_p_callback): Use ptid_match.
7960 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7962 PR breakpoints/16812
7963 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7964 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7965 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7967 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7969 PR breakpoints/15956
7970 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7972 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7974 * linux-low.c (linux_low_btrace_conf): Print size.
7975 * server.c (handle_btrace_conf_general_set): New.
7976 (hanle_general_set): Call handle_btrace_conf_general_set.
7977 (handle_query): Report Qbtrace-conf:bts:size as supported.
7979 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7981 * linux-low.c (linux_low_enable_btrace): Update parameters.
7982 (linux_low_btrace_conf): New.
7983 (linux_target_ops)<to_btrace_conf>: Initialize.
7984 * server.c (current_btrace_conf): New.
7985 (handle_btrace_enable): Rename to ...
7986 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7987 to target_enable_btrace. Update comment. Update users.
7988 (handle_qxfer_btrace_conf): New.
7989 (qxfer_packets): Add btrace-conf entry.
7990 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7991 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7992 (target_ops)<read_btrace_conf>: New.
7993 (target_enable_btrace): Update parameters.
7994 (target_read_btrace_conf): New.
7996 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7998 * server.c (handle_btrace_general_set): Remove call to
7999 target_supports_btrace.
8000 (supported_btrace_packets): New.
8001 (handle_query): Call supported_btrace_packets.
8002 * target.h: include btrace-common.h.
8003 (btrace_target_info): Removed.
8004 (supports_btrace, target_supports_btrace): Update parameters.
8006 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8008 * Makefile.in (SFILES): Add common/btrace-common.c.
8009 (OBS): Add common/btrace-common.o.
8010 (btrace-common.o): Add build rules.
8011 * linux-low: Include btrace-common.h.
8012 (linux_low_read_btrace): Use struct btrace_data. Call
8013 btrace_data_init and btrace_data_fini.
8015 2015-02-06 Pedro Alves <palves@redhat.com>
8017 * thread-db.c (find_new_threads_callback): Add debug output.
8019 2015-02-04 Pedro Alves <palves@redhat.com>
8021 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8022 (resume_stopped_resumed_lwps): New function.
8023 (linux_wait_for_event_filtered): Use it.
8025 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8027 * Makefile.in (SFILES): Add linux-personality.c.
8028 (linux-personality.o): New rule.
8029 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8030 list of objects to be built.
8031 * linux-low.c: Include nat/linux-personality.h.
8032 (linux_create_inferior): Remove code to disable address space
8033 randomization (moved to ../nat/linux-personality.c). Create
8034 cleanup to disable address space randomization.
8036 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8038 * Makefile.in (posix-strerror.o): New rule.
8039 (mingw-strerror.o): Likewise.
8040 * configure: Regenerated.
8041 * configure.ac: Source file ../common/common.host. Initialize new
8042 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8044 2015-01-14 Yao Qi <yao@codesourcery.com>
8046 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8047 (ppc-linux.o): New rule.
8048 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8049 * configure.ac: AC_CHECK_FUNCS(getauxval).
8050 * config.in: Re-generated.
8051 * configure: Re-generated.
8052 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8053 ppc64_64bit_inferior_p
8055 2015-01-14 Yao Qi <yao@codesourcery.com>
8057 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8058 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8059 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8060 (PT_ORIG_R3, PT_TRAP): Likewise.
8061 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8062 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8063 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8065 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8067 * i387-fp.c (i387_cache_to_xsave): In look over
8068 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8069 zmmh_low_space field by use of zmmh_high_space.
8071 2015-01-09 Pedro Alves <palves@redhat.com>
8073 * linux-low.c (step_over_bkpt): Move higher up in the file.
8074 (handle_extended_wait): Don't store the stop_pc here.
8075 (get_stop_pc): Adjust comments and rename to ...
8076 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8077 stopped for a software breakpoint or hardware breakpoint.
8078 (thread_still_has_status_pending_p): New function.
8079 (status_pending_p_callback): Use
8080 thread_still_has_status_pending_p. If the event is no longer
8081 interesting, resume the LWP.
8082 (handle_tracepoints): Add assert.
8083 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8084 (wstatus_maybe_breakpoint): New function.
8085 (cancel_breakpoint): Delete function.
8086 (check_stopped_by_watchpoint): New function, factored out from
8087 linux_low_filter_event.
8088 (lp_status_maybe_breakpoint): Delete function.
8089 (linux_low_filter_event): Remove filter_ptid argument.
8090 Leave thread group exits pending here. Store the LWP's stop PC.
8091 Always leave events pending.
8092 (linux_wait_for_event_filtered): Pull all events out of the
8093 kernel, and leave them all pending.
8094 (count_events_callback, select_event_lwp_callback): Consider all
8096 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8097 (select_event_lwp): Only give preference to the stepping LWP in
8098 all-stop mode. Adjust comments.
8099 (ignore_event): New function.
8100 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8101 references to cancel_breakpoints. Adjust to renames. Also give
8102 equal priority to all LWPs that have had events in non-stop mode.
8103 If reporting a software breakpoint event, unadjust the LWP's PC.
8104 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8105 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8107 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8108 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8109 (linux_stopped_by_watchpoint): Adjust.
8110 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8111 * linux-low.h (enum lwp_stop_reason): New.
8112 (struct lwp_info) <stop_pc>: Adjust comment.
8113 <stopped_by_watchpoint>: Delete field.
8114 <stop_reason>: New field.
8115 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8116 * mem-break.c (software_breakpoint_inserted_here)
8117 (hardware_breakpoint_inserted_here): New function.
8118 * mem-break.h (software_breakpoint_inserted_here)
8119 (hardware_breakpoint_inserted_here): Declare.
8120 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8121 (cancel_breakpoints): Delete.
8122 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8123 (upload_fast_traceframes): Remove references to
8126 2015-01-09 Pedro Alves <palves@redhat.com>
8128 * thread-db.c (find_new_threads_callback): Ignore thread if the
8129 kernel thread ID is -1.
8131 2015-01-09 Pedro Alves <palves@redhat.com>
8133 * linux-low.c (linux_attach_fail_reason_string): Move to
8134 nat/linux-ptrace.c, and rename.
8135 (linux_attach_lwp): Update comment.
8136 (attach_proc_task_lwp_callback): New function.
8137 (linux_attach): Adjust to rename and use
8138 linux_proc_attach_tgid_threads.
8139 (linux_attach_fail_reason_string): Delete declaration.
8141 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8143 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8144 * server.c (gdbserver_version): Likewise.
8146 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8148 * remote-utils.c: Include ctype.h.
8149 (input_interrupt): Explicitly handle the case when the char
8150 received is the NUL byte. Improve the printing of non-ASCII
8153 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8155 * linux-low.c (linux_low_filter_event): Update call to
8156 linux_enable_event_reporting following the addition of
8157 a new parameter to that function.
8159 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8162 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8163 (AARCH64_FPCR_REGNO): Likewise.
8164 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8165 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8166 (aarch64_store_fpregset): Likewise.
8168 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8170 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8171 Remove FIXME comment about assumption about N.
8173 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8175 * configure.ac: If large-file support is disabled in GDBserver,
8176 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8177 * configure: Regenerate.
8179 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8181 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8182 warning upon ENODATA from ptrace.
8183 * linux-s390-low.c (s390_store_tdb): New.
8184 (s390_regsets): Add regset for NT_S390_TDB.
8186 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8188 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8189 without a fill_function.
8190 * linux-s390-low.c (s390_fill_last_break): Remove.
8191 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8192 (s390_arch_setup): Use regset's size instead of fill_function for
8195 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8197 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8198 the regset's store function when ptrace returned an error.
8199 * regcache.c (get_thread_regcache): Invalidate register cache
8200 before fetching inferior's registers.
8202 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8204 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8205 while-loop as for-loop.
8206 (regsets_store_inferior_registers): Likewise.
8208 2014-11-28 Yao Qi <yao@codesourcery.com>
8210 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8211 * config.in, configure: Re-generate.
8212 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8215 2014-11-21 Yao Qi <yao@codesourcery.com>
8217 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8218 (AC_CHECK_HEADERS): Remove malloc.h.
8219 * configure: Re-generated.
8220 * config.in: Re-generated.
8221 * server.h: Don't include alloca.h and malloc.h.
8222 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8223 Don't include malloc.h.
8225 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8227 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8228 corresponding ERRNO check in same block.
8230 2014-11-12 Pedro Alves <palves@redhat.com>
8232 * server.c (cont_thread): Update comment.
8233 (start_inferior, attach_inferior): No longer clear cont_thread.
8234 (handle_v_cont): No longer set cont_thread.
8235 (captured_main): Clear cont_thread each time a GDB connects.
8237 2014-11-12 Pedro Alves <palves@redhat.com>
8239 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8240 thread, and don't resume all threads if the Hc thread has exited.
8242 2014-11-12 Pedro Alves <palves@redhat.com>
8244 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8245 the process group instead of to a specific LWP.
8247 2014-10-15 Pedro Alves <palves@redhat.com>
8250 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8252 (arm_set_thread_context): Delete.
8253 (the_low_target): Adjust.
8254 * win32-i386-low.c (debug_registers_changed)
8255 (debug_registers_used): Delete.
8256 (update_debug_registers_callback): New function.
8257 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8258 needing to update their debug registers.
8259 (win32_get_current_dr): New function.
8260 (x86_dr_low_get_addr, x86_dr_low_get_control)
8261 (x86_dr_low_get_status): Fetch the debug register from the thread
8263 (i386_initial_stuff): Adjust.
8264 (i386_get_thread_context): Remove current_event parameter. Don't
8265 clear debug_registers_changed nor copy DR values to
8267 (i386_set_thread_context): Delete.
8268 (i386_prepare_to_resume): New function.
8269 (i386_thread_added): Mark the thread as needing to update irs
8271 (the_low_target): Remove i386_set_thread_context and install
8272 i386_prepare_to_resume.
8273 * win32-low.c (win32_get_thread_context): Adjust.
8274 (win32_set_thread_context): Use SetThreadContext
8276 (win32_prepare_to_resume): New function.
8277 (win32_require_context): New function, factored out from ...
8278 (thread_rec): ... this.
8279 (continue_one_thread): Call win32_prepare_to_resume on each thread
8280 we're about to continue.
8281 (win32_resume): Call win32_prepare_to_resume on the event thread.
8282 * win32-low.h (struct win32_thread_info)
8283 <debug_registers_changed>: New field.
8284 (struct win32_target_ops): Change prototype of set_thread_context,
8285 delete set_thread_context and add prepare_to_resume.
8286 (win32_require_context): New declaration.
8288 2014-10-08 Gary Benson <gbenson@redhat.com>
8290 * server.h: Do not include common-exceptions.h.
8292 2014-10-08 Gary Benson <gbenson@redhat.com>
8294 * server.h: Do not include cleanups.h.
8296 2014-09-30 James Hogan <james.hogan@imgtec.com>
8298 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8301 2014-09-23 Yao Qi <yao@codesourcery.com>
8303 * linux-low.c (lp_status_maybe_breakpoint): New function.
8304 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8305 (count_events_callback): Likewise.
8306 (select_event_lwp_callback): Likewise.
8307 (cancel_breakpoints_callback): Likewise.
8309 2014-09-19 Don Breazeal <donb@codesourcery.com>
8311 * linux-low.c (handle_extended_wait): Call
8312 linux_ptrace_get_extended_event.
8313 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8314 linux_is_extended_waitstatus.
8316 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8318 * Makefile.in (CPPFLAGS): Define.
8319 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8320 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8322 2014-09-16 Gary Benson <gbenson@redhat.com>
8324 * inferiors.h (current_inferior): Renamed as...
8325 (current_thread): New variable. All uses updated.
8326 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8327 (maybe_move_out_of_jump_pad): Likewise.
8328 (cancel_breakpoint): Likewise.
8329 (linux_low_filter_event): Likewise.
8330 (wait_for_sigstop): Likewise.
8331 (linux_resume_one_lwp): Likewise.
8332 (need_step_over_p): Likewise.
8333 (start_step_over): Likewise.
8334 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8335 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8336 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8337 and save_inferior as saved_thread.
8338 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8340 (regcache_invalidate_thread): Likewise.
8341 * remote-utils.c (prepare_resume_reply): Likewise.
8342 * thread-db.c (thread_db_get_tls_address): Likewise.
8343 (disable_thread_event_reporting): Likewise.
8344 (remove_thread_event_breakpoints): Likewise.
8345 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8347 * target.h (set_desired_inferior): Renamed as...
8348 (set_desired_thread): New declaration. All uses updated.
8349 * server.c (myresume): Updated comment to reference thread instead
8351 (handle_serial_event): Likewise.
8352 (handle_target_event): Likewise.
8354 2014-09-12 Tom Tromey <tromey@redhat.com>
8355 Gary Benson <gbenson@redhat.com>
8357 * regcache.h: Include common-regcache.h.
8358 (regcache_read_pc): Don't declare.
8359 * regcache.c (get_thread_regcache_for_ptid): New function.
8361 2014-09-11 Tom Tromey <tromey@redhat.com>
8362 Gary Benson <gbenson@redhat.com>
8364 * symbol.c: New file.
8365 * Makefile.in (SFILES): Add symbol.c.
8366 (OBS): Add symbol.o.
8368 2014-09-11 Gary Benson <gbenson@redhat.com>
8370 * target.c (target_stop_ptid, target_continue_ptid): New
8373 2014-09-11 Tom Tromey <tromey@redhat.com>
8374 Gary Benson <gbenson@redhat.com>
8376 * target.h: Include target/target.h.
8377 * target.c (target_read_memory, target_read_uint32)
8378 (target_write_memory): New functions.
8380 2014-09-11 Gary Benson <gbenson@redhat.com>
8382 * server.h (debug_hw_points): Don't declare.
8383 * server.c (debug_hw_points): Don't define. Replace all uses
8384 with show_debug_regs.
8385 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8386 all uses with show_debug_regs.
8388 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8390 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8391 endianness into account.
8392 (ppc_supply_ptrace_register): Likewise.
8394 2014-09-03 James Hogan <james.hogan@imgtec.com>
8396 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8397 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8399 2014-09-03 Gary Benson <gbenson@redhat.com>
8401 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8402 ALL_DEBUG_ADDRESS_REGISTERS.
8404 2014-09-02 Gary Benson <gbenson@redhat.com>
8406 * i386-low.h: Renamed as...
8407 * x86-low.h: New file. All type, function and variable name
8408 prefixes changed from "i386_" to "x86_". All references updated.
8409 * i386-low.c: Renamed as...
8410 * x86-low.c: New file. All type, function and variable name
8411 prefixes changed from "i386_" to "x86_". All references updated.
8413 2014-09-02 Gary Benson <gbenson@redhat.com>
8415 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8416 (x86_linux_new_thread): Likewise.
8418 2014-08-29 Gary Benson <gbenson@redhat.com>
8420 * server.h (setjmp.h): Do not include.
8421 (toplevel): Do not declare.
8422 (common-exceptions.h): Include.
8423 (cleanups.h): Likewise.
8424 * server.c (toplevel): Do not define.
8425 (exit_code): New static global.
8426 (detach_or_kill_for_exit_cleanup): New function.
8427 (main): New function. Original main renamed to...
8428 (captured_main): New function.
8429 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8431 2014-08-29 Gary Benson <gbenson@redhat.com>
8433 * Makefile.in (SFILES): Add common/common-exceptions.c.
8434 (OBS): Add common-exceptions.o.
8435 (common-exceptions.o): New rule.
8436 * utils.c (prepare_to_throw_exception): New function.
8438 2014-08-29 Gary Benson <gbenson@redhat.com>
8440 * config.in: Regenerate.
8441 * configure: Likewise.
8443 2014-08-29 Gary Benson <gbenson@redhat.com>
8445 * Makefile.in (SFILES): Add common/cleanups.c.
8447 (cleanups.o): New rule.
8449 2014-08-29 Gary Benson <gbenson@redhat.com>
8451 * utils.c (internal_vwarning): New function.
8453 2014-08-28 Gary Benson <gbenson@redhat.com>
8455 * utils.h (fatal): Remove declaration.
8456 * utils.c (fatal): Remove function.
8458 2014-08-28 Gary Benson <gbenson@redhat.com>
8460 * tracepoint.c (gdb_agent_init): Replace fatal with
8462 (initialize_tracepoint): Likewise.
8464 2014-08-28 Gary Benson <gbenson@redhat.com>
8466 * remote-utils.c (remote_prepare): Replace fatal with error.
8468 2014-08-28 Gary Benson <gbenson@redhat.com>
8470 * linux-low.c (linux_async): Replace fatal with warning.
8472 (linux_start_non_stop): Return -1 if linux_async failed.
8474 2014-08-28 Gary Benson <gbenson@redhat.com>
8476 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8478 (i386_dr_low_get_addr): Remove vague comment.
8479 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8482 2014-08-28 Gary Benson <gbenson@redhat.com>
8484 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8485 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8487 (linux_resume_one_lwp): Likewise.
8488 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8490 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8491 with internal_error.
8492 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8493 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8494 (find_register_by_name): Replace fatal with internal_error.
8495 (find_regno): Likewise.
8496 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8497 * thread-db.c (thread_db_create_event): Likewise.
8498 (thread_db_load_search): Likewise.
8499 (try_thread_db_load_1): Likewise.
8500 * tracepoint.c (get_jump_space_head): Replace fatal with
8502 (claim_trampoline_space): Likewise.
8503 (have_fast_tracepoint_trampoline_buffer): Likewise.
8504 (cmd_qtstart): Likewise.
8505 (stop_tracing): Likewise.
8506 (fast_tracepoint_collecting): Likewise.
8507 (target_malloc): Likewise.
8508 (download_tracepoint): Likewise.
8509 (download_trace_state_variables): Replace check with gdb_assert.
8510 (upload_fast_traceframes): Replace fatal with internal_error.
8512 2014-08-19 Tom Tromey <tromey@redhat.com>
8513 Gary Benson <gbenson@redhat.com>
8515 * Makefile.in (SFILES): Add common/common-debug.c.
8516 (OBS): Add common-debug.o.
8517 (common-debug.o): New rule.
8518 * debug.h (debug_printf): Don't declare.
8519 * debug.c (debug_printf): Renamed and rewritten as...
8520 (debug_vprintf): New function.
8522 2014-08-19 Gary Benson <gbenson@redhat.com>
8524 * utils.h: Do not include print-utils.h.
8526 2014-08-19 Tom Tromey <tromey@redhat.com>
8527 Gary Benson <gbenson@redhat.com>
8529 * server.h: Add static assertion.
8530 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8532 2014-08-19 Tom Tromey <tromey@redhat.com>
8533 Gary Benson <gbenson@redhat.com>
8535 * Makefile.in (SFILES): Add common/errors.c.
8536 (OBS): Add errors.o.
8537 (IPA_OBS): Add errors-ipa.o.
8538 (errors.o): New rule.
8539 (errors-ipa.o): Likewise.
8540 * utils.h (perror_with_name, error, warning): Don't declare.
8541 * utils.c (warning): Renamed and rewritten as...
8542 (vwarning): New function.
8543 (error): Renamed and rewritten as...
8544 (verror): New function.
8545 (internal_error): Renamed and rewritten as...
8546 (internal_verror): New function.
8548 2014-08-07 Gary Benson <gbenson@redhat.com>
8550 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8551 * configure: Regenerate.
8552 * config.in: Likewise.
8553 * server.h: Do not include errno.h.
8554 * event-loop.c: Likewise.
8555 * hostio-errno.c: Likewise.
8556 * linux-low.c: Likewise.
8557 * remote-utils.c: Likewise.
8558 * spu-low.c: Likewise.
8559 * utils.c: Likewise.
8560 * gdbreplay.c: Unconditionally include errno.h.
8562 2014-08-07 Gary Benson <gbenson@redhat.com>
8564 * server.h: Do not include string.h.
8565 * event-loop.c: Likewise.
8566 * linux-low.c: Likewise.
8567 * regcache.c: Likewise.
8568 * remote-utils.c: Likewise.
8569 * spu-low.c: Likewise.
8570 * utils.c: Likewise.
8572 2014-08-07 Gary Benson <gbenson@redhat.com>
8574 * server.h: Do not include gdb_assert.h.
8576 2014-08-07 Gary Benson <gbenson@redhat.com>
8578 * server.h: Do not include common-utils.h.
8580 2014-08-07 Gary Benson <gbenson@redhat.com>
8582 * server.h: Do not include ptid.h.
8583 * notif.h: Likewise.
8585 2014-08-07 Gary Benson <gbenson@redhat.com>
8587 * server.h: Do not include gdb_locale.h.
8589 2014-08-07 Gary Benson <gbenson@redhat.com>
8591 * server.h: Do not include gdb/signals.h.
8592 * win32-low.c: Likewise.
8594 2014-08-07 Gary Benson <gbenson@redhat.com>
8596 * server.h: Do not include pathmax.h.
8598 2014-08-07 Gary Benson <gbenson@redhat.com>
8600 * server.h: Do not include libiberty.h.
8601 * linux-bfin-low.c: Likewise.
8603 2014-08-07 Gary Benson <gbenson@redhat.com>
8605 * server.h: Do not include ansidecl.h.
8607 2014-08-07 Gary Benson <gbenson@redhat.com>
8609 * linux-x86-low.c: Do not include stddef.h.
8610 * lynx-ppc-low.c: Likewise.
8611 * tracepoint.c: Likewise.
8613 2014-08-07 Gary Benson <gbenson@redhat.com>
8615 * server.h: Do not include stdarg.h.
8616 * nto-low.c: Likewise.
8618 2014-08-07 Gary Benson <gbenson@redhat.com>
8620 * server.h: Do not include stdlib.h.
8621 * inferiors.c: Likewise.
8622 * linux-low.c: Likewise.
8623 * regcache.c: Likewise.
8624 * spu-low.c: Likewise.
8625 * tracepoint.c: Likewise.
8626 * utils.c: Likewise.
8628 2014-08-07 Gary Benson <gbenson@redhat.com>
8630 * server.h: Do not include stdio.h.
8631 * linux-low.c: Likewise.
8632 * remote-utils.c: Likewise.
8633 * spu-low.c: Likewise.
8634 * utils.c: Likewise.
8635 * wincecompat.c: Likewise.
8637 2014-08-06 Gary Benson <gbenson@redhat.com>
8639 * regcache.c (init_register_cache): Move conditionals inside if.
8641 2014-08-06 Gary Benson <gbenson@redhat.com>
8643 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8645 2014-07-31 Gary Benson <gbenson@redhat.com>
8647 * ax.h: Do not include server.h.
8648 * gdbthread.h: Likewise.
8649 * lynx-low.h: Likewise.
8650 * notif.h: Likewise.
8652 2014-07-30 Gary Benson <gbenson@redhat.com>
8654 * server.h: Include common-defs.h.
8655 Do not include config.h or build-gnulib-gdbserver/config.h.
8657 2014-07-30 Gary Benson <gbenson@redhat.com>
8659 * hostio-errno.c: Move server.h to top of includes list.
8660 * inferiors.c: Likewise.
8661 * linux-x86-low.c: Likewise.
8662 * notif.c: Include server.h.
8664 2014-07-24 Tom Tromey <tromey@redhat.com>
8665 Gary Benson <gbenson@redhat.com>
8667 * server.h (CORE_ADDR): Now unsigned.
8669 2014-07-16 Pedro Alves <palves@redhat.com>
8671 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8673 2014-07-15 Pedro Alves <palves@redhat.com>
8675 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8678 2014-07-11 Pedro Alves <palves@redhat.com>
8680 * linux-low.c (kill_wait_lwp): New function, based on
8681 kill_one_lwp_callback, but use my_waitpid directly.
8682 (kill_one_lwp_callback, linux_kill): Use it.
8684 2014-06-23 Pedro Alves <palves@redhat.com>
8686 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8687 before setting DR0..DR3.
8689 2014-06-20 Gary Benson <gbenson@redhat.com>
8691 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8692 * configure: Regenerated.
8693 * config.in: Likewise.
8695 2014-06-20 Gary Benson <gbenson@redhat.com>
8697 * Makefile.in (SFILES): Update locations for files moved
8699 (object file files): Reordered.
8701 2014-06-20 Gary Benson <gbenson@redhat.com>
8703 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8704 (i386_dr_low_set_addr): Likewise.
8705 (i386_dr_low_get_addr): Likewise.
8706 (i386_dr_low_can_set_control): Likewise.
8707 (i386_dr_low_set_control): Likewise.
8708 (i386_dr_low_get_control): Likewise.
8709 (i386_dr_low_get_status): Likewise.
8710 (i386_get_debug_register_length): Likewise.
8711 * linux-x86-low.c (i386_dr_low_set_addr):
8712 Changed signature. Made static.
8713 (i386_dr_low_get_addr): Likewise.
8714 (i386_dr_low_set_control): Likewise.
8715 (i386_dr_low_get_control): Likewise.
8716 (i386_dr_low_get_status): Likewise.
8717 (i386_dr_low): New global variable.
8718 * win32-i386-low.c (i386_dr_low_set_addr):
8719 Changed signature. Made static.
8720 (i386_dr_low_get_addr): Likewise.
8721 (i386_dr_low_set_control): Likewise.
8722 (i386_dr_low_get_control): Likewise.
8723 (i386_dr_low_get_status): Likewise.
8724 (i386_dr_low): New global variable.
8726 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8728 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8729 * Makefile.in (AR, AR_FLAGS): Define.
8730 * configure: Regenerate.
8732 2014-06-19 Gary Benson <gbenson@redhat.com>
8734 * Makefile.in (i386-dregs.o): New rule.
8735 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8736 * i386-low.c (target.h): Remove include.
8737 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8738 (DR_CONTROL_SHIFT): Likewise.
8739 (DR_CONTROL_SIZE): Likewise.
8740 (DR_RW_EXECUTE): Likewise.
8741 (DR_RW_WRITE): Likewise.
8742 (DR_RW_READ): Likewise.
8743 (DR_RW_IORW): Likewise.
8744 (DR_LEN_1): Likewise.
8745 (DR_LEN_2): Likewise.
8746 (DR_LEN_4): Likewise.
8747 (DR_LEN_8): Likewise.
8748 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8749 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8750 (DR_ENABLE_SIZE): Likewise.
8751 (DR_LOCAL_SLOWDOWN): Likewise.
8752 (DR_GLOBAL_SLOWDOWN): Likewise.
8753 (DR_CONTROL_RESERVED): Likewise.
8754 (I386_DR_CONTROL_MASK): Likewise.
8755 (I386_DR_VACANT): Likewise.
8756 (I386_DR_LOCAL_ENABLE): Likewise.
8757 (I386_DR_GLOBAL_ENABLE): Likewise.
8758 (I386_DR_DISABLE): Likewise.
8759 (I386_DR_SET_RW_LEN): Likewise.
8760 (I386_DR_GET_RW_LEN): Likewise.
8761 (I386_DR_WATCH_HIT): Likewise.
8762 (i386_wp_op_t): Likewise.
8763 (i386_show_dr): Likewise.
8764 (i386_length_and_rw_bits): Likewise.
8765 (i386_insert_aligned_watchpoint): Likewise.
8766 (i386_remove_aligned_watchpoint): Likewise.
8767 (i386_handle_nonaligned_watchpoint): Likewise.
8768 i386_update_inferior_debug_regs(): Likewise.
8769 (i386_dr_insert_watchpoint): Likewise.
8770 (i386_dr_remove_watchpoint): Likewise.
8771 (i386_dr_region_ok_for_watchpoint): Likewise.
8772 (i386_dr_stopped_data_address): Likewise.
8773 (i386_dr_stopped_by_watchpoint): Likewise.
8775 2014-06-19 Gary Benson <gbenson@redhat.com>
8777 * i386-low.c (i386_dr_show): Renamed to
8778 i386_show_dr and made static. All uses updated.
8779 (i386_dr_length_and_rw_bits): Renamed to
8780 i386_length_and_rw_bits and made static.
8782 (i386_dr_insert_aligned_watchpoint): Renamed to
8783 i386_insert_aligned_watchpoint and made static.
8785 (i386_dr_remove_aligned_watchpoint): Renamed to
8786 i386_remove_aligned_watchpoint and made static.
8788 (i386_dr_update_inferior_debug_regs): Renamed to
8789 i386_update_inferior_debug_regs and made static.
8792 2014-06-18 Gary Benson <gbenson@redhat.com>
8794 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8795 (i386_dr_low_can_set_control): Likewise.
8796 (i386_get_debug_register_length): Likewise.
8797 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8798 (i386_dr_low_can_set_control): Likewise.
8799 (i386_get_debug_register_length): Likewise.
8801 2014-06-17 Gary Benson <gbenson@redhat.com>
8803 * i386-low.h (i386-dregs.h): New include.
8804 (DR_FIRSTADDR): Now in i386-dregs.h.
8805 (DR_LASTADDR): Likewise.
8806 (DR_NADDR): Likewise.
8807 (DR_STATUS): Likewise.
8808 (DR_CONTROL): Likewise.
8809 (i386_debug_reg_state): Likewise.
8810 (i386_dr_insert_watchpoint): Likewise.
8811 (i386_dr_remove_watchpoint): Likewise.
8812 (i386_dr_region_ok_for_watchpoint): Likewise.
8813 (i386_dr_stopped_data_address): Likewise.
8814 (i386_dr_stopped_by_watchpoint): Likewise.
8815 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8817 2014-06-18 Gary Benson <gbenson@redhat.com>
8819 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8820 i386_dr_insert_watchpoint.
8821 (i386_low_remove_watchpoint): Renamed to
8822 i386_dr_remove_watchpoint.
8823 (i386_low_region_ok_for_watchpoint): Renamed to
8824 i386_dr_region_ok_for_watchpoint.
8825 (i386_low_stopped_data_address): Renamed to
8826 i386_dr_stopped_data_address.
8827 (i386_low_stopped_by_watchpoint): Renamed to
8828 i386_dr_stopped_by_watchpoint.
8829 * i386-low.c (i386_show_dr): Renamed to
8830 i386_dr_show and made nonstatic. All uses updated.
8831 (i386_length_and_rw_bits): Renamed to
8832 i386_dr_length_and_rw_bits and made nonstatic.
8834 (i386_insert_aligned_watchpoint): Renamed to
8835 i386_dr_insert_aligned_watchpoint and made nonstatic.
8837 (i386_remove_aligned_watchpoint): Renamed to
8838 i386_dr_remove_aligned_watchpoint and made nonstatic.
8840 (i386_update_inferior_debug_regs): Renamed to
8841 i386_dr_update_inferior_debug_regs and made nonstatic.
8843 (i386_low_insert_watchpoint): Renamed to
8844 i386_dr_insert_watchpoint. All uses updated.
8845 (i386_low_remove_watchpoint): Renamed to
8846 i386_dr_remove_watchpoint. All uses updated.
8847 (i386_low_region_ok_for_watchpoint): Renamed to
8848 i386_dr_region_ok_for_watchpoint. All uses updated.
8849 (i386_low_stopped_data_address): Renamed to
8850 i386_dr_stopped_data_address. All uses updated.
8851 (i386_low_stopped_by_watchpoint): Renamed to
8852 i386_dr_stopped_by_watchpoint. All uses updated.
8854 2014-06-18 Gary Benson <gbenson@redhat.com>
8856 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8857 (i386_dr_low_can_set_control): Likewise.
8858 (i386_insert_aligned_watchpoint): New check.
8860 2014-06-18 Gary Benson <gbenson@redhat.com>
8862 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8865 2014-06-18 Gary Benson <gbenson@redhat.com>
8867 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8868 instead of fatal and error.
8869 (i386_handle_nonaligned_watchpoint): Likewise.
8871 2014-06-18 Gary Benson <gbenson@redhat.com>
8873 * i386-low.c (i386_get_debug_register_length): New macro.
8874 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8875 (i386_show_dr): Use debug_printf instead of fprintf. Use
8876 phex to format values.
8878 2014-06-18 Gary Benson <gbenson@redhat.com>
8880 * i386-low.h: Comment changes.
8881 * i386-low.c: Likewise.
8883 2014-06-18 Gary Benson <gbenson@redhat.com>
8885 * i386-low.c: Whitespace changes.
8887 2014-06-12 Tom Tromey <tromey@redhat.com>
8889 * utils.c (freeargv): Remove.
8891 2014-06-12 Tom Tromey <tromey@redhat.com>
8893 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8894 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8895 (parse_debug_format_options): Likewise.
8896 (gdbserver_usage): Likewise.
8897 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8898 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8899 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8901 ($(LIBGNU)): Depend on libiberty.
8902 (all-lib): Recurse into all subdirs.
8903 (install-only): Invoke "install" target in subdirs.
8904 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8906 * configure: Rebuild.
8907 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8908 for vasprintf, vsnprintf, or gettimeofday.
8909 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8912 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8914 * development.sh: Delete.
8915 * Makefile.in (config.status): Adjust dependency on development.sh.
8916 * configure.ac: Adjust development.sh source call.
8917 * configure: Regenerate.
8919 2014-06-02 Pedro Alves <palves@redhat.com>
8921 * ax.c (gdb_free_agent_expr): New function.
8922 * ax.h (gdb_free_agent_expr): New declaration.
8923 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8925 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8927 (clear_breakpoint_conditions_and_commands): New function.
8928 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8929 (clear_breakpoint_conditions_and_commands): New declaration.
8931 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8933 * linux-aarch64-low.c (asm/ptrace.h): Include.
8935 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8937 Fix TLS access for -static -pthread.
8938 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8939 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8940 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8942 2014-05-20 Pedro Alves <palves@redhat.com>
8944 * linux-aarch64-low.c (aarch64_insert_point)
8945 (aarch64_remove_point): No longer check whether the type is
8946 supported here. Adjust to new interface.
8947 (the_low_target): Install aarch64_supports_z_point_type as
8948 supports_z_point_type method.
8949 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8950 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8951 instead of a Z packet char. Adjust.
8952 (arm_supports_z_point_type): New function.
8953 (arm_insert_point, arm_remove_point): Adjust to new interface.
8954 (the_low_target): Install arm_supports_z_point_type.
8955 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8956 (cris_insert_point, cris_remove_point): Adjust to new interface.
8957 Don't check whether the type is supported here.
8958 (the_low_target): Install cris_supports_z_point_type.
8959 * linux-low.c (linux_supports_z_point_type): New function.
8960 (linux_insert_point, linux_remove_point): Adjust to new interface.
8961 * linux-low.h (struct linux_target_ops) <insert_point,
8962 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8963 raw_breakpoint pointer parameter.
8964 <supports_z_point_type>: New method.
8965 * linux-mips-low.c (mips_supports_z_point_type): New function.
8966 (mips_insert_point, mips_remove_point): Adjust to new interface.
8967 Use mips_supports_z_point_type.
8968 (the_low_target): Install mips_supports_z_point_type.
8969 * linux-ppc-low.c (the_low_target): Install NULL as
8970 supports_z_point_type method.
8971 * linux-s390-low.c (the_low_target): Install NULL as
8972 supports_z_point_type method.
8973 * linux-sparc-low.c (the_low_target): Install NULL as
8974 supports_z_point_type method.
8975 * linux-x86-low.c (x86_supports_z_point_type): New function.
8976 (x86_insert_point): Adjust to new insert_point interface. Use
8977 insert_memory_breakpoint. Adjust to new
8978 i386_low_insert_watchpoint interface.
8979 (x86_remove_point): Adjust to remove_point interface. Use
8980 remove_memory_breakpoint. Adjust to new
8981 i386_low_remove_watchpoint interface.
8982 (the_low_target): Install x86_supports_z_point_type.
8983 * lynx-low.c (lynx_target_ops): Install NULL as
8984 supports_z_point_type callback.
8985 * nto-low.c (nto_supports_z_point_type): New.
8986 (nto_insert_point, nto_remove_point): Adjust to new interface.
8987 (nto_target_ops): Install nto_supports_z_point_type.
8988 * mem-break.c: Adjust intro comment.
8989 (struct raw_breakpoint) <raw_type, size>: New fields.
8990 <inserted>: Update comment.
8991 <shlib_disabled>: Delete field.
8992 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8993 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8994 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8995 (raw_bkpt_type_to_target_hw_bp_type): New function.
8996 (find_enabled_raw_code_breakpoint_at): New function.
8997 (find_raw_breakpoint_at): New type and size parameters. Use them.
8998 (insert_memory_breakpoint): New function, based off
8999 set_raw_breakpoint_at.
9000 (remove_memory_breakpoint): New function.
9001 (set_raw_breakpoint_at): Reimplement.
9002 (set_breakpoint): New, based on set_breakpoint_at.
9003 (set_breakpoint_at): Reimplement.
9004 (delete_raw_breakpoint): Go through the_target->remove_point
9005 instead of assuming memory breakpoints.
9006 (find_gdb_breakpoint_at): Delete.
9007 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9008 (find_gdb_breakpoint): New function.
9009 (set_gdb_breakpoint_at): Delete.
9010 (z_type_supported): New function.
9011 (set_gdb_breakpoint_1): New function, loosely based off
9012 set_gdb_breakpoint_at.
9013 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9014 (delete_gdb_breakpoint_at): Delete.
9015 (delete_gdb_breakpoint_1): New function, loosely based off
9016 delete_gdb_breakpoint_at.
9017 (delete_gdb_breakpoint): New function.
9018 (clear_gdb_breakpoint_conditions): Rename to ...
9019 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9021 (add_condition_to_breakpoint): Make static.
9022 (add_breakpoint_condition): Take a struct breakpoint pointer
9023 instead of an address. Adjust.
9024 (gdb_condition_true_at_breakpoint): Rename to ...
9025 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9027 (gdb_condition_true_at_breakpoint): Reimplement.
9028 (add_breakpoint_commands): Take a struct breakpoint pointer
9029 instead of an address. Adjust.
9030 (gdb_no_commands_at_breakpoint): Rename to ...
9031 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9032 parameter. Return true if no breakpoint was found. Change debug
9034 (gdb_no_commands_at_breakpoint): Reimplement.
9035 (run_breakpoint_commands): Rename to ...
9036 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9037 and change return type to boolean.
9038 (run_breakpoint_commands): New function.
9039 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9040 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9041 breakpoint. Go through the_target->remove_point instead of
9042 assuming memory breakpoint.
9043 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9044 software and hardware breakpoints.
9045 (reinsert_raw_breakpoint): Go through the_target->insert_point
9046 instead of assuming memory breakpoint.
9047 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9048 software and hardware breakpoints.
9049 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9050 Check both software and hardware breakpoints.
9051 (validate_inserted_breakpoint): Assert the breakpoint is a
9052 software breakpoint. Set the inserted flag to -1 instead of
9053 setting shlib_disabled.
9054 (delete_disabled_breakpoints): Adjust.
9055 (validate_breakpoints): Only validate software breakpoints.
9056 Adjust to inserted flag change.
9057 (check_mem_read, check_mem_write): Skip breakpoint types other
9058 than software breakpoints. Adjust to inserted flag change.
9059 * mem-break.h (enum raw_bkpt_type): New enum.
9060 (raw_breakpoint, struct process_info): Forward declare.
9061 (Z_packet_to_target_hw_bp_type): Delete declaration.
9062 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9063 (set_gdb_breakpoint, delete_gdb_breakpoint)
9064 (clear_breakpoint_conditions): New declarations.
9065 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9066 (breakpoint_inserted_here): Update comment.
9067 (add_breakpoint_condition, add_breakpoint_commands): Replace
9068 address parameter with a breakpoint pointer parameter.
9069 (gdb_breakpoint_here): Update comment.
9070 (delete_gdb_breakpoint_at): Delete.
9071 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9072 * server.c (process_point_options): Take a struct breakpoint
9073 pointer instead of an address. Adjust.
9074 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9075 delete_gdb_breakpoint.
9076 * spu-low.c (spu_target_ops): Install NULL as
9077 supports_z_point_type method.
9078 * target.h: Include mem-break.h.
9079 (struct target_ops) <prepare_to_access_memory>: Update comment.
9080 <supports_z_point_type>: New field.
9081 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9082 instead of a char. Also take a raw breakpoint pointer.
9083 * win32-arm-low.c (the_low_target): Install NULL as
9084 supports_z_point_type.
9085 * win32-i386-low.c (i386_supports_z_point_type): New function.
9086 (i386_insert_point, i386_remove_point): Adjust to new interface.
9087 (the_low_target): Install i386_supports_z_point_type.
9088 * win32-low.c (win32_supports_z_point_type): New function.
9089 (win32_insert_point, win32_remove_point): Adjust to new interface.
9090 (win32_target_ops): Install win32_supports_z_point_type.
9091 * win32-low.h (struct win32_target_ops):
9092 <supports_z_point_type>: New method.
9093 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9094 instead of a char. Also take a raw breakpoint pointer.
9096 2014-05-20 Pedro Alves <palves@redhat.com>
9098 * mem-break.h: Include break-common.h.
9099 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9100 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9101 (Z_packet_to_target_hw_bp_type): New declaration.
9102 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9103 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9104 (Z_PACKET_ACCESS_WP): Delete macros.
9105 (Z_packet_to_hw_type): Delete function.
9106 * i386-low.h: Don't include break-common.h here.
9107 (Z_packet_to_hw_type): Delete declaration.
9108 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9109 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9110 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9111 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9112 * linux-aarch64-low.c: Don't include break-common.h here.
9113 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9114 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9115 (Z_packet_to_target_hw_bp_type): Delete function.
9116 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9118 (mips_insert_point, mips_remove_point): Use
9119 Z_packet_to_target_hw_bp_type.
9121 2014-05-20 Pedro Alves <palves@redhat.com>
9123 * linux-aarch64-low.c: Include break-common.h.
9124 (enum target_point_type): Delete.
9125 (Z_packet_to_point_type): Rename to ...
9126 (Z_packet_to_target_hw_bp_type): ... this, and return a
9127 target_hw_bp_type instead.
9128 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9129 instead of an enum target_point_type.
9130 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9132 (aarch64_dr_state_insert_one_point)
9133 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9134 (aarch64_handle_aligned_watchpoint)
9135 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9136 Take an enum target_hw_bp_type instead of an enum
9138 (aarch64_supports_z_point_type): New function.
9139 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9140 use Z_packet_to_target_hw_bp_type.
9142 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9144 * configure.ac: Only use -Werror by default when DEVELOPMENT
9146 * configure: Regenerate.
9148 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9150 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9151 * linux-x86-low.c (X86_64_USER_REGS): New.
9152 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9154 2014-04-28 Yao Qi <yao@codesourcery.com>
9156 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9159 2014-04-25 Pedro Alves <palves@redhat.com>
9162 * linux-low.c (linux_attach_fail_reason_string): New function.
9163 (linux_attach_lwp): Delete.
9164 (linux_attach_lwp_1): Rename to ...
9165 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9166 argument. Remove "initial" parameter. Return int instead of
9167 void. Don't error or warn here.
9168 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9169 failure to attach to the tgid. Call warning when failing to
9171 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9172 argument. Remove "initial" parameter. Return int instead of
9173 void. Don't error or warn here.
9174 (linux_attach_fail_reason_string): New declaration.
9175 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9176 interface change. Use linux_attach_fail_reason_string.
9178 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9179 Walfred Tedeschi <walfred.tedeschi@intel.com>
9181 * Makefile.in: Added rules to handle new files
9182 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9183 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9184 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9185 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9186 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9187 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9189 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9190 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9191 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9192 i386/x32-avx512.xml.
9193 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9194 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9195 i386/x32-avx512-linux.xml.
9196 * i387-fp.c (num_avx512_k_registers): New constant for number
9198 (num_avx512_zmmh_low_registers): New constant for number of
9199 lower ZMM registers (0-15).
9200 (num_avx512_zmmh_high_registers): New constant for number of
9201 higher ZMM registers (16-31).
9202 (num_avx512_ymmh_registers): New contant for number of higher
9203 YMM registers (ymm16-31 added by avx521 on x86_64).
9204 (num_avx512_xmm_registers): New constant for number of higher
9205 XMM registers (xmm16-31 added by AVX512 on x86_64).
9206 (struct i387_xsave): Add space for AVX512 registers.
9207 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9208 Add code to handle AVX512 registers.
9209 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9210 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9211 prototypei from generated file.
9212 (tdesc_amd64_avx512_linux): Likewise.
9213 (init_registers_x32_avx512_linux): Likewise.
9214 (tdesc_x32_avx512_linux): Likewise.
9215 (init_registers_i386_avx512_linux): Likewise.
9216 (tdesc_i386_avx512_linux): Likewise.
9217 (x86_64_regmap): Add AVX512 registers.
9218 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9220 (initialize_low_arch): Add code to initialize AVX512 registers.
9222 2014-04-23 Pedro Alves <palves@redhat.com>
9224 * mem-break.c (find_gdb_breakpoint_at): Make static.
9225 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9227 2014-04-23 Pedro Alves <palves@redhat.com>
9229 * i386-low.c: Don't include break-common.h here.
9230 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9231 prototype to take target_hw_bp_type as argument instead of a Z
9233 * i386-low.h: Include break-common.h here.
9234 (Z_packet_to_hw_type): Declare.
9235 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9237 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9238 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9239 (x86_remove_point): Convert the packet number to a
9240 target_hw_bp_type before calling i386_low_remove_watchpoint.
9241 * win32-i386-low.c (i386_insert_point): Convert the packet number
9242 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9243 (i386_remove_point): Convert the packet number to a
9244 target_hw_bp_type before calling i386_low_remove_watchpoint.
9246 2014-04-23 Pedro Alves <palves@redhat.com>
9248 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9250 2014-04-10 Pedro Alves <palves@redhat.com>
9252 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9253 Check if the condition or command is NULL before checking if the
9254 breakpoint is known. On success, return true.
9255 * mem-break.h (add_breakpoint_condition): Document return.
9256 (add_breakpoint_commands): Add describing comment.
9257 * server.c (skip_to_semicolon): New function.
9258 (process_point_options): Use it.
9260 2014-04-09 Pedro Alves <palves@redhat.com>
9262 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9265 2014-02-27 Pedro Alves <palves@redhat.com>
9268 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9270 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9272 (last_thread_of_process_p): Take a PID argument instead of a
9274 (linux_wait_for_lwp): Delete.
9275 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9277 (linux_low_filter_event): New function, party factored out from
9278 linux_wait_for_event.
9279 (linux_wait_for_event): Rename to ...
9280 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9281 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9282 sigsuspend. Check for zombie leaders.
9283 (linux_wait_for_event): Reimplement as wrapper around
9284 linux_wait_for_event_filtered.
9285 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9286 a normal or signal exit is seen, it's the whole process exiting.
9287 (wait_for_sigstop): No longer a for_each_inferior callback.
9288 Rewrite on top of linux_wait_for_event_filtered.
9289 (stop_all_lwps): Call wait_for_sigstop directly.
9290 * server.c (resume, handle_target_event): Handle
9291 TARGET_WAITKIND_NO_RESUMED.
9293 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9295 * win32-low.c (psapi_get_dll_name,
9296 * win32_CreateToolhelp32Snapshot): Delete.
9297 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9298 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9300 (handle_load_dll): Add function description.
9301 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9303 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9305 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9307 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9308 base address when calling win32_add_one_solib.
9309 (handle_load_dll): Delete local variable load_addr.
9310 Remove 0x1000 offset applied to DLL base address when calling
9311 win32_add_one_solib.
9312 (handle_unload_dll): Add comment.
9314 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9316 * win32-low.c (win32_add_all_dlls): Renames
9317 win32_ensure_ntdll_loaded. Rewrite function documentation.
9318 Adjust implementation to always load all DLLs.
9319 Add 0x1000 offset to DLL base address when calling
9320 win32_add_one_solib.
9321 (child_initialization_done): New static global.
9322 (do_initial_child_stuff): Set child_initialization_done to
9323 zero during child initialization, and 1 after. Replace call
9324 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9326 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9327 (handle_unload_dll): Add function documentation.
9328 (get_child_debug_event): Ignore load and unload DLL events
9329 during child initialization.
9331 2014-02-20 Doug Evans <dje@google.com>
9333 Remove global all_lwps.
9334 * inferiors.h (ptid_of): Move here from linux-low.h.
9335 (pid_of, lwpid_of): Ditto.
9336 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9337 parameter is a struct thread_info * now.
9338 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9339 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9340 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9342 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9343 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9344 * linux-arm-low.c (update_registers_callback): Update, "entry"
9345 parameter is a struct thread_info * now.
9346 Fetch lwpid from current_inferior directly.
9347 (arm_insert_point): Pass &all_threads to find_inferior instead of
9349 (arm_remove_point): Ditto.
9350 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9351 (arm_prepare_to_resume): Fetch pid from thread.
9352 (arm_read_description): Fetch lwpid from current_inferior directly.
9353 * linux-low.c (all_lwps): Delete.
9354 (delete_lwp): Delete call to remove_inferior.
9355 (handle_extended_wait): Fetch lwpid from thread.
9356 (add_lwp): Don't set lwp->entry.id. Remove call to
9357 add_inferior_to_list.
9358 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9359 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9360 (kill_one_lwp_callback): Ditto.
9361 (linux_kill): Don't dereference NULL pointer.
9362 Fetch ptid,lwpid from thread.
9363 (get_detach_signal): Fetch ptid from thread.
9364 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9365 Simplify call to regcache_invalidate_thread.
9366 (delete_lwp_callback): Update, "entry" parameter is a
9367 struct thread_info * now. Fetch pid from thread.
9368 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9369 (status_pending_p_callback): Update, "entry" parameter is a
9370 struct thread_info * now. Fetch ptid from thread.
9371 (find_lwp_pid): Update, "entry" parameter is a
9372 struct thread_info * now.
9373 (linux_wait_for_lwp): Fetch pid from thread.
9374 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9375 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9376 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9377 (dequeue_one_deferred_signal): Ditto.
9378 (cancel_breakpoint): Fetch ptid from current_inferior.
9379 (linux_wait_for_event): Pass &all_threads to find_inferior,
9380 not &all_lwps. Fetch ptid, lwpid from thread.
9381 (count_events_callback): Update, "entry" parameter is a
9382 struct thread_info * now.
9383 (select_singlestep_lwp_callback): Ditto.
9384 (select_event_lwp_callback): Ditto.
9385 (cancel_breakpoints_callback): Ditto.
9386 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9388 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9389 (unsuspend_one_lwp): Update, "entry" parameter is a
9390 struct thread_info * now.
9391 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9393 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9394 Fetch lwpid from thread, not lwp.
9395 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9396 Pass &all_threads to find_inferior, not &all_lwps.
9397 (send_sigstop): Fetch lwpid from thread, not lwp.
9398 (send_sigstop_callback): Update, "entry" parameter is a
9399 struct thread_info * now.
9400 (suspend_and_send_sigstop_callback): Ditto.
9401 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9402 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9403 struct thread_info * now.
9404 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9406 (lwp_running): Update, "entry" parameter is a
9407 struct thread_info * now.
9408 (stop_all_lwps): Fetch ptid from thread.
9409 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9410 (linux_resume_one_lwp): Fetch lwpid from thread.
9411 (linux_set_resume_request): Update, "entry" parameter is a
9412 struct thread_info * now. Fetch pid, lwpid from thread.
9413 (resume_status_pending_p): Update, "entry" parameter is a
9414 struct thread_info * now.
9415 (need_step_over_p): Ditto. Fetch lwpid from thread.
9416 (start_step_over): Fetch lwpid from thread.
9417 (linux_resume_one_thread): Update, "entry" parameter is a
9418 struct thread_info * now. Fetch lwpid from thread.
9419 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9420 (proceed_one_lwp): Update, "entry" parameter is a
9421 struct thread_info * now. Fetch lwpid from thread.
9422 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9423 struct thread_info * now.
9424 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9425 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9426 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9428 (regsets_store_inferior_registers): Ditto.
9429 (fetch_register, store_register): Ditto.
9430 (linux_read_memory, linux_write_memory): Ditto.
9431 (linux_request_interrupt): Ditto.
9432 (linux_read_auxv): Ditto.
9433 (linux_xfer_siginfo): Ditto.
9434 (linux_qxfer_spu): Ditto.
9435 (linux_qxfer_libraries_svr4): Ditto.
9436 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9437 moved to inferiors.h.
9439 (get_thread_lwp): Update.
9440 (struct lwp_info): Delete member "entry". Simplify comment for
9443 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9444 current_inferior directly.
9445 (update_watch_registers_callback): Update, "entry" parameter is a
9446 struct thread_info * now. Fetch pid from thread.
9447 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9448 (mips_insert_point): Fetch lwpid from current_inferior.
9449 Pass &all_threads to find_inferior, not &all_lwps.
9450 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9451 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9453 (mips_stopped_data_address): Ditto.
9454 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9456 * linux-tile-low.c (tile_arch_setup): Ditto.
9457 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9458 (update_debug_registers_callback): Update, "entry" parameter is a
9459 struct thread_info * now. Fetch pid from thread.
9460 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9461 Pass &all_threads to find_inferior, not &all_lwps.
9462 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9463 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9464 Pass &all_threads to find_inferior, not &all_lwps.
9465 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9466 (i386_dr_low_get_status): Ditto.
9467 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9468 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9469 (x86_linux_read_description): Ditto.
9470 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9472 2014-02-20 Doug Evans <dje@google.com>
9474 * inferiors.c (get_first_inferior): Fix buglet.
9476 2014-02-19 Doug Evans <dje@google.com>
9478 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9479 * inferiors.c (add_thread): Change result type to struct thread_info *.
9480 All callers updated.
9481 (add_lwp): Call add_thread here instead of in callers.
9482 All callers updated.
9483 * linux-low.h (get_lwp_thread): Rewrite.
9484 (struct lwp_info): New member "thread".
9486 2014-02-19 Doug Evans <dje@google.com>
9488 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9489 All callers updated.
9491 2014-02-19 Doug Evans <dje@google.com>
9493 * inferiors.c (add_thread): Fix whitespace.
9495 2014-02-19 Doug Evans <dje@google.com>
9497 * dll.c (clear_dlls): Replace accessing list implemention details
9499 * gdbthread.h (get_first_thread): Declare.
9500 * inferiors.c (for_each_inferior_with_data): New function.
9501 (get_first_thread): New function.
9502 (find_thread_ptid): Simplify.
9503 (get_first_inferior): New function.
9504 (clear_list): Delete.
9505 (one_inferior_p): New function.
9506 (clear_inferior_list): New function.
9507 (clear_inferiors): Update.
9508 * inferiors.h (for_each_inferior_with_data): Declare.
9509 (clear_inferior_list): Declare.
9510 (one_inferior_p): Declare.
9511 (get_first_inferior): Declare.
9512 * linux-low.c (linux_wait_for_event): Replace accessing list
9513 implemention details with API function.
9514 * server.c (target_running): Ditto.
9515 (accumulate_file_name_length): New function.
9516 (emit_dll_description): New function.
9517 (handle_qxfer_libraries): Replace accessing list implemention
9518 details with API function.
9519 (handle_qxfer_threads_worker): New function.
9520 (handle_qxfer_threads_proper): Replace accessing list implemention
9521 details with API function.
9522 (handle_query): Ditto.
9523 (visit_actioned_threads_callback_ftype): New typedef.
9524 (visit_actioned_threads_data): New struct.
9525 (visit_actioned_threads): Rewrite to be find_inferior callback.
9526 (resume): Call find_inferior.
9527 (handle_status): Replace accessing list implemention
9528 details with API function.
9529 (process_serial_event): Replace accessing list implemention details
9531 * target.c (set_desired_inferior): Replace accessing list implemention
9532 details with API function.
9533 * tracepoint.c (same_process_p): New function.
9534 (gdb_agent_about_to_close): Replace accessing list implemention
9535 details with API function.
9536 * win32-low.c (child_delete_thread): Replace accessing list
9537 implemention details with API function.
9538 (match_dll_by_basename): New function.
9539 (dll_is_loaded_by_basename): New function.
9540 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9541 details call to dll_is_loaded_by_basename.
9543 2014-02-19 Doug Evans <dje@google.com>
9545 * dll.h (struct dll_info): Add comment.
9546 * gdbthread.h (struct thread_info): Add comment.
9547 (current_ptid): Simplify.
9548 * inferiors.c (add_process): Update.
9549 (remove_process): Update.
9550 * inferiors.h (struct process_info): Rename member "head" to "entry".
9551 * linux-low.c (delete_lwp): Update.
9553 (last_thread_of_process_p): Update.
9554 (kill_one_lwp_callback, linux_kill): Update.
9555 (status_pending_p_callback): Update.
9556 (wait_for_sigstop): Update. Simplify read of ptid.
9557 (start_step_over): Update.
9558 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9559 (get_lwp_thread): Update.
9560 (struct lwp_info): Rename member "head" to "entry".
9561 * regcache.h (inferior_list_entry): Delete.
9562 * server.c (kill_inferior_callback): Update.
9563 (detach_or_kill_inferior_callback): Update.
9564 (print_started_pid): Update.
9565 (print_attached_pid): Update.
9566 (process_serial_event): Simplify read of ptid.
9567 * thread-db.c (thread_db_create_event): Update.
9568 (thread_db_get_tls_address): Update.
9569 * win32-low.c (current_inferior_ptid): Simplify.
9571 2014-02-19 Tom Tromey <tromey@redhat.com>
9573 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9575 (target_supports_btrace): Update.
9577 2014-02-14 Yao Qi <yao@codesourcery.com>
9579 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9580 (rsp-low-ipa.o): New target.
9582 2014-02-12 Tom Tromey <tromey@redhat.com>
9584 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9585 convert_ascii_to_int.
9586 * regcache.c (registers_to_string): Likewise.
9587 * remote-utils.c (decode_M_packet): Likewise.
9588 * server.c (process_serial_event): Likewise.
9590 2014-02-12 Tom Tromey <tromey@redhat.com>
9592 * server.c (handle_query, handle_v_run): Use hex2bin, not
9594 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9596 2014-02-12 Tom Tromey <tromey@redhat.com>
9598 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9599 convert_int_to_ascii.
9600 * regcache.c (registers_to_string, collect_register_as_string):
9602 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9604 * server.c (process_serial_event): Likewise.
9605 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9606 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9608 2014-02-12 Tom Tromey <tromey@redhat.com>
9610 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9611 bin2hex, not hexify.
9612 * tracepoint.c (cmd_qtstatus): Likewise.
9614 2014-02-12 Tom Tromey <tromey@redhat.com>
9616 * remote-utils.c (monitor_output): Pass explicit length to
9619 2014-02-12 Tom Tromey <tromey@redhat.com>
9621 * tracepoint.c: Include rsp-low.h.
9622 * server.c: Include rsp-low.h.
9623 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9624 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9626 * remote-utils.c: Include rsp-low.h.
9627 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9628 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9629 (convert_int_to_ascii, convert_ascii_to_int): Move to
9631 * regcache.c: Include rsp-low.h.
9632 * ax.c: Include rsp-low.h.
9633 * Makefile.in (SFILES): Add common/rsp-low.c.
9634 (OBS): Add rsp-low.o.
9635 (rsp-low.o): New target.
9637 2014-02-12 Tom Tromey <tromey@redhat.com>
9639 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9640 Include print-utils.h.
9641 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9642 (plongest, thirty_two, phex_nz): Remove.
9643 * Makefile.in (SFILES): Add common/print-utils.c.
9644 (OBS): Add print-utils.o.
9645 (print-utils-ipa.o): New target.
9646 (print-utils.o): New target.
9647 (IPA_OBJS): Add print-utils-ipa.o.
9649 2014-02-06 Tom Tromey <tromey@redhat.com>
9651 * Makefile.in (SFILES): Fix indentation.
9653 2014-02-05 Doug Evans <dje@google.com>
9655 * linux-low.c (linux_wait_for_event): Improve comment.
9656 (linux_wait_1): Keep current_inferior in sync with event_child.
9658 2014-01-22 Doug Evans <dje@google.com>
9660 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9662 2014-01-22 Doug Evans <dje@google.com>
9664 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9665 * configure: Regenerate.
9666 * config.in: Regenerate.
9667 * Makefile.in (SFILES): Add debug.c.
9669 * debug.c: New file.
9670 * debug.h: New file.
9671 * linux-aarch64-low.c (*): Update all debugging printfs to use
9672 debug_printf instead of fprintf.
9673 * linux-arm-low.c (*): Ditto.
9674 * linux-cris-low.c (*): Ditto.
9675 * linux-crisv32-low.c (*): Ditto.
9676 * linux-m32r-low.c (*): Ditto.
9677 * linux-sparc-low.c (*): Ditto.
9678 * linux-x86.c (*): Ditto.
9679 * linux-low.c (*): Ditto.
9680 (linux_wait_1): Add calls to debug_enter, debug_exit.
9681 (linux_wait): Remove redundant debugging printf.
9682 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9683 (linux_resume, unstop_all_lwps): Ditto.
9684 * mem-break.c (*): Update all debugging printfs to use
9685 debug_printf instead of fprintf.
9686 * remote-utils.c (*): Ditto.
9687 * thread-db.c (*): Ditto.
9688 * server.c #include <ctype.h>, "gdb_vecs.h".
9689 (debug_threads): Moved to debug.c.
9690 (*): Update all debugging printfs to use debug_printf instead of
9692 (start_inferior): Replace call to fflush with call to debug_flush.
9693 (monitor_show_help): Mention set debug-format.
9694 (parse_debug_format_options): New function.
9695 (handle_monitor_command): Handle "monitor set debug-format".
9696 (gdbserver_usage): Mention --debug-format.
9697 (main): Parse --debug-format.
9698 * server.h (debug_threads): Declaration moved to debug.h.
9700 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9701 trace_debug_1 that uses debug_printf.
9702 (tracepoint_look_up_symbols): Update all debugging printfs to use
9703 debug_printf instead of fprintf.
9705 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9707 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9710 2014-01-17 Pedro Alves <palves@redhat.com>
9713 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9714 defined after including gdb_proc_service.h.
9716 2014-01-16 Doug Evans <dje@google.com>
9718 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9719 (match_dll): Use it.
9721 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9723 * target.h (target_ops) <read_btrace>: Change parameters and
9724 return type to allow error reporting.
9725 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9726 trace reading errors on.
9727 * linux-low.c (linux_low_read_btrace): Pass trace reading
9729 (linux_low_disable_btrace): New.
9731 2014-01-15 Doug Evans <dje@google.com>
9733 * inferiors.c (thread_id_to_gdb_id): Delete.
9734 * inferiors.h (thread_id_to_gdb_id): Delete.
9736 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9738 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9739 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9742 2014-01-08 Pedro Alves <palves@redhat.com>
9744 * server.c (handle_status): Don't discard previous queued stop
9745 replies or thread's pending status here.
9746 (main) <disconnection>: Do it here instead.
9748 2014-01-08 Pedro Alves <palves@redhat.com>
9750 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9751 * server.c (visit_actioned_threads, handle_pending_status): New
9753 (handle_v_cont): Factor out parts to ...
9754 (resume): ... this new function. If in all-stop, and a thread
9755 being resumed has a pending status, report it without actually
9757 (myresume): Adjust to use the new 'resume' function.
9758 (clear_pending_status_callback, set_pending_status_callback)
9759 (find_status_pending_thread_callback): New functions.
9760 (handle_status): Handle the case of multiple threads having
9761 interesting statuses to report. Report threads' real last signal
9762 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9763 with an interesting thread to report the status for, instead of
9764 always reporting the status of the first thread.
9766 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9768 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9769 * gdbreplay.c (gdbreplay_version): Likewise.
9771 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9773 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9774 iov.iov_len with the real length in use.
9776 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9778 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9779 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9780 for all targets that use win32-low.c.
9781 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9782 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9784 2013-12-13 Pedro Alves <palves@redhat.com>
9786 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9787 if equal to TARGET_WAITKIND_LOADED.
9788 * win32-low.c (cached_status): New static global.
9789 (win32_wait): Add declaration.
9790 (do_initial_child_stuff): Flush all initial pending debug events
9791 up to the initial breakpoint.
9792 (win32_wait): If CACHED_STATUS was set, return that instead
9793 of doing a real wait. Remove the code resuming the execution
9794 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9795 during the initial phase. Also remove the code changing
9796 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9797 TARGET_WAITKIND_STOPPED.
9799 2013-12-11 Yao Qi <yao@codesourcery.com>
9801 * notif.c (handle_notif_ack): Return 0 if no notification
9804 2013-11-20 Doug Evans <dje@google.com>
9806 * linux-low.c (linux_set_resume_request): Fix comment.
9808 2013-11-20 Doug Evans <dje@google.com>
9810 * linux-low.c (resume_status_pending_p): Tweak comment.
9812 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9814 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9815 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9816 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9817 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9818 (srv_amd64_regobj): Add amd64-mpx.o.
9819 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9820 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9821 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9822 * i387-fp.c (num_pl_bnd_register) Added constant.
9823 (num_pl_bnd_cfg_registers) Added constant.
9824 (struct i387_xsave) Added reserved area and MPX fields.
9825 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9826 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9828 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9829 (init_registers_amd64_mpx_linux): Declare new function.
9830 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9831 (x86_64_regmap): Add MPX registers.
9832 (x86_linux_read_description): Add MPX case.
9833 (initialize_low_arch): Initialize MPX targets.
9835 2013-11-18 Tom Tromey <tromey@redhat.com>
9837 * configure: Rebuild.
9838 * configure.ac: Don't check for stdlib.h.
9839 * gdbreplay.c: Unconditionally include stdlib.h.
9841 2013-11-18 Tom Tromey <tromey@redhat.com>
9843 * config.in: Rebuild.
9844 * configure: Rebuild.
9845 * configure.ac: Don't use AC_HEADER_DIRENT.
9847 2013-11-18 Tom Tromey <tromey@redhat.com>
9849 * server.h: Don't check HAVE_STRING_H.
9850 * gdbreplay.c: Don't check HAVE_STRING_H.
9851 * configure: Rebuild.
9853 2013-11-18 Tom Tromey <tromey@redhat.com>
9855 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9858 2013-11-08 Tom Tromey <tromey@redhat.com>
9860 * configure, config.in: Rebuild.
9861 * configure.ac: Remove unused configury.
9863 2013-11-08 Tom Tromey <tromey@redhat.com>
9865 * acinclude.m4: Include common.m4, codeset.m4.
9866 * configure, config.in: Rebuild.
9867 * configure.ac: Use GDB_AC_COMMON.
9869 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9871 * linux-s390-low.c (HWCAP_S390_TE): New define.
9872 (s390_arch_setup): Consider the TE field in the HWCAP for
9873 determining 'have_regset_tdb'.
9875 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9878 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9881 2013-10-02 Pedro Alves <palves@redhat.com>
9883 * server.c (process_serial_event): Don't output "GDBserver
9884 exiting" if GDB is connected through stdio.
9885 * target.c (mywait): Likewise, be silent if GDB is connected
9888 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9890 * lynx-low.c (lynx_add_threads_after_attach): New function.
9891 (lynx_attach): Remove call to add_thread. Add call to
9892 lynx_add_threads_after_attach instead.
9894 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9896 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9897 * config.in, configure: Regenerated.
9899 2013-09-18 Yao Qi <yao@codesourcery.com>
9902 * server.c (start_inferior): Clear 'resume_info'.
9904 2013-09-16 Jiong Wang <jiwang@tilera.com>
9906 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9909 2013-09-16 Jiong Wang <jiwang@tilera.com>
9911 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9912 linux-tile-low.o to srv_tgtobj.
9914 2013-09-16 Will Newton <will.newton@linaro.org>
9916 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9919 2013-09-06 Pedro Alves <palves@redhat.com>
9921 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9922 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9923 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9924 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9925 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9926 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9928 2013-09-06 Pedro Alves <palves@redhat.com>
9930 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9931 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9933 2013-09-06 Pedro Alves <palves@redhat.com>
9935 * linux-amd64-ipa.c: Include tracepoint.h.
9936 * linux-i386-ipa.c: Include tracepoint.h.
9938 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9940 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9941 (ps_get_thread_area): New function.
9943 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9945 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9946 (initialize_low_arch): Call init_registers_crisv32 rather than
9947 init_register_crisv32.
9949 2013-09-05 Pedro Alves <palves@redhat.com>
9951 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9953 * hostio.h: ... this new file.
9954 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9955 win32-low.c: Include hostio.h.
9957 2013-09-05 Pedro Alves <palves@redhat.com>
9959 * server.h (gdb_client_data, handler_func, callback_handler_func)
9960 (delete_file_handler, add_file_handler, append_callback_event)
9961 (delete_callback_event, start_event_loop, initialize_event_loop):
9962 Move to event-loop.h and include it.
9963 * event-loop.h: New file.
9965 2013-09-05 Pedro Alves <palves@redhat.com>
9967 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9968 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9969 (loaded_dll, unloaded_dll): Move to ...
9970 * dll.h: ... this new file.
9971 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9973 2013-09-05 Pedro Alves <palves@redhat.com>
9975 * server.h (current_process, get_thread_process, all_processes)
9976 (add_inferior_to_list, for_each_inferior, current_inferior)
9977 (remove_inferior, add_process, remove_process, find_process_pid)
9978 (have_started_inferiors_p, have_attached_inferiors_p)
9979 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9980 (clear_inferiors, find_inferior, find_inferior_id)
9981 (inferior_target_data, set_inferior_target_data)
9982 (inferior_regcache_data, set_inferior_regcache_data): Move to
9983 inferiors.h, and include it.
9984 * inferiors.h: New file.
9986 2013-09-05 Pedro Alves <palves@redhat.com>
9988 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9992 2013-09-05 Pedro Alves <palves@redhat.com>
9994 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9996 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9997 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9998 (handle_tracepoint_general_set, handle_tracepoint_query)
9999 (tracepoint_finished_step, tracepoint_was_hit)
10000 (release_while_stepping_state_list, current_traceframe)
10001 (in_readonly_region, traceframe_read_mem)
10002 (fetch_traceframe_registers, traceframe_read_sdata)
10003 (traceframe_read_info, struct fast_tpoint_collect_status)
10004 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10005 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10006 (supply_fast_tracepoint_registers)
10007 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10008 (ipa_tdesc, claim_trampoline_space)
10009 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10010 (agent_mem_read, agent_get_trace_state_variable_value)
10011 (agent_set_trace_state_variable_value, agent_tsv_read)
10012 (agent_mem_read_string, get_raw_reg_func_addr)
10013 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10014 * tracepoint.h: ... this new file.
10016 2013-09-05 Pedro Alves <palves@redhat.com>
10018 * server.h (perror_with_name, error, fatal, warning, paddress)
10019 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10021 * utils.h: New file.
10023 2013-09-05 Pedro Alves <palves@redhat.com>
10025 * server.h (remote_debug, noack_mode, transport_is_reliable)
10026 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10027 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10028 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10029 (write_enn, initialize_async_io, enable_async_io)
10030 (disable_async_io, check_remote_input_interrupt_request)
10031 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10032 (dead_thread_notify, prepare_resume_reply)
10033 (decode_address_to_semicolon, decode_address, decode_m_packet)
10034 (decode_M_packet, decode_X_packet, decode_xfer_write)
10035 (decode_search_memory_packet, unhexify, hexify)
10036 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10037 (look_up_one_symbol, relocate_instruction)
10038 (monitor_output): Move to remote-utils.h, and include it.
10039 * remote-utils.h: New file.
10041 2013-09-05 Pedro Alves <palves@redhat.com>
10043 * server.h (_): Delete.
10045 2013-09-02 Pedro Alves <palves@redhat.com>
10047 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10048 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10050 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10052 2013-09-02 Pierre Muller <muller@sourceware.org>
10054 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10055 or WriteProcessMemory complete successfully and handle
10056 ERROR_PARTIAL_COPY error.
10058 2013-09-02 Pedro Alves <palves@redhat.com>
10060 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10061 error instead of EIO.
10063 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10066 * linux-low.c: Include filestuff.h.
10067 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10068 * lynx-low.c: Include filestuff.h.
10069 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10070 * server.c: Include filestuff.h.
10071 (main): Call notice_open_fds.
10072 * spu-low.c: Include filestuff.h.
10073 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10075 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10077 * Makefile.in: Explain why ../target and ../nat are not
10078 listed as include file search paths.
10079 (linux-waitpid.o): New object file rule.
10080 * configure.srv (srv_native_linux_obj): New variable.
10081 Replace all occurrences of linux native object files with
10082 $srv_native_linux_obj.
10083 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10084 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10085 (linux_enable_event_reporting): Remove declaration.
10086 (my_waitpid): Moved to common/linux-waitpid.c.
10087 (linux_wait_for_event): Pass ptid when calling
10088 linux_enable_event_reporting.
10089 (linux_supports_tracefork_flag): Remove.
10090 (linux_enable_event_reporting): Likewise.
10091 (linux_tracefork_grandchild): Remove.
10092 (STACK_SIZE): Moved to common/linux-ptrace.c.
10093 (linux_tracefork_child): Remove.
10094 (linux_test_for_tracefork): Remove.
10095 (linux_look_up_symbols): Call linux_supports_traceclone.
10096 (initialize_low): Remove call to linux_test_for_tracefork.
10097 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10098 common/linux-ptrace.h.
10099 (PTRACE_TYPE_ARG4): Likewise.
10100 Include linux-ptrace.h.
10102 2013-08-21 Pedro Alves <palves@redhat.com>
10104 * config.in: Renegerate.
10106 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10108 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10109 (SFILES): Remove $(srcdir)/common/target-common.c and
10110 add $(srcdir)/target/waitstatus.c.
10111 (OBS): Remove target-common.o and add waitstatus.o.
10112 (server_h): Remove $(srcdir)/../common/target-common.h and
10113 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10114 and $(srcdir)/../target/waitstatus.h.
10115 (target-common.o): Remove.
10116 (waitstatus.o): New target object file.
10117 * target.h: Do not include target-common.h and
10118 include target/resume.h, target/wait.h and
10119 target/waitstatus.h.
10121 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10123 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10124 to PTRACE_TYPE_ARG3.
10125 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10126 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10128 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10129 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10131 2013-07-27 Jie Zhang <jie@codesourcery.com>
10132 Daniel Jacobowitz <dan@codesourcery.com>
10133 Yao Qi <yao@codesourcery.com>
10135 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10136 (mips-linux-watch.o): New rule.
10137 (mips_linux_watch_h): New variable.
10138 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10140 * linux-mips-low.c: Include mips-linux-watch.h.
10141 (struct arch_process_info, struct arch_lwp_info): New.
10142 (update_watch_registers_callback): New function.
10143 (mips_linux_new_process, mips_linux_new_thread) New functions.
10144 (mips_linux_prepare_to_resume, mips_insert_point): New
10146 (mips_remove_point, mips_stopped_by_watchpoint): New
10148 (rsp_bp_type_to_target_hw_bp_type): New function.
10149 (mips_stopped_data_address): New function.
10150 (the_low_target): Add watchpoint support functions.
10152 2013-07-27 Yao Qi <yao@codesourcery.com>
10154 * i386-low.c: Include break-common.h.
10155 (enum target_hw_bp_type): Remove.
10157 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10159 * Makefile.in (SFILES): /common/target-common.c.
10160 (OBS): Add target-common.o.
10161 (server_h): Add $(srcdir)/../common/target-common.h.
10162 (target-common.o): New target.
10163 * server.c (queue_stop_reply_callback): Free
10164 status string after use.
10165 * target.c (target_waitstatus_to_string): Remove.
10166 * target.h: Include target-common.h.
10167 (resume_kind): Likewise.
10168 (target_waitkind): Likewise.
10169 (target_waitstatus): Likewise.
10170 (TARGET_WNOHANG): Likewise.
10172 2013-07-04 Yao Qi <yao@codesourcery.com>
10174 * Makefile.in (host_alias): Use @host_noncanonical@.
10175 (target_alias): Use @target_noncanonical@.
10176 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10177 ACX_NONCANONICAL_HOST.
10178 * configure: Regenerated.
10181 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10183 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10184 * configure: Rebuild.
10185 * Makefile.in (version_host, version_target): Get from configure.
10186 (version.c): Use $(version_host) and $(version_target).
10188 2013-07-03 Pedro Alves <palves@redhat.com>
10190 * Makefile.in (config.status): Depend on development.sh.
10191 * acinclude.m4: Include libmcheck.m4.
10192 * configure: Regenerate.
10194 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10196 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10197 attribute inside the parentheses.
10198 (winapi_DebugSetProcessKillOnExit): Ditto.
10199 (winapi_DebugBreakProcess): Ditto.
10200 (winapi_GenerateConsoleCtrlEvent): Ditto.
10202 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10204 * notif.h (notif_event): Add a dummy member to avoid compiler
10207 2013-07-01 Pedro Alves <palves@redhat.com>
10209 * hostio.c (HOSTIO_PATH_MAX): Define.
10210 (require_filename, handle_open, handle_unlink, handle_readlink):
10213 2013-07-01 Pedro Alves <palves@redhat.com>
10215 * server.h: Include "pathmax.h".
10216 * linux-low.c: Don't include sys/param.h.
10217 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10219 * win32-low.c: Don't include sys/param.h.
10220 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10222 2013-07-01 Pedro Alves <palves@redhat.com>
10224 * event-loop.c: Don't check HAVE_UNISTD_H before including
10226 * gdbreplay.c: Likewise.
10227 * remote-utils.c: Likewise.
10228 * server.c: Likewise.
10229 * configure.ac: Don't check for unistd.h.
10230 * configure: Regenerate.
10232 2013-06-28 Tom Tromey <tromey@redhat.com>
10234 * Makefile.in (version.c): Use version.in, not
10237 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10239 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10240 * configure: Rebuild.
10241 * Makefile.in (version_host, version_target): Get from configure.
10242 (version.c): Use $(version_host) and $(version_target).
10244 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10246 Fix trace-status to output user name without trailing colon.
10247 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10249 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10251 Fix trace-status to output proper start-time and stop-time.
10252 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10253 output start time and stop time in hex as gdb expects.
10255 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10257 * tracepoint.c (build_traceframe_info_xml): Output trace state
10258 variables present in the trace buffer.
10260 2013-06-24 Tom Tromey <tromey@redhat.com>
10262 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10264 (version.o): Remove.
10265 * gdbreplay.c: Include version.h.
10266 (version, host_name): Don't declare.
10267 * server.h: Include version.h.
10268 (version, host_name): Don't declare.
10270 2013-06-12 Pedro Alves <palves@redhat.com>
10272 * linux-x86-low.c (linux_is_elf64): Delete global.
10273 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10274 with local linux_pid_exe_is_elf_64_file use.
10276 2013-06-11 Pedro Alves <palves@redhat.com>
10278 * linux-low.c (regset_disabled, disable_regset): New functions.
10279 (regsets_fetch_inferior_registers)
10280 (regsets_store_inferior_registers): Use them.
10281 (initialize_regsets_info); Don't allocate the disabled_regsets
10283 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10286 2013-06-11 Pedro Alves <palves@redhat.com>
10288 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10291 2013-06-11 Pedro Alves <palves@redhat.com>
10293 * linux-x86-low.c (initialize_low_arch): Call
10294 init_registers_x32_avx_linux.
10296 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10298 Fix compatibility with Android Bionic.
10299 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10302 2013-06-07 Pedro Alves <palves@redhat.com>
10305 * Makefile.in (OBS): Add tdesc.o.
10306 (IPA_OBJS): Add tdesc-ipa.o.
10307 (tdesc-ipa.o): New rule.
10308 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10310 * linux-low.c (new_inferior): Delete.
10311 (disabled_regsets, num_regsets): Delete.
10312 (linux_add_process): Adjust to set the new per-process
10314 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10315 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10316 was a stop. When calling arch_setup, switch the current inferior
10317 to the thread that got an event.
10318 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10319 (regsets_fetch_inferior_registers)
10320 (regsets_store_inferior_registers): New regsets_info parameter.
10322 (linux_register_in_regsets): New regs_info parameter. Adjust to
10324 (register_addr, fetch_register, store_register): New usrregs_info
10325 parameter. Adjust to use it.
10326 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10327 parameter regs_info. Adjust to use it.
10328 (linux_fetch_registers): Get the current inferior's regs_info, and
10330 (linux_store_registers): Ditto.
10331 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10332 (initialize_low): Don't initialize the target_regsets here. Call
10333 initialize_low_arch.
10334 * linux-low.h (target_regsets): Delete declaration.
10335 (struct regsets_info): New.
10336 (struct usrregs_info): New.
10337 (struct regs_info): New.
10338 (struct process_info_private) <new_inferior>: New field.
10339 (struct linux_target_ops): Delete the num_regs, regmap, and
10340 regset_bitmap fields. New field regs_info.
10341 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10342 * i387-fp.c (num_xmm_registers): Delete.
10343 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10344 calls to new interface.
10345 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10346 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10347 Infer the number of xmm registers from the regcache's target
10349 * i387-fp.h (num_xmm_registers): Delete.
10350 * inferiors.c (add_thread): Don't install the thread's regcache
10352 * proc-service.c (gregset_info): Fetch the current inferior's
10353 regs_info. Adjust to use it.
10354 * regcache.c: Include tdesc.h.
10355 (register_bytes, reg_defs, num_registers)
10356 (gdbserver_expedite_regs): Delete.
10357 (get_thread_regcache): If the thread doesn't have a regcache yet,
10358 create one, instead of aborting gdbserver.
10359 (regcache_invalidate_one): Rename to ...
10360 (regcache_invalidate_thread): ... this.
10361 (regcache_invalidate_one): New.
10362 (regcache_invalidate): Only invalidate registers of the current
10364 (init_register_cache): Add target_desc parameter, and use it.
10365 (new_register_cache): Ditto. Assert the target description has a
10366 non zero registers_size.
10367 (regcache_cpy): Add assertions. Adjust.
10368 (realloc_register_cache, set_register_cache): Delete.
10369 (registers_to_string, registers_from_string): Adjust.
10370 (find_register_by_name, find_regno, find_register_by_number)
10371 (register_cache_size): Add target_desc parameter, and use it.
10372 (free_register_cache_thread, free_register_cache_thread_one)
10373 (regcache_release, register_cache_size): New.
10374 (register_size): Add target_desc parameter, and use it.
10375 (register_data, supply_register, supply_register_zeroed)
10376 (supply_regblock, supply_register_by_name, collect_register)
10377 (collect_register_as_string, collect_register_by_name): Adjust.
10378 * regcache.h (struct target_desc): Forward declare.
10379 (struct regcache) <tdesc>: New field.
10380 (init_register_cache, new_register_cache): Add target_desc
10382 (regcache_invalidate_thread): Declare.
10383 (regcache_invalidate_one): Delete declaration.
10384 (regcache_release): Declare.
10385 (find_register_by_number, register_cache_size, register_size)
10386 (find_regno): Add target_desc parameter.
10387 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10389 * remote-utils.c: Include tdesc.h.
10390 (outreg, prepare_resume_reply): Adjust.
10391 * server.c: Include tdesc.h.
10392 (gdbserver_xmltarget): Delete declaration.
10393 (get_features_xml, process_serial_event): Adjust.
10394 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10396 (struct process_info) <tdesc>: New field.
10397 (ipa_tdesc): Declare.
10398 * tdesc.c: New file.
10399 * tdesc.h: New file.
10400 * tracepoint.c: Include tdesc.h.
10401 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10402 (get_context_regcache): Adjust to pass ipa_tdesc down.
10403 (do_action_at_tracepoint): Adjust to get the register cache size
10404 from the context regcache's description.
10405 (traceframe_walk_blocks): Adjust to get the register cache size
10406 from the current trace frame's description.
10407 (traceframe_get_pc): Adjust to get current trace frame's
10408 description and pass it down.
10409 (gdb_collect): Adjust to get the register cache size from the
10411 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10412 (gdbserver_xmltarget): Delete.
10413 (initialize_low_tracepoint): Set the ipa's target description.
10414 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10415 (initialize_low_tracepoint): Set the ipa's target description.
10416 * linux-x86-low.c: Include tdesc.h.
10417 [__x86_64__] (is_64bit_tdesc): New.
10418 (ps_get_thread_area, x86_get_thread_area): Use it.
10419 (i386_cannot_store_register): Rename to ...
10420 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10421 (i386_cannot_fetch_register): Rename to ...
10422 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10423 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10425 (target_regsets): Rename to ...
10426 (x86_regsets): ... this.
10427 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10429 (x86_siginfo_fixup): Use is_64bit_tdesc.
10430 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10431 (tdesc_x32_avx_linux, tdesc_x32_linux)
10432 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10434 (x86_linux_update_xmltarget): Delete.
10435 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10436 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10437 (AMD64_LINUX_USER64_CS): New.
10438 (x86_linux_read_description): New, based on
10439 x86_linux_update_xmltarget.
10440 (same_process_callback): New.
10441 (x86_arch_setup_process_callback): New.
10442 (x86_linux_update_xmltarget): New.
10443 (x86_regsets_info): New.
10444 (amd64_linux_regs_info): New.
10445 (i386_linux_usrregs_info): New.
10446 (i386_linux_regs_info): New.
10447 (x86_linux_regs_info): New.
10448 (x86_arch_setup): Reimplement.
10449 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10450 (x86_emit_ops): Ditto.
10451 (the_low_target): Adjust. Install x86_linux_regs_info,
10452 x86_cannot_fetch_register, and x86_cannot_store_register.
10453 (initialize_low_arch): New.
10454 * linux-ia64-low.c (tdesc_ia64): Declare.
10455 (ia64_fetch_register): Adjust.
10456 (ia64_usrregs_info, regs_info): New globals.
10457 (ia64_regs_info): New function.
10458 (the_low_target): Adjust.
10459 (initialize_low_arch): New function.
10460 * linux-sparc-low.c (tdesc_sparc64): Declare.
10461 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10463 (sparc_arch_setup): New function.
10464 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10465 (the_low_target): Adjust.
10466 (initialize_low_arch): New function.
10467 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10468 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10469 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10470 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10471 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10472 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10473 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10474 (tdesc_powerpc_isa205_vsx64l): Declare.
10475 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10476 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10477 (ppc_set_pc, ppc_get_hwcap): Adjust.
10478 (ppc_usrregs_info): Forward declare.
10479 (!__powerpc64__) ppc_regmap_adjusted: New global.
10480 (ppc_arch_setup): Adjust to the current process'es target
10482 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10483 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10484 (ppc_store_evrregset): Adjust.
10485 (target_regsets): Rename to ...
10486 (ppc_regsets): ... this, and make static.
10487 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10488 (ppc_regs_info): New function.
10489 (the_low_target): Adjust.
10490 (initialize_low_arch): New function.
10491 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10492 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10493 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10494 (tdesc_s390x_linux64v2): Declare.
10495 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10496 (s390_fill_gregset, s390_store_last_break): Adjust.
10497 (target_regsets): Rename to ...
10498 (s390_regsets): ... this, and make static.
10499 (s390_get_pc, s390_set_pc): Adjust.
10500 (s390_get_hwcap): New target_desc parameter, and use it.
10501 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10502 (s390_arch_setup): Adjust to set the current process'es target
10503 description. Don't adjust the regmap.
10504 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10505 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10506 (regs_info_3264): New globals.
10507 (s390_regs_info): New function.
10508 (the_low_target): Adjust.
10509 (initialize_low_arch): New function.
10510 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10511 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10512 [__mips64] (init_registers_mips_linux)
10513 (init_registers_mips_dsp_linux): Delete defines.
10514 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10515 (have_dsp): New global.
10516 (mips_read_description): New, based on mips_arch_setup.
10517 (mips_arch_setup): Reimplement.
10518 (get_usrregs_info): New function.
10519 (mips_cannot_fetch_register, mips_cannot_store_register)
10520 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10521 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10522 (target_regsets): Rename to ...
10523 (mips_regsets): ... this, and make static.
10524 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10525 (dsp_regs_info, regs_info): New globals.
10526 (mips_regs_info): New function.
10527 (the_low_target): Adjust.
10528 (initialize_low_arch): New function.
10529 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10530 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10532 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10533 (arm_read_description): New, with bits factored from
10535 (arm_arch_setup): Reimplement.
10536 (target_regsets): Rename to ...
10537 (arm_regsets): ... this, and make static.
10538 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10539 (arm_regs_info): New function.
10540 (the_low_target): Adjust.
10541 (initialize_low_arch): New function.
10542 * linux-m68k-low.c (tdesc_m68k): Declare.
10543 (target_regsets): Rename to ...
10544 (m68k_regsets): ... this, and make static.
10545 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10546 (m68k_regs_info): New function.
10547 (m68k_arch_setup): New function.
10548 (the_low_target): Adjust.
10549 (initialize_low_arch): New function.
10550 * linux-sh-low.c (tdesc_sharch): Declare.
10551 (target_regsets): Rename to ...
10552 (sh_regsets): ... this, and make static.
10553 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10554 (sh_regs_info, sh_arch_setup): New functions.
10555 (the_low_target): Adjust.
10556 (initialize_low_arch): New function.
10557 * linux-bfin-low.c (tdesc_bfin): Declare.
10558 (bfin_arch_setup): New function.
10559 (bfin_usrregs_info, regs_info): New globals.
10560 (bfin_regs_info): New function.
10561 (the_low_target): Adjust.
10562 (initialize_low_arch): New function.
10563 * linux-cris-low.c (tdesc_cris): Declare.
10564 (cris_arch_setup): New function.
10565 (cris_usrregs_info, regs_info): New globals.
10566 (cris_regs_info): New function.
10567 (the_low_target): Adjust.
10568 (initialize_low_arch): New function.
10569 * linux-cris-low.c (tdesc_crisv32): Declare.
10570 (cris_arch_setup): New function.
10571 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10572 (cris_regs_info): New function.
10573 (the_low_target): Adjust.
10574 (initialize_low_arch): New function.
10575 * linux-m32r-low.c (tdesc_m32r): Declare.
10576 (m32r_arch_setup): New function.
10577 (m32r_usrregs_info, regs_info): New globals.
10578 (m32r_regs_info): Adjust.
10579 (initialize_low_arch): New function.
10580 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10581 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10582 (tic6x_usrregs_info): Forward declare.
10583 (tic6x_read_description): New function, based on ...
10584 (tic6x_arch_setup): ... this. Reimplement.
10585 (target_regsets): Rename to ...
10586 (tic6x_regsets): ... this, and make static.
10587 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10588 (tic6x_regs_info): New function.
10589 (the_low_target): Adjust.
10590 (initialize_low_arch): New function.
10591 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10592 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10593 (target_regsets): Rename to ...
10594 (xtensa_regsets): ... this, and make static.
10595 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10597 (xtensa_arch_setup, xtensa_regs_info): New functions.
10598 (the_low_target): Adjust.
10599 (initialize_low_arch): New function.
10600 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10601 (nios2_arch_setup): Set the current process'es tdesc.
10602 (target_regsets): Rename to ...
10603 (nios2_regsets): ... this.
10604 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10605 (nios2_regs_info): New function.
10606 (the_low_target): Adjust.
10607 (initialize_low_arch): New function.
10608 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10609 (aarch64_arch_setup): Set the current process'es tdesc.
10610 (target_regsets): Rename to ...
10611 (aarch64_regsets): ... this.
10612 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10613 (aarch64_regs_info): New function.
10614 (the_low_target): Adjust.
10615 (initialize_low_arch): New function.
10616 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10618 (target_regsets): Rename to ...
10619 (tile_regsets): ... this.
10620 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10621 (tile_regs_info): New function.
10622 (tile_arch_setup): Set the current process'es tdesc.
10623 (the_low_target): Adjust.
10624 (initialize_low_arch): New function.
10625 * spu-low.c (tdesc_spu): Declare.
10626 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10627 * win32-arm-low.c (tdesc_arm): Declare.
10628 (arm_arch_setup): New function.
10629 (the_low_target): Install arm_arch_setup instead of
10630 init_registers_arm.
10631 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10632 (init_windows_x86): Rename to ...
10633 (i386_arch_setup): ... this. Set `win32_tdesc'.
10634 (the_low_target): Adjust.
10635 * win32-low.c (win32_tdesc): New global.
10636 (child_add_thread): Don't create the thread cache here.
10637 (do_initial_child_stuff): Set the new process'es tdesc.
10638 * win32-low.h (struct target_desc): Forward declare.
10639 (win32_tdesc): Declare.
10640 * lynx-i386-low.c (tdesc_i386): Declare global.
10641 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10642 * lynx-low.c (lynx_tdesc): New global.
10643 (lynx_add_process): Set the new process'es tdesc.
10644 * lynx-low.h (struct target_desc): Forward declare.
10645 (lynx_tdesc): Declare global.
10646 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10647 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10648 * nto-low.c (nto_tdesc): New global.
10649 (do_attach): Set the new process'es tdesc.
10650 * nto-low.h (struct target_desc): Forward declare.
10651 (nto_tdesc): Declare.
10652 * nto-x86-low.c (tdesc_i386): Declare.
10653 (nto_x86_arch_setup): Set `nto_tdesc'.
10655 2013-06-04 Gary Benson <gbenson@redhat.com>
10657 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10658 to qSupported response when appropriate.
10659 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10660 with nonzero-length annex.
10661 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10662 arguments supplied in annex.
10664 2013-05-31 Doug Evans <dje@google.com>
10667 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10668 64 bits in 64-cross-32 environment.
10670 2013-05-28 Pedro Alves <palves@redhat.com>
10672 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10673 (aarch64-without-fpu.c): Delete rule.
10674 * configure.srv (aarch64*-*-linux*): Remove references to
10675 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10676 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10679 2013-05-24 Pedro Alves <palves@redhat.com>
10681 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10682 instead of strchr/decode_address. Error if the range isn't split
10683 with a ','. Don't assume there's be a ':' in the action.
10685 2013-05-23 Yao Qi <yao@codesourcery.com>
10686 Pedro Alves <palves@redhat.com>
10688 * linux-low.c (lwp_in_step_range): New function.
10689 (linux_wait_1): If the thread was range stepping and stopped
10690 outside the stepping range, report the stop to GDB. Otherwise,
10691 continue stepping. Add range stepping debug output.
10692 (linux_set_resume_request): Copy the step range from the resume
10693 request to the lwp.
10694 (linux_supports_range_stepping): New.
10695 (linux_target_ops) <supports_range_stepping>: Set to
10696 linux_supports_range_stepping.
10697 * linux-low.h (struct linux_target_ops)
10698 <supports_range_stepping>: New field.
10699 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10700 * linux-x86-low.c (x86_supports_range_stepping): New.
10701 (the_low_target) <supports_range_stepping>: Set to
10702 x86_supports_range_stepping.
10703 * server.c (handle_v_cont): Handle 'r' action.
10704 (handle_v_requests): Append ";r" if the target supports range
10706 * target.h (struct thread_resume) <step_range_start,
10707 step_range_end>: New fields.
10708 (struct target_ops) <supports_range_stepping>:
10710 (target_supports_range_stepping): New macro.
10712 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10714 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10715 confusion in comment.
10717 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10719 * lynx-low.c (struct process_info_private): New type.
10720 (lynx_add_process): New function.
10721 (lynx_create_inferior, lynx_attach): Replace calls to
10722 add_process by calls to lynx_add_process.
10723 (lynx_resume): If PTID is null, then try using
10724 current_process()->private->last_wait_event_ptid.
10726 (lynx_clear_inferiors): Delete. The contents of that function
10727 has been inlined in lynx_mourn;
10728 (lynx_wait_1): Save the ptid in the process's private data.
10729 (lynx_mourn): Free the process' private data. Replace call
10730 to lynx_clear_inferiors by call to clear_inferiors.
10732 2013-05-17 Yao Qi <yao@codesourcery.com>
10734 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10737 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10739 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10740 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10741 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10742 PT_TEXT_END_ADDR guards. Update comments.
10743 (linux_target_op) <read_offsets>: Conditionally define to
10744 linux_read_offsets if the target is UCLIBC and if it defines
10745 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10747 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10748 Andrew Jenner <andrew@codesourcery.com>
10750 * Makefile.in (SFILES): Add linux-nios2-low.c.
10751 (clean): Add action to delete nios2-linux.c.
10752 (nios2-linux.c): New rule.
10753 * configure.srv: Add nios2*-*-linux*.
10754 * linux-nios2-low.c: New.
10756 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10758 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10760 2013-04-25 Hui Zhu <hui@codesourcery.com>
10763 * ax.c (ax_printf): Add fflush.
10765 2013-04-22 Tom Tromey <tromey@redhat.com>
10767 * Makefile.in (SFILES): Add filestuff.c.
10768 (OBS): Add filestuff.o.
10769 (filestuff.o): New target.
10770 * config.in, configure: Rebuild.
10771 * configure.ac: Check for fdwalk, pipe2.
10773 2013-04-17 Pedro Alves <palves@redhat.com>
10775 * configure.ac (USE_THREAD_DB): Delete variable.
10776 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10777 Don't AC_SUBST USE_THREAD_DB.
10778 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10779 * config.in, configure: Regenerate.
10781 2013-04-16 Pedro Alves <palves@redhat.com>
10783 * linux-low.h (struct lwp_info) <thread_known>: Move under
10784 the USE_THREAD_DB #ifdef.
10786 2013-04-16 Pedro Alves <palves@redhat.com>
10788 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10789 (linux-low.o): Delete rule.
10790 * linux-low.h: Always include "gdb_thread_db.h" instead of
10791 conditionally including thread_db.h.
10792 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10795 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10797 * Makefile.in (install-only): Fix make install regression.
10799 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10801 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10802 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10804 * gdbserver.1: Remove.
10806 2013-03-22 Pedro Alves <palves@redhat.com>
10808 * linux-low.c (handle_extended_wait): Don't call
10809 linux_enable_event_reporting.
10811 2013-03-15 Tony Theodore <tonyt@logyst.com>
10814 * Makefile.in (SHELL): Use @SHELL@.
10816 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10818 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10821 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10823 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10824 Remove extraneous NULL element.
10826 2013-03-13 Yao Qi <yao@codesourcery.com>
10828 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10829 'V' block in trace frame.
10831 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10833 * target.h (struct target_ops): Add btrace ops.
10834 (target_supports_btrace): New macro.
10835 (target_enable_btrace): New macro.
10836 (target_disable_btrace): New macro.
10837 (target_read_btrace): New macro.
10838 * gdbthread.h (struct thread_info): Add btrace field.
10839 * server.c: Include btrace-common.h.
10840 (handle_btrace_general_set): New function.
10841 (handle_btrace_enable): New function.
10842 (handle_btrace_disable): New function.
10843 (handle_general_set): Call handle_btrace_general_set.
10844 (handle_qxfer_btrace): New function.
10845 (struct qxfer qxfer_packets[]): Add btrace entry.
10846 * inferiors.c (remove_thread): Disable btrace.
10847 * linux-low: Include linux-btrace.h.
10848 (linux_low_enable_btrace): New function.
10849 (linux_low_read_btrace): New function.
10850 (linux_target_ops): Add btrace ops.
10851 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10852 Add srv_linux_btrace=yes.
10853 (x86_64-*-linux*): Add linux-btrace.o.
10854 Add srv_linux_btrace=yes.
10855 * configure.ac: Define HAVE_LINUX_BTRACE.
10856 * config.in: Regenerated.
10857 * configure: Regenerated.
10859 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10861 * server.c (handle_qxfer): Preserve error message if -3 is
10863 (qxfer): Document the -3 return value.
10865 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10867 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10868 (linux_btrace_h): New variable.
10869 (linux-btrace.o): New rule.
10871 2013-03-08 Stan Shebs <stan@codesourcery.com>
10872 Hafiz Abid Qadeer <abidh@codesourcery.com>
10874 * tracepoint.c (trace_buffer_size): New global.
10875 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10876 (init_trace_buffer): Change to one-argument function. Allocate
10877 trace buffer memory.
10878 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10879 handle QTBuffer:size packet.
10880 (cmd_bigqtbuffer_size): New function.
10881 (initialize_tracepoint): Call init_trace_buffer with
10882 DEFAULT_TRACE_BUFFER_SIZE.
10883 * server.c (handle_query): Add QTBuffer:size in the
10886 2013-03-07 Yao Qi <yao@codesourcery.com>
10888 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10889 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10891 (cmd_qtsp): Adjust condition. Do post increment.
10892 Set cur_action and cur_step_action back to 0.
10894 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10897 * linux-low.c (linux_write_memory): Return early success if LEN is
10900 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10902 * configure.srv: Add x86_64-*-cygwin* as target.
10904 2013-02-28 Tom Tromey <tromey@redhat.com>
10906 * configure.ac: Invoke AC_SYS_LARGEFILE.
10907 * configure, config.in: Rebuild.
10909 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10911 * win32-low.c: Throughout, fix format strings and casts of
10912 printf-like functions to avoid type related warnings on all
10914 (get_child_debug_event): Print dwDebugEventCode as hex since
10915 that's how it's usually documented.
10917 2013-02-28 Yao Qi <yao@codesourcery.com>
10919 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10922 2013-02-27 Jiong Wang <jiwang@tilera.com>
10924 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10925 (reg-tilegx32.c): New rule.
10926 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10927 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10928 different register info initializer according to elf class.
10929 (init_registers_tilgx32): New function. The tilegx32 register info
10931 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10932 (tile_store_gregset): Likewise.
10934 2013-02-27 Yao Qi <yao@codesourcery.com>
10936 * server.c (process_point_options): Print debug message when
10937 debug_threads is true.
10939 2013-02-26 Yao Qi <yao@codesourcery.com>
10941 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10943 2013-02-19 Pedro Alves <palves@redhat.com>
10944 Kai Tietz <ktietz@redhat.com>
10948 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10949 instead of strtoul to extract address from packet.
10950 (process_serial_event) <'z'>: Likewise.
10952 2013-02-18 Yao Qi <yao@codesourcery.com>
10954 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10956 2013-02-14 Pedro Alves <palves@redhat.com>
10960 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10961 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10963 2013-02-14 Pedro Alves <palves@redhat.com>
10965 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10967 2013-02-14 Pedro Alves <palves@redhat.com>
10969 * tracepoint.c (save_string): Delete.
10970 (add_tracepoint_action): Use savestring instead of save_string.
10972 2013-02-12 Pedro Alves <palves@redhat.com>
10974 * linux-xtensa-low.c: Ditto.
10975 * xtensa-xtregs.c: Ditto.
10977 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10979 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10982 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10984 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10985 aarch64_num_wp_regs and aarch64_num_bp_regs to
10986 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10988 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10990 * linux-aarch64-low.c (ps_get_thread_area): Replace
10991 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10993 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10994 Marcus Shawcroft <marcus.shawcroft@arm.com>
10995 Nigel Stephens <nigel.stephens@arm.com>
10996 Yufeng Zhang <yufeng.zhang@arm.com>
10998 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10999 (aarch64.c, aarch64-without-fpu.c): New targets.
11000 * configure.srv (aarch64*-*-linux*): New.
11001 * linux-aarch64-low.c: New file.
11003 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11005 * linux-low.c (handle_extended_wait, linux_create_inferior)
11006 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11007 (dequeue_one_deferred_signal, linux_resume_one_thread)
11008 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11009 (linux_tracefork_grandchild, linux_test_for_tracefork)
11010 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11011 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11012 where the argument is 0.
11014 2013-01-25 Yao Qi <yao@codesourcery.com>
11016 * event-loop.c: Include "queue.h".
11017 (gdb_event_p): New typedef.
11018 (struct gdb_event) <next_event>: Remove.
11019 (event_queue): Change to QUEUE(gdb_event_p).
11020 (async_queue_event): Remove.
11021 (gdb_event_xfree): New.
11022 (initialize_event_loop): New.
11023 (process_event): Use API from QUEUE.
11024 (wait_for_event): Likewise.
11025 * server.c (main): Call initialize_event_loop.
11026 * server.h (initialize_event_loop): Declare.
11028 2013-01-18 Yao Qi <yao@codesourcery.com>
11030 * ax.h (struct eval_agent_expr_context): New.
11031 (gdb_eval_agent_expr): Update declaration.
11032 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11033 TFRAME. Add new argument CTX.
11034 * server.h (struct eval_agent_expr_context): Declare.
11035 (agent_mem_read, agent_tsv_read): Update declaration.
11036 (agent_mem_read_string): Likewise.
11037 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11038 (add_traceframe_block): Add new argument TPOINT.
11039 Increase TPOINT->traceframe_usage.
11040 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11041 eval_tracepoint_agent_expr.
11042 (condition_true_at_tracepoint): Likewise.
11043 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11044 (agent_mem_read_string, agent_tsv_read): Likewise.
11046 2013-01-16 Yao Qi <yao@codesourcery.com>
11048 * linux-low.c (linux_resume_one_lwp): Don't check
11049 'lwp->bp_reinsert != 0'.
11051 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11052 Pedro Alves <palves@redhat.com>
11054 * lynx-low.c (ptrace_request_to_str): Define a temporary
11055 macro and use it to simplify this function's implementation.
11057 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11059 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11062 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11064 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11066 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11068 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11070 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11072 * lynx-low.c (lynx_resume): Use the resume_info parameter
11073 to determine the ptid for the lynx_ptrace call, unless
11074 it is equal to minus_one_ptid, in which case we use the
11075 ptid of the current_inferior.
11076 (lynx_wait_1): After having received a thread create/exit
11077 event, resume the inferior's execution using the signaling
11078 thread's ptid, rather than the old ptid.
11080 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11082 * lynx-low.c (lynx_resume): Delete variable ret.
11084 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11086 * gdbreplay.c (gdbreplay_version): Update copyright year.
11087 * server.c (gdbserver_version): Likewise.
11089 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11091 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11094 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11096 * lynx-low.c (ptrace_request_to_str): Add handling for
11097 PTRACE_GETTRACESIG.
11099 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11101 * lynx-low.c (lynx_attach): Delete variable new_process.
11103 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11105 * lynx-low.c (lynx_create_inferior): Delete variable
11108 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11110 * lynx-low.c (ptrace_request_to_str): Do not handle
11111 PTRACE_GETTHREADLIST if this macro does not exist.
11113 2012-12-15 Yao Qi <yao@codesourcery.com>
11115 * Makefile.in (OBS): Add notif.o.
11116 * notif.c, notif.h: New.
11117 * server.c: Include "notif.h".
11118 (struct vstop_notif) <next>: Remove.
11120 (queue_stop_reply): Update.
11121 (push_event, send_next_stop_reply): Remove.
11122 (discard_queued_stop_replies): Update.
11123 (notif_stop): New variable.
11124 (handle_v_stopped): Remove.
11125 (handle_v_requests): Don't call handle_v_stopped. Call
11126 handle_ack_notif instead.
11127 (queue_stop_reply_callback): Call notif_event_enque instead
11128 of queue_stop_reply.
11129 (handle_status): Don't call send_next_stop_reply, call
11130 notif_write_event instead.
11131 (kill_inferior_callback): Likewise.
11132 (detach_or_kill_inferior_callback): Likewise.
11133 (main): Call initialize_notif.
11134 (process_serial_event): Call QUEUE_is_empty.
11135 (handle_target_event): Call notif_push instead of push event.
11136 * server.h (push_event): Remove declaration.
11138 2012-12-10 Tom Tromey <tromey@redhat.com>
11140 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11141 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11144 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11145 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11146 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11147 (amd64-linux-ipa.o, ax.o): Rewrite.
11148 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11149 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11150 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11151 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11152 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11153 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11154 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11155 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11156 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11157 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11158 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11159 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11160 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11161 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11162 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11163 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11164 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11165 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11166 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11167 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11168 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11169 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11170 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11171 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11172 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11173 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11174 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11175 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11176 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11177 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11178 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11179 (reg-tilegx.o): Remove.
11180 (all_object_files): New macro.
11181 Include .deps files.
11182 * aclocal.m4, configure: Rebuild.
11183 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11184 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11185 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11187 2012-12-05 Tom Tromey <tromey@redhat.com>
11190 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11192 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11194 * configure.ac: Check for linux/perf_event.h.
11195 * config.in: Regenerated.
11196 * configure: Regenerated.
11198 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11200 * hostio.c (handle_readlink): Decrease buffer size
11201 parameter passed to readlink by one byte.
11203 2012-11-26 Yao Qi <yao@codesourcery.com>
11205 * configure.ac (build_warnings): Append '-Wempty-body'.
11206 * configure: Regenerated.
11207 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11210 2012-11-15 Pierre Muller <muller@sourceware.org>
11212 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11213 * config.in: Regenerate.
11214 * configure: Regenerate.
11215 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11216 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11217 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11218 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11220 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11221 instead of <sys/wait.h> header.
11222 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11224 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11226 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11227 (various make rules): Remove -DGDBSERVER
11229 2012-11-09 Yao Qi <yao@codesourcery.com>
11231 * spu-low.c (current_ptid): Move it to ..
11232 * gdbthread.h: ... here. New.
11233 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11234 * server.c (myresume, process_serial_event): Likewise.
11235 * thread-db.c (thread_db_find_new_threads): Likewise.
11236 * tracepoint.c (run_inferior_command): Likewise.
11238 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11240 * server.c (handle_search_memory_1): Include access length in
11243 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11245 * linux-crisv32-low.c: Fix compile errors.
11247 2012-09-04 Yao Qi <yao@codesourcery.com>
11249 * tracepoint.c (cmd_qtsv): Adjust debug message.
11250 Don't check CUR_TPOINT.
11252 2012-08-28 Yao Qi <yao@codesourcery.com>
11254 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11255 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11256 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11257 Remove declarations of xmalloc, xreallloc, xstrdup and
11259 * Makefile.in (libiberty_h): New.
11260 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11261 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11263 2012-08-23 Yao Qi <yao@codesourcery.com>
11265 * server.h: Remove declaration of 'xsnprintf'.
11267 2012-08-22 Keith Seitz <keiths@redhat.com>
11269 * server.h: Include build-gnulib-gbserver/config.h.
11270 * gdbreplay.c: Likewise.
11272 2012-08-08 Doug Evans <dje@google.com>
11274 * Makefile.in (SFILES): Add gdb_vecs.c.
11275 (OBS): Add gdb_vecs.o.
11276 (gdb_vecs_h, host_defs_h): New variables.
11277 (thread-db.o): Add $(gdb_vecs_h) dependency.
11278 (gdb_vecs.o): New rule.
11279 * thread-db.c: #include "gdb_vecs.h".
11280 (thread_db_load_search): Use a vector to iterate over path elements.
11281 Handle text appearing after "$pdir".
11283 * configure.ac: Add check for strstr.
11284 * config.in: Regenerate.
11285 * configure: Regenerate.
11287 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11289 * hostio.c (handle_pread): If pread fails, fall back to attempting
11291 (handle_pwrite): Likewise for pwrite.
11293 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11295 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11296 between unsupported TYPE and unimplementable ADDR/LEN combination.
11297 (arm_insert_point): Act on new return value.
11299 2012-07-31 Pedro Alves <palves@redhat.com>
11301 * server.c (process_point_options): Only skip tokens if we find
11302 one that is unrecognized. Don't treat 'X' specially while
11303 skipping unrecognized tokens.
11305 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11307 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11308 to 4-byte-align HW breakpoint addresses for Thumb.
11310 2012-07-27 Yao Qi <yao@codesourcery.com>
11314 * server.h: Declare gdb_agent_about_to_close.
11315 * target.c (kill_inferior): Include "agent.h".
11316 New. Send command 'kill'.
11317 * target.h (kill_inferior): Removed macro.
11318 * tracepoint.c (gdb_agent_about_to_close): New.
11319 (gdb_agent_helper_thread): Handle command 'close'.
11320 Wait endlessly until the inferior stops.
11321 Install gdb_agent_remove_socket to atexit hook.
11322 (agent_socket_name): New static variable.
11323 (gdb_agent_socket_init): Replace local variable 'name' with
11324 'agent_socket_name'.
11325 (gdb_agent_remove_socket): New.
11327 2012-07-27 Yao Qi <yao@codesourcery.com>
11329 * server.c (process_point_options): Stop at 'X' when parsing.
11331 2012-07-19 Michael Eager <eager@eagercon.com>
11333 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11335 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11336 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11337 hardware breakpoint.
11339 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11341 * gdbserver/linux-low.c (initialize_low): Call
11342 linux_ptrace_init_warnings.
11344 2012-07-02 Doug Evans <dje@google.com>
11346 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11349 2012-07-02 Stan Shebs <stan@codesourcery.com>
11351 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11352 (ax.o): Add it to build rule.
11354 (OBS): Add format.o.
11355 (IPA_OBS): Add format.o.
11356 * server.c (handle_query): Claim support for breakpoint commands.
11357 (process_point_options): Add command case.
11358 (process_serial_event): Leave running if there are printfs in
11360 * mem-break.h (any_persistent_commands): Declare.
11361 (add_breakpoint_commands): Declare.
11362 (gdb_no_commands_at_breakpoint): Declare.
11363 (run_breakpoint_commands): Declare.
11364 * mem-break.c (struct point_command_list): New struct.
11365 (struct breakpoint): New field command_list.
11366 (any_persistent_commands): New function.
11367 (add_commands_to_breakpoint): New function.
11368 (add_breakpoint_commands): New function.
11369 (gdb_no_commands_at_breakpoint): New function.
11370 (run_breakpoint_commands): New function.
11371 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11373 * ax.c: Include format.h.
11374 (ax_printf): New function.
11375 (gdb_eval_agent_expr): Add printf opcode.
11377 2012-06-13 Yao Qi <yao@codesourcery.com>
11379 * server.c (start_inferior): Remove duplicated writes to fields
11380 'last_resume_kind' and 'last_status' of 'current_inferior'.
11382 2012-06-12 Yao Qi <yao@codesourcery.com>
11383 Pedro Alves <palves@redhat.com>
11385 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11387 * server.c (handle_v_cont): Extend comment.
11389 2012-06-11 Yao Qi <yao@codesourcery.com>
11391 * linux-low.c (linux_attach): Add 'static'.
11393 2012-06-06 Yao Qi <yao@codesourcery.com>
11395 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11397 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11399 Fix gcc -flto compilation warning.
11400 * server.c (main): Make variable multi_mode and attach volatile.
11402 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11404 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11405 if the platform doesn't know about it.
11407 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11409 * Makefile.in (SFILES): Add linux-tile-low.c.
11410 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11411 * configure.srv: Handle tilegx-*-linux*.
11412 * linux-tile-low.c: New file.
11414 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11416 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11418 2012-05-24 Pedro Alves <palves@redhat.com>
11422 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11424 2012-05-24 Pedro Alves <palves@redhat.com>
11428 Replace target_signal with gdb_signal throughout.
11430 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11432 * linux-low.c (linux_store_registers): Avoid the copying sequence
11433 when no data has been retrieved by ptrace.
11435 2012-05-22 Will Deacon <will.deacon@arm.com>
11437 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11438 Include asm/ptrace.h.
11439 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11442 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11444 * linux-low.c (linux_store_registers): Don't re-retrieve data
11445 with ptrace that has already been obtained from /proc. Always
11446 copy any data retrieved with ptrace to the buffer supplied.
11448 2012-05-11 Yao Qi <yao@codesourcery.com>
11449 Pedro Alves <palves@redhat.com>
11451 * linux-low.c (enum stopping_threads_kind): New.
11452 (stopping_threads): Change type to `enum stopping_threads_kind'.
11453 (handle_extended_wait): If stopping and suspending threads, leave
11454 the new_lwp suspended too.
11455 (linux_wait_for_event): Adjust.
11456 (stop_all_lwps): Set `stopping_threads' to
11457 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11458 whether we're suspending threads or just stopping them. Assert no
11461 2012-04-29 Yao Qi <yao@codesourcery.com>
11463 * server.h: Move some code to ...
11464 * gdbthread.h: ... here. New.
11465 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11466 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11467 (nto-low.o, win32-low.o): Likewise.
11468 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11469 * regcache.c, remote-utils.c, server.c: Likewise.
11470 * target.c, tracepoint.c, win32-low.c: Likewise.
11472 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11474 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11475 (PTRACE_ARG4_TYPE): Likewise.
11476 (PTRACE_XFER_TYPE): Likewise.
11477 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11478 ptrace to PTRACE_ARG3_TYPE.
11479 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11480 (PTRACE_ARG4_TYPE): Likewise.
11481 (PTRACE_XFER_TYPE): Likewise.
11482 (linux_detach_one_lwp): Cast fourth argument of
11483 ptrace to long then PTRACE_ARG4_TYPE.
11484 (regsets_fetch_inferior_registers): Cast third argument of
11485 ptrace to long then PTRACE_ARG3_TYPE.
11486 (regsets_store_inferior_registers): Likewise.
11488 2012-04-20 Pedro Alves <palves@redhat.com>
11490 * configure: Regenerate.
11492 2012-04-19 Pedro Alves <palves@redhat.com>
11494 * Makefile.in (GNULIB_BUILDDIR): New.
11495 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11496 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11497 (all, install-only, uninstall, clean-info, all-lib, clean): No
11498 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11499 (maintainer-clean realclean distclean): Use subdir_do.
11501 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11502 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11503 * acinclude.m4: Include acx_configure_dir.m4.
11504 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11505 calls. Call AC_PROG_RANLIB. Configure gnulib using
11508 (GNULIB_STDINT_H): Adjust.
11509 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11510 * gdbreplay.c: Include build-gnulib/config.h.
11511 * server.h: Likewise.
11512 * aclocal.m4: Regenerate.
11513 * config.in: Regenerate.
11514 * configure: Regenerate.
11516 2012-04-19 Pedro Alves <palves@redhat.com>
11518 * Makefile.in (LIBGNU, INCGNU): Adjust.
11519 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11520 (all, install-only, uninstall, clean-info, all-lib, clean)
11521 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11522 * configure.ac: Adjust AC_OUTPUT output.
11523 * aclocal.m4: Regenerate.
11524 * configure: Regenerate.
11526 2012-04-19 Pedro Alves <palves@redhat.com>
11528 * Makefile.in (generated_files): New.
11529 (server_h): Remove the explicit dependency on config.h, and depend
11530 on $generated_files.
11532 2012-04-19 Pedro Alves <palves@redhat.com>
11534 * Makefile.in (INCGNU): Add -Ignulib.
11536 2012-04-19 Pedro Alves <palves@redhat.com>
11538 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11539 (INCGNU): ... this, and spell out -I here.
11540 (GNULIB_LIB): Rename to ...
11541 (LIBGNU): ... this.
11542 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11544 2012-04-19 Pedro Alves <palves@redhat.com>
11546 * config.in: Regenerate.
11548 2012-04-19 Pedro Alves <palves@redhat.com>
11550 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11551 * server.h (memmem): Remove declaration.
11552 * config.in: Regenerate.
11553 * configure: Regenerate.
11555 2012-04-19 Yao Qi <yao@codesourcery.com>
11557 * Makefile.in (SFILES): Add common/vec.c.
11561 2012-04-19 Yao Qi <yao@codesourcery.com>
11563 * remote-utils.c (prepare_resume_reply): Replace with macro
11564 target_core_of_thread.
11565 * server.c (handle_qxfer_threads_proper): Likewise.
11566 * target.h (traget_core_of_thread): New macro.
11568 2012-04-18 Pedro Alves <palves@redhat.com>
11570 * aclocal.m4: Regenerate.
11571 * configure: Regenerate.
11573 2012-04-16 Yao Qi <yao@codesourcery.com>
11575 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11576 duplicated on address.
11578 2012-04-16 Yao Qi <yao@codesourcery.com>
11580 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11581 (struct tracepoint_action_ops) <send>: New field.
11582 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11583 (agent_expr_send, x_tracepoint_action_send): New.
11584 (l_tracepoint_action_send): New.
11585 (cmd_qtdp): Download and install tracepoint
11586 according to `use_agent'.
11587 (run_inferior_command): Add one more parameter `len'.
11589 (tracepoint_send_agent): New.
11590 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11592 2012-04-16 Yao Qi <yao@codesourcery.com>
11594 * tracepoint.c (download_tracepoints): Moved to ...
11595 (cmd_qtstart): ... here.
11597 2012-04-14 Yao Qi <yao@codesourcery.com>
11599 * tracepoint.c: Include inttypes.h.
11600 (struct collect_memory_action): Use sized types.
11601 (struct tracepoint): Likewise.
11602 (cmd_qtdp, stop_tracing): Update print specifiers.
11603 (cmd_qtp, response_tracepoint): Likewise.
11604 (collect_data_at_tracepoint): Likewise.
11605 (collect_data_at_step): Likewise.
11607 2012-04-14 Yao Qi <yao@codesourcery.com>
11609 Import gnulib module inttypes.
11610 * aclocal.m4, config.in, configure: Regenerated.
11612 2012-04-14 Yao Qi <yao@codesourcery.com>
11614 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11615 Makefile and config.status at last.
11617 2012-04-13 Yao Qi <yao@codesourcery.com>
11619 * tracepoint.c: Include stdint.h unconditionally.
11621 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11623 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11624 on BFD_HAVE_SYS_PROCFS_TYPE.
11625 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11626 * configure: Regenerate.
11627 * config.in: Likewise.
11629 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11631 * Makefile.in (clean): Also remove x32.c x32-linux.c
11632 x32-avx.c x32-avx-linux.c.
11633 (x32.o): New target.
11635 (x32-linux.o): Likewise.
11636 (x32-linux.c): Likewise.
11637 (x32-avx.o): Likewise.
11638 (x32-avx.c): Likewise.
11639 (x32-avx-linux.o): Likewise.
11640 (x32-avx-linux.c): Likewise.
11642 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11643 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11644 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11645 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11646 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11647 i386/x32-avx-linux.xml.
11649 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11650 (init_registers_x32_avx_linux): Likwise.
11651 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11652 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11654 2012-04-13 Pedro Alves <palves@redhat.com>
11656 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11657 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11658 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11659 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11662 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11664 * linux-x86-low.c (compat_x32_clock_t): New.
11665 (compat_x32_siginfo_t): Likewise.
11666 (compat_x32_siginfo_from_siginfo): Likewise.
11667 (siginfo_from_compat_x32_siginfo): Likewise.
11668 (linux_is_elf64): Likewise.
11669 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11670 and siginfo_from_compat_x32_siginfo for x32.
11671 (x86_arch_setup): Set linux_is_elf64.
11673 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11676 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11678 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11679 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11680 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11681 compatible with process.
11683 2012-04-12 Yao Qi <yao@codesourcery.com>
11685 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11686 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11687 (install-only, install-info, clean): Handle sub dir gnulib.
11688 (all-lib, am--refresh): New targets.
11689 (memmem.o): Remove target.
11690 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11691 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11692 (AC_REPLACE_FUNCS): Remove memmem.
11693 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11694 (AC_OUTPUT): Generate Makefile in gnulib/.
11695 * aclocal.m4, config.in, configure: Regenerated.
11697 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11699 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11701 2012-04-05 Pedro Alves <palves@redhat.com>
11703 -Werror=strict-aliasing
11705 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11708 2012-04-04 Pedro Alves <palves@redhat.com>
11710 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11711 (sparc_store_gregset_from_stack, sparc_store_gregset)
11712 (sparc_breakpoint_at): Fix formatting.
11714 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11716 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11718 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11719 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11720 * config.in: Regenerate.
11721 * configure: Likewise.
11723 2012-03-29 Pedro Alves <palves@redhat.com>
11725 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11726 Correct ptrace arguments.
11728 2012-03-28 Pedro Alves <palves@redhat.com>
11730 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11731 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11732 (IA64_FR1_REGNUM): New defines.
11733 (ia64_fetch_register): New.
11734 (the_low_target): Install it.
11735 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11737 * linux-low.c (linux_fetch_registers): Try the
11738 the_low_target.fetch_register hook first.
11740 * linux-arm-low.c (the_low_target): Adjust.
11741 * linux-bfin-low.c (the_low_target): Adjust.
11742 * linux-cris-low.c (the_low_target): Adjust.
11743 * linux-crisv32-low.c (the_low_target): Adjust.
11744 * linux-m32r-low.c (the_low_target): Adjust.
11745 * linux-m68k-low.c (the_low_target): Adjust.
11746 * linux-mips-low.c (the_low_target): Adjust.
11747 * linux-ppc-low.c (the_low_target): Adjust.
11748 * linux-s390-low.c (the_low_target): Adjust.
11749 * linux-sh-low.c (the_low_target): Adjust.
11750 * linux-sparc-low.c (the_low_target): Adjust.
11751 * linux-tic6x-low.c (the_low_target): Adjust.
11752 * linux-x86-low.c (the_low_target): Adjust.
11753 * linux-xtensa-low.c (the_low_target): Adjust.
11755 2012-03-26 Pedro Alves <palves@redhat.com>
11757 * server.c (handle_qxfer_libraries): Don't bail early if
11758 the_target->qxfer_libraries_svr4 is not NULL.
11760 2012-03-26 Pedro Alves <palves@redhat.com>
11762 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11764 2012-03-23 Pedro Alves <palves@redhat.com>
11766 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11767 "library-list-svr4" element's start tag when the the DSO list is
11770 2012-03-23 Pedro Alves <palves@redhat.com>
11772 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11773 a variable whose type size is the same as the inferior's pointer
11776 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11778 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11780 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11781 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11782 * linux-low.h: Include <signal.h>.
11783 (struct siginfo): Remove forward declaration.
11784 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11787 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11789 * .gitignore: Ignore more files.
11791 2012-03-19 Pedro Alves <palves@redhat.com>
11792 Jan Kratochvil <jan.kratochvil@redhat.com>
11794 * server.c (cont_thread, general_thread): Add describing comments.
11795 (start_inferior): Clear `cont_thread'.
11796 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11799 2012-03-15 Yao Qi <yao@codesourcery.com>
11801 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11803 (cmd_qtdp): ... here.
11805 2012-03-15 Yao Qi <yao@codesourcery.com>
11807 * tracepoint.c (struct tracepoint_action_ops): New.
11808 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11809 (m_tracepoint_action_download): New.
11810 (r_tracepoint_action_download): New.
11811 (x_tracepoint_action_download): New.
11812 (l_tracepoint_action_download): New.
11813 (add_tracepoint_action): Install `action->ops' according type.
11814 (download_tracepoint_1): Move code `download' function pointer
11815 of various tracepoint_action_ops.
11817 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11819 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11820 linux_ptrace_attach_warnings.
11822 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11824 * Makefile.in (linux-ptrace.o): New.
11825 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11826 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11827 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11828 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11829 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11831 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11833 2012-03-08 Yao Qi <yao@codesourcery.com>
11834 Pedro Alves <palves@redhat.com>
11836 Fix PR server/13392.
11837 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11838 offset of JMP insn.
11839 * tracepoint.c (remove_tracepoint): New.
11840 (cmd_qtdp): Call remove_tracepoint when failed to install.
11842 2012-03-07 Pedro Alves <palves@redhat.com>
11844 * linux-low.c (get_detach_signal): New.
11845 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11846 Pass on pending signals to PTRACE_DETACH. Check the result of the
11848 * server.c (program_signals, program_signals_p): New.
11849 (handle_general_set): Handle QProgramSignals.
11850 * server.h (program_signals, program_signals_p): Declare.
11852 2012-03-05 Pedro Alves <palves@redhat.com>
11853 Jan Kratochvil <jan.kratochvil@redhat.com>
11855 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11858 2012-03-03 Yao Qi <yao@codesourcery.com>
11860 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11861 agent_look_up_symbols.
11863 2012-03-03 Yao Qi <yao@codesourcery.com>
11865 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11866 (linux-x86-low.o): Likewise.
11867 * server.h: Remove in_process_agent_loaded.
11868 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11872 2012-03-03 Yao Qi <yao@codesourcery.com>
11874 * tracepoint.c (gdb_agent_capability): New global.
11875 (in_process_agent_loaded_ust): Renamed to
11876 `in_process_agent_supports_ust'.
11878 (in_process_agent_supports_ust): Call agent_capability_check.
11879 (clear_installed_tracepoints): Assert that agent supports
11882 2012-03-03 Yao Qi <yao@codesourcery.com>
11884 * linux-low.c (linux_supports_agent): New.
11885 (linux_target_ops): Initialize field `supports_agent' with
11886 linux_supports_agent.
11887 * target.h (struct target_ops) <supports_agent>: New.
11888 (target_supports_agent): New macro.
11889 * server.c (handle_general_set): Handle packet 'QAgent'.
11890 (handle_query): Send `QAgent+'.
11891 * Makefile.in (server.o): Depends on agent.h.
11893 2012-03-03 Yao Qi <yao@codesourcery.com>
11895 * Makefile.in (OBS): Add agent.o.
11896 Add new rule for agent.o.
11897 Track dependence of tracepoint.c on agent.h.
11898 * tracepoint.c (run_inferior_command_1):
11899 (run_inferior_command): Call agent_run_command.
11900 (gdb_ust_connect_sync_socket): Deleted. Move it to
11902 (resume_thread, stop_thread): Likewise.
11903 (gdb_ust_socket_init): Renamed to ...
11904 (gdb_agent_socket_init): ... New.
11905 (gdb_ust_thread): Renamed to ...
11906 (gdb_agent_helper_thread): ... New.
11907 (gdb_ust_init): Move some code to ...
11908 (gdb_agent_init): ... here. New.
11909 [HAVE_UST]: Call gdb_ust_init.
11910 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11911 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11912 * config.in, configure: Regenerated.
11914 2012-03-02 Pedro Alves <palves@redhat.com>
11916 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11917 * linux-low.c (struct simple_pid_list): New.
11918 (stopped_pids): New a struct simple_pid_list pointer.
11919 (add_to_pid_list, pull_pid_from_list): New.
11920 (handle_extended_wait): Don't assume the first signal new children
11921 report is SIGSTOP. Adjust call to pull_pid_from_list.
11922 (linux_wait_for_lwp): Adjust.
11924 2012-03-02 Yao Qi <yao@codesourcery.com>
11926 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11929 2012-03-02 Yao Qi <yao@codesourcery.com>
11931 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11932 `stop_pc' and `tpoint'. Update caller.
11934 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11936 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11937 * linux-low.c (use_linux_regsets): New macro.
11938 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11939 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11940 (linux_register_in_regsets): New function.
11941 (usr_fetch_inferior_registers): Skip registers covered by
11943 (usr_store_inferior_registers): Likewise.
11944 (usr_fetch_inferior_registers): New macro.
11945 (usr_store_inferior_registers): Likewise.
11946 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11947 (linux_store_registers): Likewise.
11948 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11950 (init_registers_mips64_dsp_linux): Likewise.
11951 (init_registers_mips_linux): New macro.
11952 (init_registers_mips_dsp_linux): Likewise.
11953 (mips_dsp_num_regs): Likewise.
11954 (DSP_BASE, DSP_CONTROL): New fallback macros.
11955 (mips_base_regs): New macro.
11956 (mips_regmap): Use it. Fix the size.
11957 (mips_dsp_regmap): New variable.
11958 (mips_dsp_regset_bitmap): Likewise.
11959 (mips_arch_setup): New function.
11960 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11962 (mips_cannot_store_register): Likewise.
11963 (the_low_target): Update .arch_setup, .num_regs and .regmap
11964 initializers. Add .regset_bitmap initializer.
11965 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11967 * linux-bfin-low.c (the_low_target): Likewise.
11968 * linux-cris-low.c (the_low_target): Likewise.
11969 * linux-crisv32-low.c (the_low_target): Likewise.
11970 * linux-ia64-low.c (the_low_target): Likewise.
11971 * linux-m32r-low.c (the_low_target): Likewise.
11972 * linux-m68k-low.c (the_low_target): Likewise.
11973 * linux-ppc-low.c (the_low_target): Likewise.
11974 * linux-s390-low.c (the_low_target): Likewise.
11975 * linux-sh-low.c (the_low_target): Likewise.
11976 * linux-sparc-low.c (the_low_target): Likewise.
11977 * linux-tic6x-low.c (the_low_target): Likewise.
11978 * linux-x86-low.c (the_low_target): Likewise.
11979 * linux-xtensa-low.c (the_low_target): Likewise.
11980 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11981 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11982 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11984 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11985 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11987 2012-02-29 Yao Qi <yao@codesourcery.com>
11988 Pedro Alves <palves@redhat.com>
11990 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11991 `step_over_finished' is true.
11993 2012-02-27 Pedro Alves <palves@redhat.com>
11995 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11996 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11998 2012-02-27 Pedro Alves <palves@redhat.com>
12001 * linux-low.c (pid_is_stopped): New.
12002 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12004 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12006 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12009 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12011 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12013 2012-02-24 Luis Machado <lgustavo@codesourcery>
12015 * server.c (handle_query): Advertise support for target-side
12016 breakpoint condition evaluation.
12017 (process_point_options): New function.
12018 (process_serial_event): When inserting a breakpoint, check for
12019 a target-side condition that should be evaluated.
12021 * mem-break.c: Include regcache.h and ax.h.
12022 (point_cond_list_t): New data structure.
12023 (breakpoint) <cond_list>: New field.
12024 (find_gdb_breakpoint_at): Make non-static.
12025 (delete_gdb_breakpoint_at): Clear any target-side
12027 (clear_gdb_breakpoint_conditions): New function.
12028 (add_condition_to_breakpoint): Likewise.
12029 (add_breakpoint_condition): Likewise.
12030 (gdb_condition_true_at_breakpoint): Likewise.
12031 (gdb_breakpoint_here): Return result directly instead
12032 of going through a local variable.
12034 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12035 (clear_gdb_breakpoint_conditions): Likewise.
12036 (add_breakpoint_condition): Likewise.
12037 (gdb_condition_true_at_breakpoint): Likewise.
12039 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12040 (need_step_over_p): Take target-side breakpoint condition into
12043 2012-02-24 Luis Machado <lgustavo@codesourcery>
12045 * server.h: Include tracepoint.h.
12046 (agent_mem_read, agent_get_trace_state_variable_value,
12047 agent_set_trace_state_variable_value,
12048 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12049 get_set_tsv_func_addr): New prototypes.
12051 * ax.h: New include file.
12052 * ax.c: New source file.
12054 * tracepoint.c: Include ax.h.
12055 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12056 agent_expr, eval_result_type): Move to ax.h.
12057 (parse_agent_expr): Rename to ...
12058 (gdb_parse_agent_expr): ... this, make it non-static and move
12060 (unparse_agent_expr) Rename to ...
12061 (gdb_unparse_agent_expr): ... this, make it non-static and move
12063 (eval_agent_expr): Rename to ...
12064 (eval_tracepoint_agent_expr): ... this.
12065 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12066 forward declarations.
12067 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12068 (agent_get_trace_state_variable_value): New function.
12069 (agent_set_trace_state_variable_value): New function.
12070 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12071 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12072 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12073 (condition_true_at_tracepoint): Likewise.
12074 (parse_agent_expr): Rename to ...
12075 (gdb_parse_agent_expr): ... this and move to ax.c.
12076 (unparse_agent_expr): Rename to ...
12077 (gdb_unparse_agent_expr): ... this and move to ax.c.
12078 (gdb_agent_op_name): Move to ax.c.
12079 (eval_agent_expr): Rename to ...
12080 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12082 (eval_tracepoint_agent_expr): New function.
12083 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12085 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12087 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12088 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12089 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12090 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12091 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12092 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12093 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12094 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12095 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12096 (compile_bytecodes): Remove forward declaration.
12097 (is_goto_target): Move to ax.c.
12098 (compile_bytecodes): Move to ax.c and call
12099 agent_get_trace_state_variable_value (...) and
12100 agent_set_trace_state_variable_value (...).
12102 * Makefile.in: Update ax.c and IPA dependencies.
12104 2012-02-24 Pedro Alves <palves@redhat.com>
12106 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12107 (cmd_bigqtbuffer_circular): ... this. Only handle
12108 'QTBuffer:circular:'.
12109 (handle_tracepoint_general_set): Adjust.
12111 2012-02-16 Yao Qi <yao@codesourcery.com>
12113 * inferiors.c: Move code to ...
12114 * dll.c: .... here. New.
12115 * server.h: Declare clear_dlls.
12116 * Makefile.in (SFILES): Add dll.c.
12120 2012-02-11 Yao Qi <yao@codesourcery.com>
12122 * server.c: (handle_monitor_command): Add a new parameter
12124 (handle_query): Update caller.
12126 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12128 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12129 * configure, config.in: Regenerate.
12130 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12133 2012-02-02 Pedro Alves <palves@redhat.com>
12135 Try SIGKILL first, then PTRACE_KILL.
12136 * linux-low.c (linux_kill_one_lwp): New.
12137 (linux_kill_one_lwp): Rename to ...
12138 (kill_one_lwp_callback): ... this. Use the new
12139 linux_kill_one_lwp.
12141 2012-02-02 Pedro Alves <palves@redhat.com>
12143 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12146 2012-01-27 Pedro Alves <palves@redhat.com>
12148 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12149 (elf_64_file_p): Make static.
12150 (linux_pid_exe_is_elf_64_file): New.
12151 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12152 Delete declarations.
12153 (linux_pid_exe_is_elf_64_file): Declare.
12154 * linux-x86-low.c (x86_arch_setup): Use
12155 linux_pid_exe_is_elf_64_file.
12157 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12159 * linux-low.c (linux_wait_for_event_1): Rename to ...
12160 (linux_wait_for_event): ... here and merge it with former
12161 linux_wait_for_event - new variable wait_ptid, use it.
12162 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12164 2012-01-23 Pedro Alves <palves@redhat.com>
12166 * server.c (main): Avoid yet another case of infinite loop while
12167 detaching/killing after a longjmp.
12169 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12172 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12174 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12176 * hostio.c (handle_readlink): New function.
12177 (handle_vFile): Call it to handle "vFile:readlink" packets.
12179 2012-01-20 Pedro Alves <palves@redhat.com>
12180 Ulrich Weigand <ulrich.weigand@linaro.org>
12182 * server.c (handle_v_requests): Only support vAttach and vRun to
12183 start multiple processes when in extended protocol mode.
12185 2012-01-17 Pedro Alves <palves@redhat.com>
12187 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12188 memalign plus mprotect to allocate the scratch buffer.
12190 2012-01-13 Pedro Alves <palves@redhat.com>
12192 * server.c (attach_inferior): Clear `cont_thread'.
12194 2012-01-13 Pedro Alves <palves@redhat.com>
12196 * server.c (main): Avoid infinite loop while detaching/killing
12199 2012-01-09 Doug Evans <dje@google.com>
12201 * server.c (start_inferior): Set last_ptid in --wrapper case.
12203 2012-01-06 Yao Qi <yao@codesourcery.com>
12205 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12207 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12209 2012-01-04 Yao Qi <yao@codesourcery.com>
12211 * tracepoint.c (cmd_qtdp): Print debug message
12212 for static tracepoint.
12214 2012-01-04 Yao Qi <yao@codesourcery.com>
12216 * tracepoint.c (trace_vdebug): Differentiate debug message
12217 between gdbserver and IPA.
12219 2012-01-03 Yao Qi <yao@codesourcery.com>
12221 * tracepoint.c (tracepoint_was_hit): Don't collect for
12224 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12226 * terminal.h: Reformat copyright header.
12228 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12230 * server.c (gdbserver_version): Update copyright year.
12231 * gdbreplay.c (gdbreplay_version): Likewise.
12233 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12235 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12238 2011-12-18 Hui Zhu <teawater@gmail.com>
12239 * linux-low.c (linux_create_inferior): Save return value to ret.
12241 2011-12-18 Hui Zhu <teawater@gmail.com>
12243 * linux-low.c (linux_create_inferior): Save return value to ret.
12245 2011-12-16 Doug Evans <dje@google.com>
12247 * linux-low.c (linux_create_inferior): If stdio connection,
12248 redirect stdin from /dev/null, stdout to stderr.
12249 * remote-utils.c (remote_is_stdio): New static global.
12250 (remote_connection_is_stdio): New function.
12251 (remote_prepare): Handle stdio connection.
12252 (remote_open): Ditto.
12253 (remote_close): Don't close stdin for stdio connections.
12254 (read_prim,write_prim): New functions. Replace all calls to
12255 read/write to these.
12256 * server.c (main): Watch for "-" argument. Move call to
12257 remote_prepare before start_inferior.
12258 * server.h (STDIO_CONNECTION_NAME): New macro.
12259 (remote_connection_is_stdio): Declare.
12261 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12262 in debugging output.
12264 2011-12-15 Yao Qi <yao@codesourcery.com>
12266 * tracepoint.c: Include sys/syscall.h.
12267 (gdb_ust_thread): Remove preprocessor conditional.
12269 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12271 * linux-low.c (linux_detach_one_lwp): Call
12272 the_low_target.prepare_to_resume before detaching.
12274 2011-12-14 Yao Qi <yao@codesourcery.com>
12276 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12279 2011-12-14 Yao Qi <yao@codesourcery.com>
12281 * i386-low.c (i386_low_stopped_data_address): Initialize local
12282 variable `control'.
12284 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12288 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12289 DR_CONTROL unless necessary. Extend comments.
12290 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12291 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12293 2011-12-13 Yao Qi <yao@codesourcery.com>
12295 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12297 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12299 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12301 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12302 Print new debug message for such case.
12304 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12306 Fix overlapping memcpy.
12307 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12308 the read_inferior_memory transfer.
12309 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12310 write_inferior_memory transfer.
12311 (set_fast_tracepoint_jump): New variable buf. Use it for the
12312 read_inferior_memory and write_inferior_memory transfers.
12313 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12314 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12315 Use it for the write_inferior_memory transfer.
12316 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12319 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12321 * linux-low.c (fetch_register, store_register): Make code
12322 consistent, fix formatting.
12324 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12326 * linux-low.c (usr_store_inferior_registers): Factor out code
12327 to handle individual registers into...
12328 (store_register): ... this new function.
12330 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12332 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12333 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12334 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12335 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12336 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12337 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12338 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12339 (srv_xmlfiles): Add new XML files.
12341 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12343 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12344 (init_registers_s390_linux32v1): Add prototype.
12345 (init_registers_s390_linux32v2): Likewise.
12346 (init_registers_s390_linux64v1): Likewise.
12347 (init_registers_s390_linux64v2): Likewise.
12348 (init_registers_s390x_linux64v1): Likewise.
12349 (init_registers_s390x_linux64v2): Likewise.
12350 (s390_num_regs): Increment to 52.
12351 (s390_regmap): Add orig_r2 register.
12352 (s390_num_regs_3264): Increment to 68.
12353 (s390_regmap_3264): Add orig_r2 register.
12354 (s390_collect_ptrace_register): Handle orig_r2 register.
12355 (s390_supply_ptrace_register): Likewise.
12356 (s390_fill_last_break): New function.
12357 (s390_store_last_break): Likewise.
12358 (s390_fill_system_call): New function.
12359 (s390_store_system_call): Likewise.
12360 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12362 (s390_check_regset): New function.
12363 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12364 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12365 Update target_regsets for available register sets.
12367 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12368 Jan Kratochvil <jan.kratochvil@redhat.com>
12370 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12371 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12373 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12374 * linux-low.h (struct process_info_private): New member r_debug.
12375 * server.c (handle_qxfer_libraries): Call
12376 the_target->qxfer_libraries_svr4.
12377 (handle_qxfer_libraries_svr4): New function.
12378 (qxfer_packets): New entry "libraries-svr4".
12379 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12380 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12381 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12382 PACKET_qXfer_libraries_svr4.
12384 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12386 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12387 PSW address/mask between 8-byte and 16-byte formats.
12388 (s390_supply_ptrace_register): Likewise.
12389 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12390 basic addressing mode bit.
12392 2011-11-24 Stan Shebs <stan@codesourcery.com>
12394 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12396 2011-11-17 Stan Shebs <stan@codesourcery.com>
12398 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12399 (tracing_start_time): New global.
12400 (tracing_stop_time): New global.
12401 (tracing_user_name): New global.
12402 (tracing_notes): New global.
12403 (tracing_stop_note): New global.
12404 (cmd_qtstart): Set traceframe_usage, start_time.
12405 (stop_tracing): Set stop_time.
12406 (cmd_qtstatus): Report additional status.
12407 (cmd_qtp): New function.
12408 (handle_tracepoint_query): Call it.
12409 (cmd_qtnotes): New function.
12410 (handle_tracepoint_general_set): Call it.
12411 (get_timestamp): Rename from tsv_get_timestamp.
12413 2011-11-14 Stan Shebs <stan@codesourcery.com>
12414 Kwok Cheung Yeung <kcy@codesourcery.com>
12416 * linux-x86-low.c (small_jump_insn): New.
12417 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12418 trampoline and error message, build a trampoline and issue a small
12419 jump instruction to it.
12420 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12421 trampoline and error message.
12422 (x86_get_min_fast_tracepoint_insn_len): New.
12423 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12424 * linux-low.h (struct linux_target_ops): Add arguments to
12425 install_fast_tracepoint_jump_pad operation, add new operation.
12426 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12428 (linux_get_min_fast_tracepoint_insn_len): New function.
12429 (linux_target_op): Add new operation.
12430 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12431 (gdb_trampoline_buffer_end): Ditto.
12432 (gdb_trampoline_buffer_error): Ditto.
12433 (struct ipa_sym_addresses): Add fields for new IPA variables.
12434 (symbol_list): Add entries for new IPA variables.
12435 (struct tracepoint): Add fields to hold the address range of the
12436 trampoline used by the tracepoint.
12437 (trampoline_buffer_head): New static variable.
12438 (trampoline_buffer_tail): Ditto.
12439 (claim_trampoline_space): New function.
12440 (have_fast_tracepoint_trampoline_buffer): New function.
12441 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12443 (install_fast_tracepoint): Ditto, also add error buffer argument.
12444 (cmd_qtminftpilen): New function.
12445 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12446 (fast_tracepoint_from_trampoline_address): New function.
12447 (fast_tracepoint_collecting): Handle trampoline as part of jump
12449 (set_trampoline_buffer_space): New function.
12450 (initialize_tracepoint): Initialize new IPA variables.
12451 * target.h (struct target_ops): Add arguments to
12452 install_fast_tracepoint_jump_pad operation, add new
12453 get_min_fast_tracepoint_insn_len operation.
12454 (target_get_min_fast_tracepoint_insn_len): New.
12455 (install_fast_tracepoint_jump_pad): Add arguments.
12456 * server.h (IPA_BUFSIZ): Define.
12457 * linux-i386-ipa.c: Include extra header files.
12458 (initialize_fast_tracepoint_trampoline_buffer): New function.
12459 (initialize_low_tracepoint): Call it.
12460 * server.h (set_trampoline_buffer_space): Declare.
12461 (claim_trampoline_space): Ditto.
12462 (have_fast_tracepoint_trampoline_buffer): Ditto.
12464 2011-11-14 Yao Qi <yao@codesourcery.com>
12466 * server.c (handle_query): Handle InstallInTrace for qSupported.
12467 * tracepoint.c (add_tracepoint): Sort list.
12468 (install_tracepoint, download_tracepoint): New.
12469 (cmd_qtdp): Call them to install and download tracepoints.
12470 (sort_tracepoints): Removed.
12471 (cmd_qtstart): Update.
12473 2011-11-14 Yao Qi <yao@codesourcery.com>
12475 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12476 * mem-break.h: Declare.
12477 * tracepoint.c (cmd_qtstart): Move some code to ...
12478 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12480 (download_tracepoints): Move some code to ...
12481 (download_tracepoint_1): ... here. New.
12483 2011-11-08 Yao Qi <yao@codesourcery.com>
12485 * remote-utils.c (relocate_instruction): A comment fix.
12487 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12489 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12490 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12491 dr_status_mirror and dr_control_mirror from debug_reg_state.
12492 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12493 (i386_initial_stuff): Remove use of deleted globals.
12494 (i386_get_thread_context, i386_set_thread_context,
12495 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12496 from debug_reg_state.
12498 2011-11-05 Yao Qi <yao@codesourcery.com>
12500 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12501 address as TPOINT's.
12503 2011-11-02 Stan Shebs <stan@codesourcery.com>
12505 * tracepoint.c (agent_mem_read_string): New function.
12506 (eval_agent_expr): Call it for tracenz.
12507 * server.c (handle_query): Report support for tracenz.
12509 2011-11-02 Yao Qi <yao@codesourcery.com>
12511 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12513 2011-11-02 Yao Qi <yao@codesourcery.com>
12515 * target.h: Fix a typo in comment.
12517 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12519 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12520 clobber the breakpoints' shadows with fast tracepoint jumps.
12521 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12522 * target.c (write_inferior_memory): Also pass MYADDR down to
12525 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12527 * configure.ac: Check support for personality routine.
12528 * configure: Regenerate.
12529 * config.in: Likewise.
12530 * linux-low.c: Include <sys/personality.h>.
12531 Define ADDR_NO_RANDOMIZE if necessary.
12532 (linux_create_inferior): Disable address space randomization when
12533 forking inferior, if requested.
12534 (linux_supports_disable_randomization): New function.
12535 (linux_target_ops): Install it.
12536 * server.h (disable_randomization): Declare.
12537 * server.c (disable_randomization): New global variable.
12538 (handle_general_set): Handle QDisableRandomization.
12539 (handle_query): Likewise for qSupported.
12540 (main): Support --disable-randomization and --no-disable-randomization
12541 command line arguments.
12542 * target.h (struct target_ops): Add supports_disable_randomization.
12543 (target_supports_disable_randomization): New macro.
12545 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12547 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12549 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12550 [!PT_GETDSBT] (target_loadmap): New definition.
12551 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12552 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12553 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12554 and PT_GETDSBT to LINUX_LOADMAP.
12555 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12556 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12558 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12560 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12561 (arm_linux_hwbp_cap): New static variable.
12562 (arm_linux_get_hwbp_cap): Replace by ...
12563 (arm_linux_init_hwbp_cap): ... this new function.
12564 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12565 (arm_linux_get_hw_watchpoint_count): Likewise.
12566 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12567 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12568 (arm_prepare_to_resume): Use perror_with_name instead of error.
12570 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12572 * linux-arm-low.c: Include <signal.h>.
12573 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12574 (struct arm_linux_hwbp_cap): New data type.
12575 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12576 (struct arm_linux_hw_breakpoint): New data type.
12577 (MAX_BPTS, MAX_WPTS): Define.
12578 (struct arch_process_info, struct arch_lwp_info): New data types.
12579 (arm_linux_get_hwbp_cap): New function.
12580 (arm_linux_get_hw_breakpoint_count): Likewise.
12581 (arm_linux_get_hw_watchpoint_count): Likewise.
12582 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12583 (arm_hwbp_control_initialize): Likewise.
12584 (arm_hwbp_control_is_enabled): Likewise.
12585 (arm_hwbp_control_is_initialized): Likewise.
12586 (arm_hwbp_control_disable): Likewise.
12587 (arm_linux_hw_breakpoint_equal): Likewise.
12588 (arm_linux_hw_point_initialize): Likewise.
12589 (struct update_registers_data): New data structure.
12590 (update_registers_callback: New function.
12591 (arm_insert_point): Likewise.
12592 (arm_remove_point): Likewise.
12593 (arm_stopped_by_watchpoint): Likewise.
12594 (arm_stopped_data_address): Likewise.
12595 (arm_new_process): Likewise.
12596 (arm_new_thread): Likewise.
12597 (arm_prepare_to_resume): Likewise.
12598 (the_low_target): Register arm_insert_point, arm_remove_point,
12599 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12600 arm_new_thread, and arm_prepare_to_resume.
12602 2011-09-15 Stan Shebs <stan@codesourcery.com>
12604 * server.h (struct emit_ops): Add compare-goto fields.
12605 * tracepoint.c (gdb_agent_op_sizes): New table.
12606 (emit_eq_goto): New function.
12607 (emit_ne_goto): New function.
12608 (emit_lt_goto): New function.
12609 (emit_le_goto): New function.
12610 (emit_gt_goto): New function.
12611 (emit_ge_goto): New function.
12612 (is_goto_target): New function.
12613 (compile_bytecodes): Recognize special cases of compare-goto
12614 combinations and call specialized emitters for them.
12615 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12616 (amd64_emit_ne_goto): New function.
12617 (amd64_emit_lt_goto): New function.
12618 (amd64_emit_le_goto): New function.
12619 (amd64_emit_gt_goto): New function.
12620 (amd64_emit_ge_goto): New function.
12621 (amd64_emit_ops): Add the new functions.
12622 (i386_emit_eq_goto): New function.
12623 (i386_emit_ne_goto): New function.
12624 (i386_emit_lt_goto): New function.
12625 (i386_emit_le_goto): New function.
12626 (i386_emit_gt_goto): New function.
12627 (i386_emit_ge_goto): New function.
12628 (i386_emit_ops): Add the new functions.
12630 2011-09-08 Stan Shebs <stan@codesourcery.com>
12632 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12633 (i386_emit_epilogue): Restore %ebx.
12635 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12637 * server.c (step_thread): Remove definition.
12638 (process_serial_event): Don't handle Hs.
12639 * server.h (step_thread): Remove declaration.
12640 * target.c (set_desired_inferior): Remove use of step_thread.
12642 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12644 * linux-low.c: Include linux-procfs.h.
12645 (linux_attach_lwp_1): Update comments.
12646 (linux_attach): Scan for existing threads when attaching to a
12647 process that is the tgid.
12648 * Makefile.in: Update dependencies.
12650 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12652 * configure.srv: Add linux-procfs.o dependencies.
12654 2011-08-14 Yao Qi <yao@codesourcery.com>
12656 * target.h (struct target_ops): Fix indent.
12657 * win32-low.c (win32_target_ops): Fix comment.
12659 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12660 Yao Qi <yao@codesourcery.com>
12662 * Makefile.in (clean): Remove tic6x-*.c files.
12663 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12664 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12665 (tic6x-c64xp-linux.c): Likewise.
12666 * configure.srv: Add support for tic6x-*-uclinux.
12667 * linux-tic6x-low.c: New.
12668 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12670 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12671 Yao Qi <yao@codesourcery.com>
12673 * target.h (struct target_ops): Add read_loadmap.
12674 * linux-low.c (struct target_loadseg): New type.
12675 (struct target_loadmap): New type.
12676 (linux_read_loadmap): New function.
12677 (linux_target_ops): Add linux_read_loadmap.
12678 * server.c (handle_query): Support qXfer:fdpic:read packet.
12679 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12682 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12684 * win32-low.c: Include <stdint.h>.
12686 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12688 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12689 to the inferior here.
12690 (i386_remove_aligned_watchpoint): Ditto.
12691 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12692 fit part of the watchpoint in the debug registers.
12693 (i386_update_inferior_debug_regs): New.
12694 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12695 registers, and only update the inferior on success.
12696 (i386_low_remove_watchpoint): Ditto.
12698 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12700 * linux-low.c (compare_ints, unique, list_threads, show_process,
12701 linux_core_of_thread): Delete.
12702 (linux_target_ops): Change linux_core_of_thread to
12703 linux_common_core_of_thread.
12704 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12705 * utils.c (malloc_failure): Change type of argument.
12706 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12707 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12708 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12709 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12710 (IPA_OBJS): Add common-utils-ipa.o.
12711 (ptid_h, linux_osdata_h): New macros.
12712 (server_h): Add common/common-utils.h, common/xml-utils.h,
12713 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12715 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12716 ptid.o, buffer.o): New rules.
12717 (linux-low.o): Add common/linux-osdata.h as a dependency.
12718 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12719 * configure.ac: Add AC_HEADER_DIRENT check.
12720 * config.in: Regenerate.
12721 * configure: Regenerate.
12722 * remote-utils.c (xml_escape_text): Delete.
12723 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12724 buffer_xml_printf): Move to common/buffer.c.
12725 * server.c (main): Remove call to initialize_inferiors.
12726 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12727 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12728 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12729 internal_error, gdb_assert, gdb_assert_fail): Delete.
12730 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12731 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12733 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12734 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12735 initialize_inferiors): Delete.
12737 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12739 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12742 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12744 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12746 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12748 2011-05-26 Yao Qi <yao@codesourcery.com>
12750 * Makefile.in (thread-db.o): Track dependence to
12751 common/gdb_thread_db.h.
12752 * thread-db.c: include gdb_thread_db.h from right place.
12754 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12756 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12757 __FILE__ and __LINE__ to internal_error.
12759 2011-05-13 Doug Evans <dje@google.com>
12761 * thread-db.c (try_thread_db_load_from_sdir): New function.
12762 (try_thread_db_load_from_dir): New function.
12763 (thread_db_load_search): Handle $sdir, ignore $pdir.
12764 Remove trying of system directories if search of
12765 libthread-db-search-path fails, that is now done via $sdir.
12767 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12769 * server.c (handle_query): Add EnableDisableTracepoints to the list
12770 of supported features.
12771 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12773 (cmd_qtenable_disable): New.
12774 (cmd_qtstart): Install tracepoints even if disabled.
12775 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12776 receiving a QTEnable or QTDisable packet.
12777 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12778 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12780 (gdb_probe): Skip data collection if static tracepoint is disabled.
12782 2011-05-10 Doug Evans <dje@google.com>
12784 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12786 2011-05-04 Doug Evans <dje@google.com>
12788 * linux-low.c (linux_join): Skip process lookup.
12789 * spu-low.c (spu_join): Ditto.
12790 * server.c (join_inferiors_callback): Delete.
12791 (process_serial_event): For 'D' packet (detach) call join_inferior
12794 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12796 * README: Don't mention xscale*-*-linux*.
12797 * configure.srv (xscale*-*-linux*): Don't handle target.
12799 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12801 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12803 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12804 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12805 (i386_emit_void_call_2): Likewise.
12807 2011-04-26 Yao Qi <yao@codesourcery.com>
12809 * linux-low.c: Move common macros to linux-ptrace.h.
12810 Include linux-ptrace.h.
12811 * Makefile.in (linux_ptrace_h): New.
12812 (linux-low.o): Depends on linux-ptrace.h.
12814 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12816 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12817 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12818 (remote_prepare): New function with most of the TCP code from ...
12819 (remote_open): ... here. Detect PORT here unconditionally. Move also
12820 setting transport_is_reliable.
12821 * server.c (run_once): New variable.
12822 (gdbserver_usage): Document it.
12823 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12824 the first run if RUN_ONCE.
12825 * server.h (run_once, remote_prepare): New declarations.
12827 2011-04-19 Tom Tromey <tromey@redhat.com>
12829 * win32-low.c (handle_load_dll): Remove duplicate "the".
12831 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12833 Remove support for old Cygwin 1.5 versions.
12834 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12835 function to avoid warning.
12836 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12839 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12841 * gdbserver/server.h (Macro _): Define it if not available.
12843 2011-03-14 Michael Snyder <msnyder@vmware.com>
12845 * hostio.c (handle_close): Remove unnecessary null test.
12847 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12849 * Makefile.in (maintainer-clean realclean distclean): Remove
12850 "make ... subdir_do" command.
12852 2011-03-10 Michael Snyder <msnyder@vmware.com>
12854 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12856 * server.c (handle_v_run): Free alloced buffer on early return.
12858 2011-03-09 Yao Qi <yao@codesourcery.com>
12861 2011-03-04 Yao Qi <yao@codesourcery.com>
12863 * Makefile.in: Remove GNU make feature --directory.
12865 2011-03-05 Yao Qi <yao@codesourcery.com>
12867 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12868 (subdir_do): New make target. Copied from gdb/Makefile.
12869 (maintainer-clean, realclean, distclean, clean): Call corresponding
12870 make targets in common/Makefile.
12872 2011-02-11 Yao Qi <yao@codesourcery.com>
12874 * configure.ac: Call AC_PROG_RANLIB.
12875 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12876 * configure: Regenerate.
12878 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12880 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12882 2011-03-06 Yao Qi <yao@codesourcery.com>
12884 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12886 2011-03-05 Yao Qi <yao@codesourcery.com>
12888 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12889 (subdir_do): New make target. Copied from gdb/Makefile.
12890 (maintainer-clean, realclean, distclean, clean): Call corresponding
12891 make targets in common/Makefile.
12893 2011-03-04 Yao Qi <yao@codesourcery.com>
12895 * Makefile.in: Remove GNU make feature --directory.
12897 2011-03-04 Michael Snyder <msnyder@vmware.com>
12899 * server.c (queue_stop_reply): Call xmalloc not malloc.
12901 2011-03-02 Michael Snyder <msnyder@vmware.com>
12903 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12905 2011-02-28 Michael Snyder <msnyder@vmware.com>
12907 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12908 (cmd_qtframe): Ditto.
12909 (cmd_qtbuffer): Ditto.
12910 (cmd_bigqtbuffer): Ditto.
12912 * utils.c (decimal2str): Initialize 'width' to nine, then
12913 don't mess with it.
12915 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12917 * hostio.c (require_data): Free *data, not data.
12919 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12921 * hostio.c (require_data): Use free, not xfree.
12923 2011-02-27 Michael Snyder <msnyder@vmware.com>
12925 * server.c (handle_query): Discard unused value.
12927 * hostio.c (require_data): Free malloc memory before returning
12930 2011-02-26 Michael Snyder <msnyder@vmware.com>
12932 * linux-low.c (list_threads): Call closedir for dirent.
12934 2011-02-27 Michael Snyder <msnyder@vmware.com>
12936 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12937 a case statement falls through.
12939 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12941 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12944 2011-02-26 Michael Snyder <msnyder@vmware.com>
12946 * utils.c (decimal2str): Eliminate dead code and dead param.
12947 (pulongest): Drop dead param from call to decimal2str.
12950 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12952 Revert the following patch (not approved yet):
12953 2011-02-21 Hui Zhu <teawater@gmail.com>
12954 * tracepoint.c (tp_printf): New function.
12955 (eval_agent_expr): Handle gdb_agent_op_printf.
12957 2011-02-21 Hui Zhu <teawater@gmail.com>
12959 * tracepoint.c (tp_printf): New function.
12960 (eval_agent_expr): Handle gdb_agent_op_printf.
12962 2011-02-18 Tom Tromey <tromey@redhat.com>
12964 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12965 (tracepoint.o): Likewise.
12966 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12967 (gdb_agent_op_names): Likewise.
12969 2011-02-18 Tom Tromey <tromey@redhat.com>
12971 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12972 gdb_agent_op_rot>: New constants.
12973 (gdb_agent_op_names): Add pick and roll.
12974 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12977 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12979 * aclocal.m4: Regenerated with aclocal-1.11.1.
12981 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12983 * server.c (handle_qxfer_traceframe_info): New.
12984 (qxfer_packets): Register "traceframe-info".
12985 (handle_query): Report support for qXfer:traceframe-info:read+.
12986 * tracepoint.c (match_blocktype): New.
12987 (traceframe_find_block_type): Rename to ...
12988 (traceframe_walk_blocks): ... this. Add callback filter argument,
12990 (traceframe_find_block_type): New, reimplemented on top of
12991 traceframe_walk_blocks.
12992 (build_traceframe_info_xml): New.
12993 (traceframe_read_info): New.
12994 * server.h (traceframe_read_info): Declare.
12996 2011-02-11 Yao Qi <yao@codesourcery.com>
12998 * configure.ac: Call AC_PROG_RANLIB.
12999 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13000 * configure: Regenerate.
13002 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13004 * server.c (gdb_read_memory): Change return semantics to allow
13006 (handle_search_memory_1): Adjust.
13007 (process_serial_event) <'m' packet>: Handle partial transfers.
13008 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13010 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13012 * regcache.c (init_register_cache): Initialize
13013 regcache->register_status.
13014 (free_register_cache): Release regcache->register_status.
13015 (regcache_cpy): Copy register_status.
13016 (registers_to_string): Print 'x's for unavailable registers.
13017 (supply_register): Mark the register's status valid or
13018 unavailable, depending on whether a buffer was passed in or not.
13019 (supply_register_zeroed): New.
13020 (supply_regblock): Mark the registers' status valid or
13021 unavailable, depending on whether a buffer was passed in or not.
13022 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13023 (struct regcache): New `register_status' field.
13024 (supply_register_zeroed): Declare.
13025 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13026 supply_register_zeroed, rather than passing a NULL buffer to
13028 * tracepoint.c (fetch_traceframe_registers): Update comment.
13030 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13032 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13035 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13037 * server.h (decode_xfer_write): Change prototype.
13038 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13039 and don't extract the annex here.
13040 * server.c (decode_xfer_read): Remove `annex' parameter,
13041 and don't extract the annex here.
13042 (decode_xfer): New.
13043 (struct qxfer): New.
13044 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13045 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13046 (handle_qxfer_statictrace): New functions, abstracted out from
13047 handle_query, and made to use the struct qxfer interface.
13048 (handle_threads_qxfer_proper): Rename to ...
13049 (handle_qxfer_threads_proper): ... this.
13050 (handle_threads_qxfer): Rename to ...
13051 (handle_qxfer_threads): ... this. Adjust.
13052 (qxfer_packets): New array.
13053 (handle_qxfer): New function.
13054 (handle_query): Use handle_qxfer.
13056 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13058 * gdbreplay.c: Shorten lines of >= 80 columns.
13059 * linux-low.c: Ditto.
13060 * linux-ppc-low.c: Ditto.
13061 * linux-s390-low.c: Ditto.
13062 * linux-sparc-low.c: Ditto.
13063 * linux-x86-low.c: Ditto.
13064 * linux-xtensa-low.c: Ditto.
13065 * mem-break.c: Ditto.
13066 * nto-low.c: Ditto.
13067 * regcache.h: Ditto.
13068 * remote-utils.c: Ditto.
13071 * thread-db.c: Ditto.
13072 * tracepoint.c: Ditto.
13074 * win32-low.h: Ditto.
13076 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13078 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13081 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13083 * server.c (gdbserver_version): Update copyright year in version
13085 * gdbreplay.c (gdbreplay_version): Ditto.
13087 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13089 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13090 * linux-bfin-low.c: New file.
13091 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13092 PT_DATA_ADDR for BFIN targets.
13093 * Makefile.in (SFILES): Add linux-bfin-low.c.
13094 (clean): Remove reg-bfin.c.
13095 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13096 * README: Mention supported Blackfin targets.
13098 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13100 * .gitignore: New file.
13102 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13104 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13106 2010-10-22 Jie Zhang <jie@codesourcery.com>
13108 * Makefile.in: Add FLAGS_TO_PASS variable.
13109 (install): Remove dependency of install-only and recursively
13110 invoke make for install-only.
13112 2010-10-04 Doug Evans <dje@google.com>
13114 * Makefile.in (uninstall): Use $(DESTDIR).
13116 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13120 * linux-x86-low.c (compat_siginfo_from_siginfo)
13121 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13122 si_code is < 0. Check for si_code == SI_TIMER before checking for
13125 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13127 * lynx-i386-low.c: New file.
13128 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13130 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13132 * lynx-low.c (ptrace_request_to_str): Remove handling for
13133 request values that have been removed in LynxOS 5.x.
13135 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13137 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13140 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13142 * configure.ac: Add --enable-inprocess-agent option.
13143 * configure: Rebuilt.
13145 2010-09-06 Yao Qi <yao@codesourcery.com>
13147 * linux-low.c (linux_kill): Remove unused variable.
13148 (linux_stabilize_threads): Likewise.
13149 * server.c (start_inferior): Likewise.
13150 (queue_stop_reply_callback): Likewise.
13151 * tracepoint.c (do_action_at_tracepoint): Likewise.
13153 2010-09-06 Yao Qi <yao@codesourcery.com>
13155 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13158 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13160 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13162 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13164 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13167 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13169 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13170 gdbserver/lynx-ppc-low.c: New files.
13171 * Makefile.in (lynx_low_h): New variable.
13172 (lynx-low.o, lynx-ppc-low.o): New rules.
13173 * configure.ac: On LynxOS, link with -lnetinet.
13174 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13175 * configure: regenerate.
13177 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13179 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13180 * configure.ac: Add check for vasprintf and vsnprintf.
13181 * configure, config.in: Regenerate.
13182 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13184 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13186 * gdbreplay.c: Move include of alloca.h up, next to include of
13188 * server.h: Add include of malloc.h.
13189 * mem-break.c: Remove include of malloc.h.
13190 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13192 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13194 * Makefile.in (memmem.o): Build with -Wno-error.
13196 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13198 * utils.c (xsnprintf): Make non-static.
13199 * server.h: Add xsnprintf declaration.
13200 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13201 replace calls to snprintf by calls to xsnprintf throughout.
13203 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13205 * configure.ac: Add configure check for alloca.
13206 * configure, config.in: Regenerate.
13207 * server.h: Include alloca.h if it exists.
13208 * gdbreplay.c: Include alloca.h if it exists.
13210 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13212 * linux-low.c (__SIGRTMIN): Define if not already defined.
13213 (linux_create_inferior): Check for __ANDROID__ rather than
13215 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13216 are already deferred.
13217 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13218 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13219 stopped and already has a pending signal to report.
13220 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13221 a pending signal to report or is moving out of a jump pad.
13222 (linux_init_signals): Check for __ANDROID__ rather than
13225 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13227 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13228 debug_threads check. Avoid a linear search when not doing debug
13231 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13233 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13234 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13235 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13236 (process_event): Change local fd's type to gdb_fildes_t.
13237 (create_file_handler): Adjust prototype.
13238 (delete_file_handler): Adjust prototype.
13239 (handle_file_event): Adjust prototype. Use pfildes.
13240 (create_file_event): Adjsut prototype.
13241 * remote-utils.c (remote_desc, listen_desc): Change type to
13243 * server.h: New gdb_fildes_t typedef.
13244 [USE_WIN32API]: Include winsock2.h.
13245 (delete_file_handler, add_file_handler): Adjust prototypes.
13246 (pfildes): Declare.
13247 * utils.c (pfildes): New.
13249 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13251 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13252 * configure: Regenerate.
13254 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13256 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13257 (linux_done_accessing_memory): ... this.
13258 (linux_target_ops): Adjust.
13259 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13260 * nto-low.c (nto_target_ops): Adjust comment.
13261 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13262 * spu-low.c (spu_target_ops): Adjust comment.
13263 * target.h (target_ops): Rename unprepare_to_access_memory field
13264 to done_accessing_memory.
13265 (unprepare_to_access_memory): Rename to ...
13266 (done_accessing_memory): ... this.
13268 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13270 * linux-low.c (linux_prepare_to_access_memory): New.
13271 (linux_unprepare_to_access_memory): New.
13272 (linux_target_ops): Install them.
13273 * server.c (read_memory): Rename to ...
13274 (gdb_read_memory): ... this. Use
13275 prepare_to_access_memory/prepare_to_access_memory.
13276 (write_memory): Rename to ...
13277 (gdb_write_memory): ... this. Use
13278 prepare_to_access_memory/prepare_to_access_memory.
13279 (handle_search_memory_1): Adjust.
13280 (process_serial_event): Adjust.
13281 * target.h (struct target_ops): New fields
13282 prepare_to_access_memory and unprepare_to_access_memory.
13283 (prepare_to_access_memory, unprepare_to_access_memory): New.
13284 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13285 prepare_to_access_memory/prepare_to_access_memory.
13286 * nto-low.c (nto_target_ops): Adjust.
13287 * spu-low.c (spu_target_ops): Adjust.
13288 * win32-low.c (win32_target_ops): Adjust.
13290 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13292 * Makefile.in (WARN_CFLAGS): Get it from configure.
13293 (WERROR_CFLAGS): New.
13294 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13295 * configure.ac: Introduce --enable-werror, which adds -Werror to
13296 the compiler command line. Enabled by default. Disable with
13297 --disable-werror. Add -Wdeclaration-after-statement
13298 Wpointer-arith and -Wformat-nonliteral to warning flags.
13299 * configure: Regenerate.
13301 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13303 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13305 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13307 * gdbreplay.c (remote_error): New.
13309 (expect): Use gdbchar. Check for error reading from GDB.
13310 Clarify sync error output.
13311 (play): Check for errors writing to GDB.
13312 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13313 * remote-utils.c (getpkt): Check for errors writing to the remote
13316 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13318 * linux-low.c (linux_wait_1): Move non-debugging code out of
13319 `debug_threads' control.
13321 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13323 * linux-low.c (linux_wait_1): Don't set last_status here.
13324 * server.c (push_event, queue_stop_reply_callback): Assert we're
13325 not pushing a TARGET_WAITKIND_IGNORE event.
13326 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13327 (myresume, handle_target_event): Set the thread's last_resume_kind
13328 and last_status from the target returned status.
13330 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13334 * linux-x86-low.c (update_debug_registers_callback): New.
13335 (i386_dr_low_set_addr): Use it.
13336 (i386_dr_low_get_addr): New.
13337 (i386_dr_low_set_control): Use update_debug_registers_callback.
13338 (i386_dr_low_get_control): New.
13339 (i386_dr_low_get_status): Adjust.
13340 * linux-low.c (linux_stop_lwp): New.
13341 * linux-low.h (linux_stop_lwp): Declare.
13343 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13344 argument instead of a i386_debug_reg_state.
13345 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13346 a i386_debug_reg_state.
13347 (i386_insert_aligned_watchpoint): Adjust.
13348 (i386_remove_aligned_watchpoint): Adjust.
13349 (i386_low_stopped_data_address): Read the debug registers from the
13350 inferior instead of from the mirrors.
13351 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13352 (i386_dr_low_get_addr): Declare.
13353 (i386_dr_low_get_control): Declare.
13354 (i386_dr_low_get_status): Change prototype.
13356 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13357 (i386_dr_low_get_addr): New.
13358 (i386_dr_low_get_control): New.
13359 (i386_dr_low_get_status): Adjust prototype. Return
13361 (i386_initial_stuff): Clear dr_status_mirror and
13363 (i386_get_thread_context): Adjust.
13364 (i386_set_thread_context): Adjust.
13365 (i386_thread_added): Adjust.
13367 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13369 * linux-low.h (linux_thread_area): Delete declaration.
13371 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13373 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13374 after its termination.
13376 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13378 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13379 (gdb_wants_all_stopped): Delete.
13380 (linux_wait_1): Don't call them.
13381 * server.c (handle_v_cont): Tag all threads as want-stopped.
13382 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13383 stopped as "client-wants-stopped".
13385 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13387 * Makefile.in (signals_h): New.
13388 (server_h): Depend on it.
13389 (server.o): Don't depend on $(signals_def).
13390 (signals.o): Depend on $(signals_def).
13392 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13394 * Makefile.in (signals_def): New.
13395 (server_h): Append include/gdb/signals.h and signals_def.
13396 (server.o): Append signals_def.
13398 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13400 * server.c (handle_target_event): Use target_signal_to_host for
13401 resume_info.sig initialization.
13402 * target.h (struct thread_resume) <sig>: New comment.
13404 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13406 * server.c (handle_query): strcpy() the returned string from paddress()
13407 instead of sprintf().
13408 * utils.c (paddress): Return phex_nz().
13410 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13412 * server.c (handle_v_cont): Call mourn_inferior if process
13414 (myresume): Likewise.
13416 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13418 Static tracepoints, and integration with UST.
13420 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13421 * mem-break.c (uninsert_all_breakpoints)
13422 (reinsert_all_breakpoints): New.
13423 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13424 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13425 (gdb_agent_ust_loaded, helper_thread_id)
13426 (gdb_agent_helper_thread_id): New macros.
13427 (struct ipa_sym_addresses): Add addr_ust_loaded,
13428 addr_helper_thread_id, addr_cmd_buf.
13429 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13430 (in_process_agent_loaded_ust): New.
13431 (write_e_ust_not_loaded): New.
13432 (maybe_write_ipa_ust_not_loaded): New.
13433 (struct collect_static_trace_data_action): New.
13434 (enum tracepoint_type) <static_tracepoint>: New.
13435 (struct tracepoint) <handle>: Mention static tracepoints.
13436 (struct static_tracepoint_ctx): New.
13437 (CMD_BUF_SIZE): New.
13438 (add_tracepoint_action): Handle static tracepoint actions.
13439 (unprobe_marker_at): New.
13440 (clear_installed_tracepoints): Handle static tracepoints.
13441 (cmd_qtdp): Handle static tracepoints.
13442 (probe_marker_at): New.
13443 (cmd_qtstart): Handle static tracepoints.
13444 (response_tracepoint): Handle static tracepoints.
13445 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13446 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13447 (get_context_regcache): Handle static tracepoints.
13448 (do_action_at_tracepoint): Handle static tracepoint actions.
13449 (traceframe_find_block_type): Handle static trace data blocks.
13450 (traceframe_read_sdata): New.
13451 (download_tracepoints): Download static tracepoint actions.
13452 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13453 (GDB_PROBE_NAME): New.
13455 (GET_UST_SYM): New.
13458 (ust_marker_to_static_tracepoint): New.
13460 (collect_ust_data_at_tracepoint): New.
13461 (gdb_ust_probe): New.
13462 (UNIX_PATH_MAX, SOCK_DIR): New.
13463 (gdb_ust_connect_sync_socket): New.
13464 (resume_thread, stop_thread): New.
13465 (run_inferior_command): New.
13466 (init_named_socket): New.
13467 (gdb_ust_socket_init): New.
13468 (cstr_to_hexstr): New.
13470 (first_marker, next_marker): New.
13471 (response_ust_marker): New.
13472 (cmd_qtfstm, cmd_qtsstm): New.
13473 (unprobe_marker_at, probe_marker_at): New.
13474 (cmd_qtstmat, gdb_ust_thread): New.
13475 (gdb_ust_init): New.
13476 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13477 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13478 (ST_REGENTRY): New.
13479 (x86_64_st_collect_regmap): New.
13480 (X86_64_NUM_ST_COLLECT_GREGS): New.
13481 (AMD64_RIP_REGNUM): New.
13482 (supply_static_tracepoint_registers): New.
13483 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13484 (ST_REGENTRY): New.
13485 (i386_st_collect_regmap): New.
13486 (i386_NUM_ST_COLLECT_GREGS): New.
13487 (supply_static_tracepoint_registers): New.
13488 * server.c (handle_query): Handle qXfer:statictrace:read.
13489 <qSupported>: Report support for StaticTracepoints, and
13490 qXfer:statictrace:read features.
13491 * server.h (traceframe_read_sdata)
13492 (supply_static_tracepoint_registers): Declare.
13493 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13494 (unpack_varlen_hex): Include in IPA build.
13495 * Makefile.in (ustlibs, ustinc): New.
13496 (IPA_OBJS): Add remote-utils-ipa.o.
13497 ($(IPA_LIB)): Link -ldl and -lpthread.
13499 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13500 * config.in, configure: Regenerate.
13502 2010-06-20 Ian Lance Taylor <iant@google.com>
13503 Pedro Alves <pedro@codesourcery.com>
13505 * linux-x86-low.c (always_true): Delete.
13506 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13507 trying to fool the compiler with always_true.
13509 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13511 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13512 conditions in gdbserver.
13514 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13516 * spu-low.c (spu_read_memory): Wrap around local store limit.
13517 (spu_write_memory): Likewise.
13519 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13521 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13522 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13524 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13526 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13527 uses with LONGEST uses.
13529 2010-06-14 Stan Shebs <stan@codesourcery.com>
13530 Pedro Alves <pedro@codesourcery.com>
13534 * linux-x86-low.c: Include limits.h.
13536 (always_true): New.
13539 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13540 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13541 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13542 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13543 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13544 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13545 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13546 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13547 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13548 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13549 (amd64_emit_void_call_2): New.
13550 (amd64_emit_ops): New.
13551 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13552 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13553 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13554 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13555 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13556 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13557 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13558 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13559 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13560 (i386_emit_stack_adjust, i386_emit_int_call_1)
13561 (i386_emit_void_call_2): New.
13562 (i386_emit_ops): New.
13563 (x86_emit_ops): New.
13564 (the_low_target): Install x86_emit_ops.
13565 * server.h (struct emit_ops): New.
13566 (get_raw_reg_func_addr): Declare.
13567 (current_insn_ptr, emit_error): Declare.
13568 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13569 (set_trace_state_variable_value): New defines.
13570 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13571 addr_get_trace_state_variable_value and
13572 addr_set_trace_state_variable_value.
13573 (symbol_list): New fields for get_raw_reg,
13574 get_trace_state_variable_value and set_trace_state_variable_value.
13575 (condfn): New typedef.
13576 (struct tracepoint): New field `compiled_cond'.
13577 (do_action_at_tracepoint): Clear compiled_cond.
13578 (get_trace_state_variable_value, set_trace_state_variable_value):
13580 (condition_true_at_tracepoint): If there's a compiled condition,
13582 (current_insn_ptr, emit_error): New globals.
13583 (struct bytecode_address): New.
13584 (get_raw_reg_func_addr): New.
13585 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13586 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13587 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13588 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13589 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13590 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13591 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13592 (compile_tracepoint_condition, compile_bytecodes): New.
13593 * target.h (emit_ops): Forward declare.
13594 (struct target_ops): New field emit_ops.
13595 (target_emit_ops): New.
13596 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13597 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13598 * linux-low.c (linux_emit_ops): New.
13599 (linux_target_ops): Install it.
13600 * linux-low.h (struct linux_target_ops): New field emit_ops.
13602 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13604 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13605 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13607 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13608 Stan Shebs <stan@codesourcery.com>
13610 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13611 (all): Depend on $(extra_libraries).
13612 (install-only): Install the IPA.
13613 (IPA_OBJS, IPA_LIB): New.
13614 (clean): Remove the IPA lib.
13615 (IPAGENT_CFLAGS): New.
13616 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13617 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13618 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13619 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13620 * configure.ac: Check for atomic builtins support in the compiler.
13621 (IPA_DEPFILES, extra_libraries): Define.
13622 * configure.srv (ipa_obj): Add description.
13623 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13624 (i[34567]86-*-linux*): Set ipa_obj.
13625 (x86_64-*-linux*): Set ipa_obj.
13626 * linux-low.c (stabilizing_threads): New.
13627 (supports_fast_tracepoints): New.
13628 (linux_detach): Stabilize threads before detaching.
13629 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13630 the lwp is either not stabilizing, or is moving out of a jump pad.
13631 (linux_fast_tracepoint_collecting): New.
13632 (maybe_move_out_of_jump_pad): New.
13633 (enqueue_one_deferred_signal): New.
13634 (dequeue_one_deferred_signal): New.
13635 (linux_wait_for_event_1): If moving out of a jump pad, defer
13636 pending signals to later.
13637 (linux_stabilize_threads): New.
13638 (linux_wait_1): Check if threads need moving out of jump pads, and
13640 (stuck_in_jump_pad_callback): New.
13641 (move_out_of_jump_pad_callback): New.
13642 (lwp_running): New.
13643 (linux_resume_one_lwp): Handle moving out of jump pads.
13644 (linux_set_resume_request): Dequeue deferred signals.
13645 (need_step_over_p): Also step over fast tracepoint jumps.
13646 (start_step_over): Also uninsert fast tracepoint jumps.
13647 (finish_step_over): Also reinsert fast tracepoint jumps.
13648 (linux_install_fast_tracepoint_jump): New.
13649 (linux_target_ops): Install linux_stabilize_threads and
13650 linux_install_fast_tracepoint_jump_pad.
13651 * linux-low.h (linux_target_ops) <get_thread_area,
13652 install_fast_tracepoint_jump_pad>: New fields.
13653 (struct lwp_info) <collecting_fast_tracepoint,
13654 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13655 (linux_get_thread_area): Declare.
13656 * linux-x86-low.c (jump_insn): New.
13657 (x86_get_thread_area): New.
13658 (append_insns): New.
13659 (push_opcode): New.
13660 (amd64_install_fast_tracepoint_jump_pad): New.
13661 (i386_install_fast_tracepoint_jump_pad): New.
13662 (x86_install_fast_tracepoint_jump_pad): New.
13663 (the_low_target): Install x86_get_thread_area and
13664 x86_install_fast_tracepoint_jump_pad.
13665 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13666 (struct fast_tracepoint_jump): New.
13667 (fast_tracepoint_jump_insn): New.
13668 (fast_tracepoint_jump_shadow): New.
13669 (find_fast_tracepoint_jump_at): New.
13670 (fast_tracepoint_jump_here): New.
13671 (delete_fast_tracepoint_jump): New.
13672 (set_fast_tracepoint_jump): New.
13673 (uninsert_fast_tracepoint_jumps_at): New.
13674 (reinsert_fast_tracepoint_jumps_at): New.
13675 (set_breakpoint_at): Use write_inferior_memory.
13676 (uninsert_raw_breakpoint): Use write_inferior_memory.
13677 (check_mem_read): Mask out fast tracepoint jumps.
13678 (check_mem_write): Mask out fast tracepoint jumps.
13679 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13680 (set_fast_tracepoint_jump): Declare.
13681 (delete_fast_tracepoint_jump)
13682 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13683 (reinsert_fast_tracepoint_jumps_at): Declare.
13684 * regcache.c: Don't compile many functions when building the
13685 in-process agent library.
13686 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13687 the register buffer in the heap.
13688 (free_register_cache): If the register buffer isn't owned by the
13689 regcache, don't free it.
13690 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13691 pre-existing register caches.
13692 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13694 (convert_ascii_to_int): : Constify `from' parameter type.
13695 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13696 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13697 the needed buffer in-place.
13698 (relocate_instruction): New.
13699 * server.c (handle_query) <qSymbols>: If the target supports
13700 tracepoints, give it a chance of looking up symbols. Report
13701 support for fast tracepoints.
13702 (handle_status): Stabilize threads.
13703 (process_serial_event): Adjust.
13704 * server.h (struct fast_tracepoint_jump): Forward declare.
13705 (struct process_info) <fast_tracepoint_jumps>: New field.
13706 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13707 (decode_X_packet, decode_M_packet): Adjust.
13708 (relocate_instruction): Declare.
13709 (in_process_agent_loaded): Declare.
13710 (tracepoint_look_up_symbols): Declare.
13711 (struct fast_tpoint_collect_status): Declare.
13712 (fast_tracepoint_collecting): Declare.
13713 (force_unlock_trace_buffer): Declare.
13714 (handle_tracepoint_bkpts): Declare.
13715 (initialize_low_tracepoint)
13716 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13717 * target.h (struct target_ops) <stabilize_threads,
13718 install_fast_tracepoint_jump_pad>: New fields.
13719 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13720 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13721 [HAVE_STDINT_H]: Include stdint.h.
13722 (trace_debug_1): Rename to ...
13723 (trace_vdebug): ... this.
13724 (trace_debug): Rename to ...
13725 (trace_debug_1): ... this. Add `level' parameter.
13726 (trace_debug): New.
13727 (ATTR_USED, ATTR_NOINLINE): New.
13728 (IP_AGENT_EXPORT): New.
13729 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13730 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13731 (about_to_request_buffer_space, trace_buffer_is_full)
13732 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13733 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13734 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13735 (traceframe_write_count, traceframes_created)
13736 (trace_state_variables)
13737 New renaming defines.
13738 (struct ipa_sym_addresses): New.
13739 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13740 (symbol_list): New.
13741 (ipa_sym_addrs): New.
13742 (all_tracepoint_symbols_looked_up): New.
13743 (in_process_agent_loaded): New.
13744 (write_e_ipa_not_loaded): New.
13745 (maybe_write_ipa_not_loaded): New.
13746 (tracepoint_look_up_symbols): New.
13747 (debug_threads) [IN_PROCESS_AGENT]: New.
13748 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13749 (UNKNOWN_SIDE_EFFECTS): New.
13750 (stop_tracing): New.
13751 (flush_trace_buffer): New.
13752 (stop_tracing_bkpt): New.
13753 (flush_trace_buffer_bkpt): New.
13754 (read_inferior_integer): New.
13755 (read_inferior_uinteger): New.
13756 (read_inferior_data_pointer): New.
13757 (write_inferior_data_pointer): New.
13758 (write_inferior_integer): New.
13759 (write_inferior_uinteger): New.
13760 (struct collect_static_trace_data_action): Delete.
13761 (enum tracepoint_type): New.
13762 (struct tracepoint) <type>: New field `type'.
13763 <actions_str, step_actions, step_actions_str>: Only include in
13765 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13766 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13767 (tracepoints): Use IP_AGENT_EXPORT.
13768 (last_tracepoint): Don't include in the IPA.
13769 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13770 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13771 (alloced_trace_state_variables): New.
13772 (trace_state_variables): Use IP_AGENT_EXPORT.
13773 (traceframe_t): Delete unused variable.
13774 (circular_trace_buffer): Don't include in the IPA.
13775 (trace_buffer_start): Delete.
13776 (struct trace_buffer_control): New.
13777 (trace_buffer_free): Delete.
13778 (struct ipa_trace_buffer_control): New.
13779 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13780 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13782 (trace_buffer_ctrl): New.
13783 (TRACE_BUFFER_CTRL_CURR): New.
13784 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13785 Reimplement as macros.
13786 (trace_buffer_wrap): Delete.
13787 (traceframe_write_count, traceframe_read_count)
13788 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13789 (struct tracepoint_hit_ctx) <type>: New field.
13790 (struct fast_tracepoint_ctx): New.
13791 (memory_barrier): New.
13793 (record_tracepoint_error): Update atomically in the IPA.
13794 (clear_inferior_trace_buffer): New.
13795 (about_to_request_buffer_space): New.
13796 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13797 updating the same buffer.
13798 (add_tracepoint): Default the tracepoint's type to trap
13799 tracepoint, and orig_size to -1.
13800 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13801 internal variables.
13802 (create_trace_state_variable): New parameter `gdb'. Handle it.
13803 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13804 (cmd_qtdp): Handle fast tracepoints.
13805 (cmd_qtdv): Adjust.
13806 (max_jump_pad_size): New.
13807 (gdb_jump_pad_head): New.
13808 (get_jump_space_head): New.
13809 (claim_jump_space): New.
13810 (sort_tracepoints): New.
13811 (MAX_JUMP_SIZE): New.
13812 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13814 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13815 support. Upload fast traceframes, and delete internal IPA
13817 (stop_tracing_handler): New.
13818 (flush_trace_buffer_handler): New.
13819 (cmd_qtstop): Upload fast tracepoints.
13820 (response_tracepoint): Handle fast tracepoints.
13821 (tracepoint_finished_step): Upload fast traceframes. Set the
13822 tracepoint hit context's tracepoint type.
13823 (handle_tracepoint_bkpts): New.
13824 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13825 type. Add comment about fast tracepoints.
13826 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13827 non-existing action_str field.
13828 (get_context_regcache): Handle fast tracepoints.
13829 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13831 (fast_tracepoint_from_jump_pad_address): New.
13832 (fast_tracepoint_from_ipa_tpoint_address): New.
13833 (collecting_t): New.
13834 (force_unlock_trace_buffer): New.
13835 (fast_tracepoint_collecting): New.
13837 (gdb_collect): New.
13838 (write_inferior_data_ptr): New.
13839 (target_tp_heap): New.
13840 (target_malloc): New.
13841 (download_agent_expr): New.
13843 (download_tracepoints): New.
13844 (download_trace_state_variables): New.
13845 (upload_fast_traceframes): New.
13846 (IPA_FIRST_TRACEFRAME): New.
13847 (IPA_NEXT_TRACEFRAME_1): New.
13848 (IPA_NEXT_TRACEFRAME): New.
13849 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13850 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13851 (gdb_jump_pad_buffer_end): New.
13852 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13853 (initialize_tracepoint): Adjust.
13854 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13855 buffer. Initialize the low module.
13856 * utils.c (PREFIX, TOOLNAME): New.
13857 (malloc_failure): Use PREFIX.
13858 (error): In the IPA, an error causes an exit.
13859 (fatal, warning): Use PREFIX.
13860 (internal_error): Use TOOLNAME.
13861 (NUMCELLS): Increase to 10.
13862 * configure, config.in: Regenerate.
13864 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13866 * server.c (handle_query) <qSupported>: Do two passes over the
13867 qSupported string to avoid nesting strtok.
13869 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13871 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13873 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13874 -Wl,--dynamic-list.
13875 * configure: Regenerate.
13876 * proc-service.list: New.
13878 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13880 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13883 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13885 * gdbreplay.c (remote_open): Check error return from socket() call by
13886 its equality to -1 not by it being negative.
13887 * remote-utils.c (remote_open): Likewise.
13889 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13891 * config.h: Regenerate.
13893 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13895 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13896 doesn't provide PTRACE_GET_THREAD_AREA.
13898 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13900 * linux-m68k-low.c: Include <asm/ptrace.h>
13901 (ps_get_thread_area): Implement.
13903 2010-05-03 Doug Evans <dje@google.com>
13905 * event-loop.c (struct callback_event): New struct.
13906 (callback_list): New global.
13907 (append_callback_event, delete_callback_event): New functions.
13908 (process_callback): New function.
13909 (start_event_loop): Call it.
13910 * remote-utils.c (NOT_SCHEDULED): Define.
13911 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13912 moved out of readchar.
13913 (readchar): Rewrite. Call reschedule before returning.
13914 (reset_readchar): New function.
13915 (remote_close): Call it.
13916 (process_remaining, reschedule): New functions.
13917 * server.h (callback_handler_func): New typedef.
13918 (append_callback_event, delete_callback_event): Declare.
13920 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13922 * proc-service.c (ps_pglobal_lookup): Use
13923 thread_db_look_up_one_symbol.
13924 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13925 parameter. Use it instead of all_symbols_looked_up.
13926 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13928 (all_symbols_looked_up): Don't declare.
13929 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13930 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13932 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13933 Set all_symbols_looked_up here.
13934 (thread_db_look_up_one_symbol): New.
13935 (thread_db_get_tls_address): Adjust.
13936 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13937 thread_db object on the heap, and tentatively set it in the
13939 (thread_db_init): Don't set all_symbols_looked_up here.
13940 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13942 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13944 * linux-low.c (linux_kill, linux_detach): Adjust.
13945 (status_pending_p_callback): Remove redundant statement. Check
13946 for !TARGET_WAITIKIND_IGNORE, instead of
13947 TARGET_WAITKIND_STOPPED.
13948 (handle_tracepoints): Make sure LWP is locked. Adjust.
13949 (linux_wait_for_event_1): Adjust.
13950 (linux_cancel_breakpoints): New.
13951 (unsuspend_one_lwp): New.
13952 (unsuspend_all_lwps): New.
13953 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13954 (send_sigstop_callback): Change return type to int, add new
13955 `except' parameter and handle it.
13956 (suspend_and_send_sigstop_callback): New.
13957 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13958 pass them down. If SUSPEND, also increment the lwp's suspend
13960 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13961 (need_step_over_p): Don't consider suspended LWPs.
13962 (start_step_over): Adjust.
13963 (proceed_one_lwp): Change return type to int, add new `except'
13964 parameter and handle it.
13965 (unsuspend_and_proceed_one_lwp): New.
13966 (proceed_all_lwps): Use find_inferior instead of
13968 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13969 also decrement the suspend count of LWPs. Pass `except' down,
13970 instead of hacking its suspend count.
13971 (linux_pause_all): Add `freeze' parameter. Adjust.
13972 (linux_unpause_all): New.
13973 (linux_target_ops): Install linux_unpause_all.
13974 * server.c (handle_status): Adjust.
13975 * target.h (struct target_ops): New fields `unpause_all' and
13976 `cancel_breakpoints'. Add new parameter to `pause_all'.
13977 (pause_all): Add new `freeze' parameter.
13978 (unpause_all): New.
13979 (cancel_breakpoints): New.
13980 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13981 cancel breakpoints.
13982 (cmd_qtstart): Pause threads.
13983 (stop_tracing): Pause threads, and cancel breakpoints.
13984 * win32-low.c (win32_target_ops): Adjust.
13986 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13988 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13989 the inferior right away from here...
13990 (linux_wait_1): ... to here, and adjust to check the thread's
13991 last_resume_kind instead of the lwp's step or stop_expected flags.
13993 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13995 * README: Use consistent `GDB' and `GDBserver' spellings.
13997 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13999 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14000 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14001 (linux_detach_one_lwp): Assume the lwp is stopped.
14002 (any_thread_of): Delete.
14003 (linux_detach): Stop all lwps here. Don't blindly delete all
14005 (delete_lwp_callback): New.
14006 (linux_mourn): Delete all lwps of the process that is gone.
14007 (linux_wait_1): Don't delete the last lwp of the process here.
14008 * mem-break.h (mark_breakpoints_out): Declare.
14009 * mem-break.c (mark_breakpoints_out): New.
14010 (free_all_breakpoints): Use it.
14011 * server.c (handle_target_event): If the process is gone, mark
14013 * thread-db.c (struct thread_db) <create_bp>: New field.
14014 (thread_db_enable_reporting): Fix prototype. Store a thread event
14015 breakpoint reference in the thread_db struct.
14016 (thread_db_load_search): Clear the thread_db object.
14017 (try_thread_db_load_1): Ditto.
14018 (switch_to_process): New.
14019 (disable_thread_event_reporting): Use it.
14020 (remove_thread_event_breakpoints): New.
14021 (thread_db_detach, thread_db_mourn): Use it.
14023 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14025 * linux-low.c (linux_enable_event_reporting): New.
14026 (linux_wait_for_event_1, handle_extended_wait): Use it.
14028 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14030 * linux-low.c (linux_kill_one_lwp, linux_kill)
14031 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14032 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14033 SIGSTOP even if the LWP is stopped.
14034 (send_sigstop_callback): New.
14035 (stop_all_lwps): Use send_sigstop_callback instead.
14036 (linux_resume_one_thread): Adjust.
14037 (proceed_one_lwp): Still proceed an LWP that the client has
14038 requested to stop, if we haven't reported it as stopped yet. Make
14039 sure that LWPs the client want stopped, have a pending SIGSTOP.
14041 2010-04-26 Doug Evans <dje@google.com>
14043 * server.c (handle_general_set): Make static.
14045 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14046 Print received char after testing for error/eof instead of before.
14047 (input_interrupt): Tweak comment.
14049 2010-04-23 Doug Evans <dje@google.com>
14051 * server.c (start_inferior): Print inferior argv if --debug.
14053 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14055 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14056 * nto-x86-low.c: Include server.h
14058 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14060 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14061 be consistent with other sources of this directory.
14062 (init_registers_amd64): Correct name of source file of this function
14065 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14067 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14068 64-bit executables.
14070 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14072 * win32-i386-low.c: Add 64-bit support.
14073 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14074 (init_registers_amd64): Declare.
14075 (mappings): Add 64-bit version of array.
14076 (init_windows_x86): New function.
14077 (the_low_target): Change init_arch field to init_windows_x86.
14079 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14081 * win32-low.c: Adapt to support also 64-bit architecture.
14082 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14083 (get_image_name): Use SIZE_T type for local variable `done'.
14084 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14085 (toolhelp_get_dll_name): Idem.
14086 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14087 Use uintptr_t typecast to avoid warning.
14088 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14089 (handle_exception): Use phex_nz to avoid warning.
14090 (win32_wait): Remove unused local variable `process'.
14092 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14094 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14097 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14099 * configure.ac: Use `ws2_32' library for srv_mingw.
14100 * configure: Regenerate.
14101 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14102 * remote-utils.c: Likewise.
14104 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14106 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14107 if __x86_64__ is defined.
14109 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14111 * configure: Regenerate.
14113 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14115 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14116 * target.h (target_ops): New get_tib_address field.
14117 * win32-low.h (win32_thread_info): Add thread_local_base field.
14118 * win32-low.c (child_add_thread): Add tlb argument.
14119 Set thread_local_base field to TLB.
14120 (get_child_debug_event): Adapt to child_add_thread change.
14121 (win32_get_tib_address): New function.
14122 (win32_target_ops): Set get_tib_address field to
14123 win32_get_tib_address.
14124 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14126 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14128 * linux-low.c (linux_mourn): Also remove the process.
14129 * server.c (handle_target_event): Don't remove the process here.
14130 * nto-low.c (nto_mourn): New.
14131 (nto_target_ops): Install it.
14132 * spu-low.c (spu_mourn): New.
14133 (spu_target_ops): Install it.
14134 * win32-low.c (win32_mourn): New.
14135 (win32_target_ops): Install it.
14137 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14139 * server.h (buffer_xml_printf): Remove redundant `;'.
14141 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14143 * regcache.c (set_register_cache): Invalidate regcaches before
14144 changing the register cache layout.
14145 (regcache_invalidate_one): Allow a NULL regcache.
14146 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14147 regcaches before changing the register cache layout or the target
14150 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14152 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14153 variable warning on Linux/x86-64.
14155 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14157 GDBserver disconnected tracing support.
14159 * linux-low.c (linux_remove_process): Delete.
14160 (add_lwp): Don't set last_resume_kind here.
14161 (linux_kill): Use `mourn'.
14162 (linux_detach): Use `thread_db_detach', and `mourn'.
14163 (linux_mourn): New.
14164 (linux_attach_lwp_1): Adjust comment.
14165 (linux_attach): last_resume_kind moved the thread_info; adjust.
14166 (status_pending_p_callback): Adjust.
14167 (linux_wait_for_event_1): Adjust.
14168 (count_events_callback, select_singlestep_lwp_callback)
14169 (select_event_lwp_callback, cancel_breakpoints_callback)
14170 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14171 (proceed_one_lwp): Adjust.
14172 (linux_async): Add debug output.
14173 (linux_thread_stopped): New.
14174 (linux_pause_all): New.
14175 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14177 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14178 (thread_db_free): Delete declaration.
14179 (thread_db_detach, thread_db_mourn): Declare.
14180 * thread-db.c (thread_db_init): Use thread_db_mourn.
14181 (thread_db_free): Delete, split in two.
14182 (disable_thread_event_reporting): New.
14183 (thread_db_detach): New.
14184 (thread_db_mourn): New.
14186 * server.h (struct thread_info) <last_resume_kind>: New field.
14187 <attached>: Add comment.
14188 <gdb_detached>: New field.
14189 (handler_func): Change return type to int.
14190 (handle_serial_event, handle_target_event): Ditto.
14191 (gdb_connected): Declare.
14193 (disconnected_tracing): Declare.
14194 (stop_tracing): Declare.
14196 * server.c (handle_query) <qSupported>: Report support for
14197 disconnected tracing.
14198 (queue_stop_reply_callback): Account for running threads.
14199 (gdb_wants_thread_stopped): New.
14200 (gdb_wants_all_threads_stopped): New.
14201 (gdb_reattached_process): New.
14202 (handle_status): Clear the `gdb_detached' flag of all processes.
14203 In all-stop, stop all threads.
14204 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14205 (process_serial_event): If the remote connection breaks, or if an
14206 exit was forced with "monitor exit", force an event loop exit.
14207 Handle disconnected tracing on detach.
14208 (handle_serial_event): Adjust.
14209 (handle_target_event): If GDB isn't connected, forward events back
14210 to the inferior, unless the last process exited, in which case,
14211 exit gdbserver. Adjust interface.
14213 * remote-utils.c (remote_open): Don't block in accept. Instead
14214 register an event loop source on the listen socket file
14215 descriptor. Refactor bits into ...
14216 (listen_desc): ... this new global.
14217 (gdb_connected): ... this new function.
14218 (enable_async_notification): ... this new function.
14219 (handle_accept_event): ... this new function.
14220 (remote_close): Clear remote_desc.
14222 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14224 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14226 (mourn_inferior): Define.
14227 (target_process_qsupported): Avoid the dangling else problem.
14228 (thread_stopped): Define.
14229 (pause_all): Define.
14230 (target_waitstatus_to_string): Declare.
14231 * target.c (target_waitstatus_to_string): New.
14233 * tracepoint.c (tracing): Make extern.
14234 (disconnected_tracing): New.
14235 (stop_tracing): Make extern. Handle tracing stops due to GDB
14237 (cmd_qtdisconnected): New.
14238 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14239 (handle_tracepoint_general_set): Handle QTDisconnected.
14241 * event-loop.c (event_handler_func): Change return type to int.
14242 (process_event): Bail out if the event handler wants the event
14244 (handle_file_event): Ditto.
14245 (start_event_loop): Bail out if the event handler wants the event
14248 * nto-low.c (nto_target_ops): Adjust.
14249 * spu-low.c (spu_wait): Don't remove the process here.
14250 (spu_target_ops): Adjust.
14251 * win32-low.c (win32_wait): Don't remove the process here.
14252 (win32_target_ops): Adjust.
14254 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14256 * regcache.c (realloc_register_cache): Invalidate inferior's
14257 regcache before recreating it.
14259 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14261 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14263 2010-04-09 Stan Shebs <stan@codesourcery.com>
14264 Pedro Alves <pedro@codesourcery.com>
14266 * server.h (LONGEST): New.
14267 (struct thread_info) <while_stepping>: New field.
14268 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14270 (initialize_tracepoint, handle_tracepoint_general_set)
14271 (handle_tracepoint_query, tracepoint_finished_step)
14272 (tracepoint_was_hit, release_while_stepping_state_list):
14273 (current_traceframe): Declare.
14274 * server.c (handle_general_set): Handle tracepoint packets.
14275 (read_memory): New.
14276 (write_memory): New.
14277 (handle_search_memory_1): Use read_memory.
14278 (handle_query): Report support for conditional tracepoints, trace
14279 state variables, and tracepoint sources. Handle tracepoint
14281 (main): Initialize the tracepoints module.
14282 (process_serial_event): Handle traceframe reads/writes.
14284 * linux-low.c (handle_tracepoints): New.
14285 (linux_wait_1): Call it.
14286 (linux_resume_one_lwp): Handle while-stepping.
14287 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14288 (linux_target_ops): Install them.
14289 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14291 * linux-x86-low.c (x86_supports_tracepoints): New.
14292 (the_low_target). Install it.
14294 * mem-break.h (delete_breakpoint): Declare.
14295 * mem-break.c (delete_breakpoint): Make external.
14297 * target.h (struct target_ops): Add `supports_tracepoints',
14298 `read_pc', and `write_pc' fields.
14299 (target_supports_tracepoints): Define.
14300 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14303 * regcache.h (struct regcache) <registers_owned>: New field.
14304 (init_register_cache, regcache_cpy): Declare.
14305 (regcache_read_pc, regcache_write_pc): Declare.
14306 (register_cache_size): Declare.
14307 (supply_regblock): Declare.
14308 * regcache.c (init_register_cache): New.
14309 (new_register_cache): Use it.
14310 (regcache_cpy): New.
14311 (register_cache_size): New.
14312 (supply_regblock): New.
14313 (regcache_read_pc, regcache_write_pc): New.
14315 * tracepoint.c: New.
14317 * Makefile.in (OBS): Add tracepoint.o.
14318 (tracepoint.o): New rule.
14320 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14322 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14324 (i386-mmx.c): Likewise.
14325 (i386-mmx-linux.o): Likewise.
14326 (i386-mmx-linux.c): Likewise.
14328 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14329 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14330 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14331 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14333 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14334 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14335 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14337 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14339 * Makefile.in (clean): Updated.
14341 (i386-avx.c): Likewise.
14342 (i386-avx-linux.o): Likewise.
14343 (i386-avx-linux.c): Likewise.
14344 (amd64-avx.o): Likewise.
14345 (amd64-avx.c): Likewise.
14346 (amd64-avx-linux.o): Likewise.
14347 (amd64-avx-linux.c): Likewise.
14349 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14350 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14351 (srv_amd64_regobj): Add amd64-avx.o.
14352 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14353 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14354 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14355 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14356 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14357 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14358 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14360 * i387-fp.c: Include "i386-xstate.h".
14362 (i387_cache_to_xsave): Likewise.
14363 (i387_xsave_to_cache): Likewise.
14364 (x86_xcr0): Likewise.
14366 * i387-fp.h (i387_cache_to_xsave): Likewise.
14367 (i387_xsave_to_cache): Likewise.
14368 (x86_xcr0): Likewise.
14370 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14371 * linux-crisv32-low.c (target_regsets): Likewise.
14372 * linux-m68k-low.c (target_regsets): Likewise.
14373 * linux-mips-low.c (target_regsets): Likewise.
14374 * linux-ppc-low.c (target_regsets): Likewise.
14375 * linux-s390-low.c (target_regsets): Likewise.
14376 * linux-sh-low.c (target_regsets): Likewise.
14377 * linux-sparc-low.c (target_regsets): Likewise.
14378 * linux-xtensa-low.c (target_regsets): Likewise.
14380 * linux-low.c: Include <sys/uio.h>.
14381 (regsets_fetch_inferior_registers): Support nt_type.
14382 (regsets_store_inferior_registers): Likewise.
14383 (linux_process_qsupported): New.
14384 (linux_target_ops): Add linux_process_qsupported.
14386 * linux-low.h (regset_info): Add nt_type.
14387 (linux_target_ops): Add process_qsupported.
14389 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14391 (init_registers_i386_avx_linux): New.
14392 (init_registers_amd64_avx_linux): Likewise.
14393 (xmltarget_i386_linux_no_xml): Likewise.
14394 (xmltarget_amd64_linux_no_xml): Likewise.
14395 (PTRACE_GETREGSET): Likewise.
14396 (PTRACE_SETREGSET): Likewise.
14397 (x86_fill_xstateregset): Likewise.
14398 (x86_store_xstateregset): Likewise.
14399 (use_xml): Likewise.
14400 (x86_linux_update_xmltarget): Likewise.
14401 (x86_linux_process_qsupported): Likewise.
14402 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14403 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14404 init_registers_i386_linux here. Call
14405 x86_linux_update_xmltarget.
14406 (the_low_target): Add x86_linux_process_qsupported.
14408 * server.c (handle_query): Call target_process_qsupported.
14410 * target.h (target_ops): Add process_qsupported.
14411 (target_process_qsupported): New.
14413 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14415 * inferiors.c (add_thread): Set last_status kind to
14416 TARGET_WAITKIND_IGNORE.
14417 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14418 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14419 (linux_wait_1): Move `thread' local definition to block that uses
14420 it. Don't NULL initialize `event_child'.
14421 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14422 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14423 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14425 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14427 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14428 an extended waitstatus, or by a watchpoint.
14429 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14430 thread was stepping or has been stopped by a watchpoint.
14432 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14434 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14435 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14436 of another, then delete the previous, and validate all
14438 (validate_inserted_breakpoint): New.
14439 (delete_disabled_breakpoints): New.
14440 (validate_breakpoints): New.
14441 (check_mem_read): Validate breakpoints before trusting their
14442 shadow. Delete disabled breakpoints.
14443 (check_mem_write): Validate breakpoints before trusting they
14444 should be inserted. Delete disabled breakpoints.
14445 * mem-break.h (validate_breakpoints):
14446 * server.c (handle_query): Validate breakpoints when we see a
14449 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14451 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14452 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14453 if we could tell there's a GDB breakpoint at stop_pc.
14454 (need_step_over_p): Don't do a step over if we find a GDB
14455 breakpoint at the resume PC.
14457 * mem-break.c (struct raw_breakpoint): New.
14458 (enum bkpt_type): New type `gdb_breakpoint'.
14459 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14460 fields. New field `raw'.
14461 (find_raw_breakpoint_at): New.
14462 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14463 breakpoint instead.
14464 (set_breakpoint_at): Adjust.
14465 (delete_raw_breakpoint): New.
14466 (release_breakpoint): New.
14467 (delete_breakpoint): Rename to...
14468 (delete_breakpoint_1): ... this. Add proc parameter. Use
14469 release_breakpoint. Return ENOENT.
14470 (delete_breakpoint): Reimplement.
14471 (find_breakpoint_at): Delete.
14472 (find_gdb_breakpoint_at): New.
14473 (delete_breakpoint_at): Delete.
14474 (set_gdb_breakpoint_at): New.
14475 (delete_gdb_breakpoint_at): New.
14476 (gdb_breakpoint_here): New.
14477 (set_reinsert_breakpoint): Use release_breakpoint.
14478 (uninsert_breakpoint): Rename to ...
14479 (uninsert_raw_breakpoint): ... this.
14480 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14481 (reinsert_raw_breakpoint): Change parameter type to
14483 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14485 (check_breakpoints): Adjust. Use release_breakpoint.
14486 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14487 (breakpoint_inserted_here): Ditto.
14488 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14489 Don't trust the breakpoint's shadow if it is not inserted.
14490 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14491 (delete_all_breakpoints): Adjust.
14492 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14493 use delete_breakpoint_1.
14495 * mem-break.h (breakpoints_supported): Delete declaration.
14496 (set_gdb_breakpoint_at): Declare.
14497 (gdb_breakpoint_here): Declare.
14498 (delete_breakpoint_at): Delete.
14499 (delete_gdb_breakpoint_at): Declare.
14501 * server.h (struct raw_breakpoint): Forward declare.
14502 (struct process_info): New field `raw_breakpoints'.
14504 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14507 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14509 * linux-low.c (status_pending_p_callback): Fix comment.
14510 (linux_wait_for_event_1): Move most of the internal breakpoint
14511 handling from here...
14512 (linux_wait_1): ... to here.
14513 (count_events_callback): New.
14514 (select_singlestep_lwp_callback): New.
14515 (select_event_lwp_callback): New.
14516 (cancel_breakpoints_callback): New.
14517 (select_event_lwp): New.
14518 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14519 priority to all LWPs that have had events that should be reported
14520 to the client. Cancel breakpoints when about to reporting the
14521 event to the client, not while stopping lwps. No longer cancel
14522 finished single-steps here.
14523 (cancel_finished_single_step): Delete.
14524 (cancel_finished_single_steps): Delete.
14526 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14528 * mem-break.c (enum bkpt_type): New.
14529 (struct breakpoint): New field `type'.
14530 (set_breakpoint_at): Change return type to struct breakpoint
14531 pointer. Set type to `other_breakpoint' by default.
14532 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14533 in the breakpoint list.
14534 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14535 (reinsert_breakpoint): Rename to ...
14536 (reinsert_raw_breakpoint): ... this.
14537 (reinsert_breakpoints_at): Adjust.
14538 * mem-break.h (struct breakpoint): Declare.
14539 (set_breakpoint_at): Change return type to struct breakpoint
14542 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14544 * server.c (handle_query): Assign, not compare.
14546 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14548 Teach linux gdbserver to step-over-breakpoints.
14550 * linux-low.c (can_hardware_single_step): New.
14551 (supports_breakpoints): New.
14552 (handle_extended_wait): If stopping threads, read the stop pc of
14553 the new cloned LWP.
14555 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14556 low target doesn't support retrieving the PC.
14557 (add_lwp): Set last_resume_kind to resume_continue.
14558 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14559 (linux_attach): Don't clear stop_expected. Set the lwp's
14560 last_resume_kind to resume_stop.
14561 (linux_detach_one_lwp): Don't check for removed breakpoints.
14562 (check_removed_breakpoint): Delete.
14563 (status_pending_p): Rename to ...
14564 (status_pending_p_callback): ... this. Don't check for removed
14565 breakpoints. Don't consider threads that are stopped from GDB's
14567 (linux_wait_for_lwp): Always read the stop_pc here.
14568 (cancel_breakpoint): New.
14569 (step_over_bkpt): New global.
14570 (linux_wait_for_event_1): Implement stepping over breakpoints.
14571 (gdb_wants_lwp_stopped): New.
14572 (gdb_wants_all_stopped): New.
14573 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14574 single-step traps here. Store the thread's last reported target
14576 (send_sigstop): Don't clear stop_expected. Always set it,
14578 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14579 (cancel_finished_single_step): New.
14580 (cancel_finished_single_steps): New.
14581 (wait_for_sigstop): Don't cancel finished single-step traps here.
14582 (linux_resume_one_lwp): Don't check for removed breakpoints.
14583 Don't set `step' on non-hardware step archs.
14584 (linux_set_resume_request): Ignore resume_stop requests if already
14585 stopping or stopped. Set the lwp's last_resume_kind.
14586 (resume_status_pending_p): Don't check for removed breakpoints.
14587 (need_step_over_p): New.
14588 (start_step_over): New.
14589 (finish_step_over): New.
14590 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14591 requests. Clear the thread's last reported target waitstatus.
14592 Don't use the `suspended' flag. Don't consider pending breakpoints.
14593 (linux_resume): Start a step-over if necessary.
14594 (proceed_one_lwp): New.
14595 (proceed_all_lwps): New.
14596 (unstop_all_lwps): New.
14597 * linux-low.h (struct lwp_info): Rewrite comment for the
14598 `suspended' flag. Add the `stop_pc' field. Delete the
14599 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14600 Add `'last_resume_kind' and `need_step_over' fields.
14601 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14602 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14603 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14604 (set_raw_breakpoint_at): New.
14605 (set_breakpoint_at): Rewrite to use it.
14606 (reinsert_breakpoint_handler): Delete.
14607 (set_reinsert_breakpoint): New.
14608 (reinsert_breakpoint_by_bp): Delete.
14609 (delete_reinsert_breakpoints): New.
14610 (uninsert_breakpoint): Rewrite.
14611 (uninsert_breakpoints_at): New.
14612 (reinsert_breakpoint): Rewrite.
14613 (reinsert_breakpoints_at): New.
14614 (check_breakpoints): Rewrite.
14615 (breakpoint_here): New.
14616 (breakpoint_inserted_here): New.
14617 (check_mem_read): Adjust.
14618 * mem-break.h (breakpoints_supported, breakpoint_here)
14619 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14620 (reinsert_breakpoint_by_bp): Delete declaration.
14621 (delete_reinsert_breakpoints): Declare.
14622 (reinsert_breakpoint): Delete declaration.
14623 (reinsert_breakpoints_at): Declare.
14624 (uninsert_breakpoint): Delete declaration.
14625 (uninsert_breakpoints_at): Declare.
14626 (check_breakpoints): Adjust prototype.
14627 * server.h: Adjust include order.
14628 (struct thread_info): Declare here. Add a `last_status' field.
14630 2010-03-23 Michael Snyder <msnyder@vmware.com>
14632 * server.c (crc32): New function.
14633 (handle_query): Add handling for 'qCRC:' request.
14635 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14637 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14638 lwp had been stopped by a watchpoint.
14640 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14642 * server.h (internal_error): Declare.
14643 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14644 * utils.c (internal_error): New function.
14646 2010-03-15 Andreas Schwab <schwab@redhat.com>
14648 * configure.srv: Fix typo setting srv_regobj.
14650 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14652 * linux-low.c (fetch_register): Avoid passing a non string literal
14654 (usr_store_inferior_registers): Ditto.
14656 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14658 * linux-low.c (linux_write_memory): Bail out early if peeking
14661 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14663 * linux-low.h (struct lwp_info): New fields
14664 `stopped_by_watchpoint' and `stopped_data_address'.
14665 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14666 here, and cache them in the lwp object.
14667 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14669 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14671 (linux_stopped_by_watchpoint): Rewrite.
14672 (linux_stopped_data_address): Rewrite.
14674 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14676 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14677 switching the current inferior, not before.
14679 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14681 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14682 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14683 i386-linux.c and amd64-linux.c.
14684 (reg-i386.o): Removed.
14685 (reg-i386.c): Likewise.
14686 (reg-i386-linux.o): Likewise.
14687 (reg-i386-linux.c): Likewise.
14688 (reg-x86-64.o): Likewise.
14689 (reg-x86-64.c): Likewise.
14690 (reg-x86-64-linux.o): Likewise.
14691 (reg-x86-64-linux.c): Likewise.
14693 (i386.c): Likewise.
14694 (i386-linux.o): Likewise.
14695 (i386-linux.c): Likewise.
14696 (amd64.o): Likewise.
14697 (amd64.c): Likewise.
14698 (amd64-linux.o): Likewise.
14699 (amd64-linux.c): Likewise.
14701 * configure.srv (srv_i386_regobj): New.
14702 (srv_i386_linux_regobj): Likewise.
14703 (srv_amd64_regobj): Likewise.
14704 (srv_amd64_linux_regobj): Likewise.
14705 (srv_i386_32bit_xmlfiles): Likewise.
14706 (srv_i386_64bit_xmlfiles): Likewise.
14707 (srv_i386_xmlfiles): Likewise.
14708 (srv_amd64_xmlfiles): Likewise.
14709 (srv_i386_linux_xmlfiles): Likewise.
14710 (srv_amd64_linux_xmlfiles): Likewise.
14711 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14712 srv_xmlfiles to $srv_i386_xmlfiles.
14713 (i[34567]86-*-mingw32ce*): Likewise.
14714 (i[34567]86-*-mingw*): Likewise.
14715 (i[34567]86-*-nto*): Likewise.
14716 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14717 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14718 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14719 (x86_64-*-linux*): Likewise.
14721 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14722 (init_registers_amd64_linux): New.
14723 (x86_arch_setup): Replace init_registers_x86_64_linux with
14724 init_registers_amd64_linux.
14726 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14728 * configure.ac: Check for libdl. If it is not available link against
14729 static libthread_db.
14730 * configure: Regenerate.
14732 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14736 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14737 handing a read watchpoint.
14738 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14740 2010-02-12 Doug Evans <dje@google.com>
14742 * linux-low.c (linux_supports_tracefork_flag): Document.
14743 (linux_look_up_symbols): Add comment.
14745 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14747 * regcache.c (supply_register): Clear regcache if buf is NULL.
14749 2010-02-02 Nicolas Roche <roche@sourceware.org>
14750 Joel Brobecker <brobecker@adacore.com>
14752 * inferiors.c (find_inferior): Add function documentation.
14753 (unloaded_dll): Handle the case where the unloaded dll has not
14754 been previously registered in the dll list.
14756 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14758 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14759 (thumb2_breakpoint): New.
14760 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14762 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14764 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14765 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14768 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14770 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14772 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14774 * linux-s390-low.c (s390_collect_ptrace_register)
14775 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14777 2010-01-21 Doug Evans <dje@google.com>
14779 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14780 (PTRACE_ARG4_TYPE): New macro.
14781 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14782 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14783 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14784 (usr_store_inferior_registers): Ditto.
14785 (linux_read_memory, linux_write_memory): Ditto.
14786 (linux_test_for_tracefork): Ditto.
14788 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14789 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14791 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14793 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14796 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14798 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14799 prototype to take a regcache. Adjust.
14801 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14803 * regcache.h (struct thread_info): Forward declare.
14804 (struct regcache): New.
14805 (new_register_cache): Adjust prototype.
14806 (get_thread_regcache): Declare.
14807 (free_register_cache): Adjust prototype.
14808 (registers_to_string, registers_from_string): Ditto.
14809 (supply_register, supply_register_by_name, collect_register)
14810 (collect_register_as_string, collect_register_by_name): Ditto.
14811 * regcache.c (struct inferior_regcache_data): Delete.
14812 (get_regcache): Rename to ...
14813 (get_thread_regcache): ... this. Adjust. Switch inferior before
14814 fetching registers.
14815 (regcache_invalidate_one): Adjust.
14816 (regcache_invalidate): Fix prototype.
14817 (new_register_cache): Return the new register cache.
14818 (free_register_cache): Change prototype.
14819 (realloc_register_cache): Adjust.
14820 (registers_to_string): Change prototype to take a regcache. Adjust.
14821 (registers_from_string): Ditto.
14822 (register_data): Ditto.
14823 (supply_register): Ditto.
14824 (supply_register_by_name): Ditto.
14825 (collect_register): Ditto.
14826 (collect_register_as_string): Ditto.
14827 (collect_register_by_name): Ditto.
14828 * server.c (process_serial_event): Adjust.
14829 * linux-low.h (regset_fill_func, regset_store_func): Change
14831 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14833 * linux-low.c (get_stop_pc): Adjust.
14834 (check_removed_breakpoint): Adjust.
14835 (linux_wait_for_event): Adjust.
14836 (linux_resume_one_lwp): Adjust.
14837 (fetch_register): Add regcache parameter. Adjust.
14838 (usr_store_inferior_registers): Ditto.
14839 (regsets_fetch_inferior_registers): Ditto.
14840 (regsets_store_inferior_registers): Ditto.
14841 (linux_fetch_registers, linux_store_registers): Ditto.
14842 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14844 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14846 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14847 prototype to take a regcache.
14848 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14849 * remote-utils.c (convert_ascii_to_int, outreg)
14850 (prepare_resume_reply): Change prototype to take a regcache.
14852 * target.h (struct target_ops) <fetch_registers, store_registers>:
14853 Change prototype to take a regcache.
14854 (fetch_inferior_registers, store_inferior_registers): Change
14855 prototype to take a regcache. Adjust.
14856 * proc-service.c (ps_lgetregs): Adjust.
14857 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14858 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14859 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14860 take a regcache. Adjust.
14861 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14862 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14863 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14864 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14865 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14866 (cris_cannot_fetch_register):
14867 (cris_breakpoint_at): Change prototype to take a regcache.
14869 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14870 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14871 to take a regcache. Adjust.
14872 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14874 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14875 take a regcache. Adjust.
14876 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14877 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14878 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14879 * linux-mips-low.c (mips_get_pc):
14880 (mips_set_pc): Change prototype to take a regcache. Adjust.
14881 (mips_reinsert_addr): Adjust.
14882 (mips_collect_register): Change prototype to take a regcache.
14884 (mips_supply_register):
14885 (mips_collect_register_32bit, mips_supply_register_32bit)
14886 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14887 (mips_store_fpregset): Ditto.
14888 * linux-ppc-low.c (ppc_supply_ptrace_register)
14889 (ppc_supply_ptrace_register): Ditto.
14890 (parse_spufs_run): Adjust.
14891 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14892 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14893 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14894 take a regcache. Adjust.
14895 * linux-s390-low.c (s390_collect_ptrace_register)
14896 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14897 (s390_set_pc): Change prototype to take a regcache. Adjust.
14898 (s390_arch_setup): Adjust.
14899 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14900 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14901 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14902 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14903 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14905 (sparc_breakpoint_at): Adjust.
14906 * linux-xtensa-low.c (xtensa_fill_gregset):
14907 (xtensa_store_gregset):
14908 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14909 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14910 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14911 prototype to take a regcache. Adjust.
14912 * win32-arm-low.c (arm_fetch_inferior_register)
14913 (arm_store_inferior_register): Change prototype to take a
14915 * win32-i386-low.c (i386_fetch_inferior_register)
14916 (i386_store_inferior_register): Change prototype to take a
14918 * win32-low.c (child_fetch_inferior_registers)
14919 (child_store_inferior_registers): Change prototype to take a
14921 (win32_wait): Adjust.
14922 (win32_fetch_inferior_registers): Change prototype to take a
14924 (win32_store_inferior_registers): Adjust.
14925 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14926 store_inferior_register>: Change prototype to take a regcache.
14928 2010-01-20 Doug Evans <dje@google.com>
14930 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14932 (linux_wait_for_event1, linux_init_signals): Ditto.
14933 (W_STOPCODE): Provide definition if missing.
14935 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14937 * linux-low.c (linux_core_of_thread): New.
14938 (compare_ints, show_process, list_threads): New.
14939 (linux_qxfer_osdata): Report threads and cores.
14940 (linux_target_op): Register linux_core_of_thread.
14941 * remote-utils.c (prepare_resume_reply): Report the core.
14942 (buffer_xml_printf): Support %d specifier.
14943 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14945 (handle_query): Handle qXfer:threads. Announce availability
14947 * target.h (struct target_ops): New field core_of_thread.
14949 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14951 * Makefile.in (clean): Remove new generated files.
14952 (reg-s390.o, reg-s390.c): Remove rules.
14953 (reg-s390x.o, reg-s390x.c): Likewise.
14954 (s390-linux32.o, s390-linux32.c): Add rules.
14955 (s390-linux64.o, s390-linux64.c): Likewise.
14956 (s390x-linux64.o, s390x-linux64.c): Likewise.
14957 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14958 * linux-s390-low.c: Include <elf.h>.
14959 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14960 (init_registers_s390): Remove prototype.
14961 (init_registers_s390x): Likewise.
14962 (init_registers_s390_linux32): Add prototype.
14963 (init_registers_s390_linux64): Likewise.
14964 (init_registers_s390x_linux64): Likewise.
14965 (s390_num_regs_3264): New define.
14966 (s390_regmap_3264): New global variable.
14967 (s390_cannot_fetch_register): Remove obsolete check.
14968 (s390_cannot_store_register): Likewise.
14969 (s390_collect_ptrace_register): Handle upper/lower register halves.
14970 (s390_supply_ptrace_register): Likewise.
14971 (s390_fill_gregset): Update to register number changes.
14972 (s390_get_hwcap): New routine.
14973 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14974 Install appropriate regmap and register set.
14976 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14978 * server.c (gdbserver_version): Update copyright year to 2010.
14979 * gdbreplay.c (gdbreplay_version): Likewise.
14981 2009-12-28 Doug Evans <dje@google.com>
14983 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14984 elf/external.h. Include <elf.h> instead but only if necessary.
14986 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14988 * linux-low.c (linux_remove_process): Remove `detaching'
14989 parameter. Don't release/detach from thread_db here.
14990 (linux_kill): Release/detach from thread_db here, ...
14991 (linux_detach): ... and here, before actually detaching.
14992 (linux_wait_1): ... and here, when a process exits.
14993 * thread-db.c (any_thread_of): New.
14994 (thread_db_free): Switch the current inferior to a thread of the
14997 2009-12-21 Doug Evans <dje@google.com>
14999 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15001 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15002 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15003 warning ifndef __NR_tkill. Move setting of errno there too.
15004 Delete unnecessary resetting of errno after syscall.
15005 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15007 * configure.ac: Check for dladdr.
15008 * config.in: Regenerate.
15009 * configure: Regenerate.
15010 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15011 (try_thread_db_load): Update.
15013 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15015 2009-12-18 Doug Evans <dje@google.com>
15017 * event-loop.c: Include unistd.h if it exists.
15019 * linux-low.c (my_waitpid): Move definition away from being in
15020 between linux_tracefork_child/linux_test_for_tracefork.
15022 * gdb_proc_service.h (psaddr_t): Fix type.
15023 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15024 signature to match glibc.
15026 2009-12-16 Doug Evans <dje@google.com>
15028 * linux-low.c (linux_read_memory): Fix argument to read.
15030 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15032 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15033 events, don't leave current_inferior pointing at null.
15035 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15037 * win32-low.c (LOG): Delete.
15038 (OUTMSG): Output to stderr.
15039 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15040 on compile time LOG macro.
15041 (win32_wait): Fix debug output.
15043 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15045 * win32-low.c (win32_add_one_solib): If the dll name is
15046 "ntdll.dll", prepend the system directory to the dll path.
15048 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15050 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15052 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15053 Vladimir Prus <vladimir@codesourcery.com>
15055 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15056 * configure.ac: Check for __mcoldfire__ and set
15057 gdb_cv_m68k_is_coldfire.
15058 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15059 reg-cf.o and reg-m68k.o.
15060 * configure: Regenerated.
15062 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15064 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15065 Pass it to thread_db_free.
15066 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15067 proper `detaching' argument to linux_remove_process.
15068 * linux-low.h (thread_db_free): Add `detaching' parameter.
15069 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15071 (thread_db_free): Add `detaching' parameter. Only
15072 call td_ta_clear_event if detaching from process.
15074 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15076 * thread-db.c (thread_db_free): Fix typo.
15078 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15081 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15083 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15085 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15086 with an i686 compiler.
15087 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15089 * configure: Rebuilt.
15091 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15095 * server.c (handle_search_memory_1): Correct read_addr initialization
15096 in loop for searching subsequent chunks.
15098 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15100 * configure.ac: New --with-libthread-db option.
15101 * thread-db.c: Allow direct dependence on libthread_db.
15102 (thread_db_free): Adjust.
15103 * config.in: Regenerate.
15104 * configure: Likewise.
15106 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15109 * thread-db.c (attach_thread): New function.
15110 (maybe_attach_thread): Return success/failure.
15111 (find_new_threads_callback): Adjust.
15112 (thread_db_find_new_threads): Loop until no new threads.
15114 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15116 * proc-service.c (ps_lgetregs): Formatting.
15118 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15120 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15121 * configure.ac: Adjust.
15122 * linux-low.h (struct process_info_private): Move members to struct
15124 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15125 * linux-low.c (linux_remove_process): Adjust.
15126 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15127 * server.c (handle_query): Move code ...
15128 (handle_monitor_command): ... here. New function.
15129 * target.h (struct target_ops): New member.
15130 * thread-db.c (struct thread_db): New.
15131 (libthread_db_search_path): New variable.
15132 (thread_db_create_event, thread_db_enable_reporting)
15133 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15134 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15135 (try_thread_db_load_1, dladdr_to_soname): New functions.
15136 (try_thread_db_load, thread_db_load_search): New functions.
15137 (thread_db_init): Search for libthread_db.
15138 (thread_db_free): New function.
15139 (thread_db_handle_monitor_command): Likewise.
15140 * config.in: Regenerate.
15141 * configure: Regenerate.
15143 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15145 * spu-low.c (spu_kill): Wait for inferior to terminate.
15146 Call clear_inferiors.
15147 (spu_detach): Call clear_inferiors.
15149 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15151 * aclocal.m4: Regenerate.
15152 * config.in: Likewise.
15153 * configure: Likewise.
15155 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15157 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15158 (parse_spufs_run): New function.
15159 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15160 (ppc_breakpoint_at): Handle SPU breakpoints.
15162 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15164 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15165 (SPUFS_MAGIC): Define.
15166 (spu_enumerate_spu_ids): New function.
15167 (linux_qxfer_spu): New function.
15168 (linux_target_ops): Install linux_qxfer_spu.
15170 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15172 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15173 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15174 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15175 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15176 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15177 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15178 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15179 (init_registers_powerpc_cell32l): Add prototype.
15180 (init_registers_powerpc_cell64l): Likewise.
15181 (ppc_arch_setup): Detect Cell/B.E. architecture.
15183 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15185 * Makefile.in (datarootdir): New variable.
15187 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15189 * linux-low.c (linux_write_memory): Update debugging output.
15190 * Makefile.in (clean): Add new descriptions.
15191 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15192 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15193 * configure.srv: Add new files for arm*-*-linux*.
15194 * linux-arm-low.c: Add new declarations.
15195 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15196 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15197 (HWCAP_VFPv3D16): New.
15198 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15199 instead of __IWMMXT__.
15200 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15201 (arm_arch_setup): New.
15202 (target_regsets): Remove #ifdef. Add VFP regset.
15203 (the_low_target): Use arm_arch_setup.
15205 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15207 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15208 the main thread again.
15210 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15212 Adding Neutrino gdbserver.
15213 * configure: Regenerated.
15214 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15215 * configure.srv (i[34567]86-*-nto*): New target.
15216 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15217 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15218 (nto_comctrl) [__QNX__]: New function.
15219 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15221 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15223 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15226 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15227 Pedro Alves <pedro@codesourcery.com>
15229 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15230 don't support CONTEXT_EXTENDED_REGISTERS.
15231 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15232 (the_low_target): Install them.
15233 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15234 failing with ERROR_PIPE_NOT_CONNECTED.
15236 2009-06-30 Doug Evans <dje@google.com>
15237 Pierre Muller <muller@ics.u-strasbg.fr>
15239 Add h/w watchpoint support to x86-linux, win32-i386.
15240 * Makefile.in (SFILES): Add i386-low.c
15241 (i386_low_h): Define.
15242 (i386-low.o): Add dependencies.
15243 (linux-x86-low.o): Add i386-low.h dependency.
15244 (win32-i386-low.o): Ditto.
15245 * i386-low.c: New file.
15246 * i386-low.h: New file.
15247 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15248 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15249 * linux-low.c (linux_add_process): Initialize arch_private.
15250 (linux_remove_process): Free arch_private.
15251 (add_lwp): Initialize arch_private.
15252 (delete_lwp): Free arch_private.
15253 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15255 * linux-low.h (process_info_private): New member arch_private.
15256 (lwp_info): New member arch_private.
15257 (linux_target_ops): New members new_process, new_thread,
15259 (ptid_of): New macro.
15260 * linux-x86-low.c: Include stddef.h, i386-low.h.
15261 (arch_process_info): New struct.
15262 (arch_lwp_info): New struct.
15263 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15264 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15265 (i386_dr_low_get_status): New function.
15266 (x86_insert_point, x86_remove_point): New functions.
15267 (x86_stopped_by_watchpoint): New function.
15268 (x86_stopped_data_address): New function.
15269 (x86_linux_new_process, x86_linux_new_thread): New functions.
15270 (x86_linux_prepare_to_resume): New function.
15271 (the_low_target): Add entries for insert_point, remove_point,
15272 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15274 * server.c (debug_hw_points): New global.
15275 (monitor_show_help): Document set debug-hw-points.
15276 (handle_query): Process "set debug-hw-points".
15277 * server.h (debug_hw_points): Declare.
15278 (paddress): Declare.
15279 * utils.c (NUMCELLS, CELLSIZE): New macros.
15280 (get_sell, xsnprintf, paddress): New functions.
15281 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15282 remove_point, stopped_by_watchpoint, stopped_data_address.
15283 * win32-i386-low.c: Include i386-low.h.
15284 (debug_reg_state): Replaces dr.
15285 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15286 (i386_dr_low_get_status): New function.
15287 (i386_insert_point, i386_remove_point): New functions.
15288 (i386_stopped_by_watchpoint): New function.
15289 (i386_stopped_data_address): New function.
15290 (i386_initial_stuff): Update.
15291 (get_thread_context,set_thread_context,i386_thread_added): Update.
15292 (the_low_target): Add entries for insert_point,
15293 remove_point, stopped_by_watchpoint, stopped_data_address.
15294 * win32-low.c (win32_insert_watchpoint): New function.
15295 (win32_remove_watchpoint): New function.
15296 (win32_stopped_by_watchpoint): New function.
15297 (win32_stopped_data_address): New function.
15298 (win32_target_ops): Add entries for insert_watchpoint,
15299 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15300 * win32-low.h (win32_target_ops): New members insert_point,
15301 remove_point, stopped_by_watchpoint, stopped_data_address.
15303 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15305 * server.c (process_serial_event): Re-return unsupported, not
15306 error, if the type isn't recognized. Re-allow supporting only
15307 insert or remove packets. Also call require_running for
15308 breakpoints. Add missing break statement to default case. Tidy.
15309 * target.h (struct target_ops): Rename insert_watchpoint to
15310 insert_point, and remove_watchpoint to remove_point.
15312 * linux-low.h (struct linux_target_ops): Likewise.
15313 * linux-low.c (linux_insert_watchpoint): Rename to ...
15314 (linux_insert_point): ... this. Adjust.
15315 (linux_remove_watchpoint): Rename to ...
15316 (linux_remove_point): ... this. Adjust.
15317 (linux_target_ops): Adjust.
15318 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15319 (cris_insert_point): ... this.
15320 (cris_remove_watchpoint): Rename to ...
15321 (cris_remove_point): ... this.
15322 (the_low_target): Adjust.
15324 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15326 * server.c (handle_v_kill): Pass signal_pid to
15327 kill_inferior if multi_process is zero.
15329 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15331 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15332 * target.h (target_ops): Comment for *_watchpoint to make it clear
15333 the functions can get types '0' and '1'.
15335 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15337 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15338 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15339 * regcache.c (get_regcache): Likewise.
15340 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15341 * win32-low.c (child_fetch_inferior_registers): Remove check for
15344 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15345 Pedro Alves <pedro@codesourcery.com>
15347 * target.h (struct target_ops) <supports_multi_process>: New
15349 (target_supports_multi_process): New.
15350 * server.c (handle_query): Even if GDB reports support, only
15351 enable multi-process if the target also supports it. Report
15352 multi-process support only if the target backend supports it.
15353 * linux-low.c (linux_supports_multi_process): New function.
15354 (linux_target_ops): Install it as target_supports_multi_process
15357 2009-05-24 Doug Evans <dje@google.com>
15359 Global renaming of find_thread_pid to find_thread_ptid.
15360 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15361 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15362 All callers updated.
15364 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15365 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15368 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15369 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15370 (linux_resume_one_lwp): Ditto.
15372 2009-05-23 Doug Evans <dje@google.com>
15374 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15375 from struct inferior_list_entry * to struct lwp_info *.
15376 All callers updated.
15378 2009-05-13 Doug Evans <dje@google.com>
15380 * linux-x86-low.c: Don't include assert.h.
15381 (x86_siginfo_fixup): Use fatal, not assert.
15382 (x86_arch_setup): Fix comment.
15384 2009-05-12 Doug Evans <dje@google.com>
15386 Biarch support for i386/amd64 gdbserver.
15387 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15388 Add linux-x86-low.c.
15389 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15390 (linux-x86-low.o): Add.
15391 * linux-x86-64-low.c: Delete.
15392 * linux-i386-low.c: Delete.
15393 * linux-x86-low.c: New file.
15394 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15396 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15398 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15399 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15400 (linux_child_pid_to_exec_file): New function.
15401 (elf_64_header_p, elf_64_file_p): New functions.
15402 (siginfo_fixup): New function.
15403 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15404 give target a chance to convert layout.
15405 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15406 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15408 2009-05-07 Doug Evans <dje@google.com>
15410 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15411 (regsets_store_inferior_registers): Ditto.
15413 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15417 * linux-low.c (must_set_ptrace_flags): Delete.
15418 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15420 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15421 `lwp->must_set_ptrace_flags' instead.
15422 (linux_wait_for_event_1): Set ptrace options here.
15423 (linux_wait_1): ... not here.
15425 2009-04-30 Doug Evans <dje@google.com>
15427 * inferiors.c (started_inferior_callback): New function.
15428 (attached_inferior_callback): New function.
15429 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15430 * server.c (print_started_pid, print_attached_pid): New functions.
15431 (detach_or_kill_for_exit): New function.
15432 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15433 * server.h (have_started_inferiors_p): Declare.
15434 (have_attached_inferiors_p): Declare.
15436 * inferiors.c (remove_process): Fix memory leak, free process.
15437 * linux-low.c (linux_remove_process): New function.
15438 (linux_kill): Call it instead of remove_process.
15439 (linux_detach, linux_wait_1): Ditto.
15441 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15443 * configure.srv: Add x86 Windows CE target.
15445 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15447 * inferiors.c (get_thread_process): Make global.
15448 * server.h (get_thread_process): Add prototype.
15449 * thread-db.c (find_one_thread): Use get_thread_process
15450 instead of current_process.
15451 (thread_db_get_tls_address): Do not crash if called when
15452 thread layer is not yet initialized.
15454 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15456 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15457 * spu-low.c (current_tid): Rename to ...
15458 (current_ptid): ... this.
15459 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15460 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15461 ptid_get_lwp (current_ptid) instead of current_tid.
15462 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15463 instead of current_tid. Use find_process_pid to verify pid
15464 argument is valid. Pass proper argument to remove_process.
15465 (spu_thread_alive): Compare current_ptid instead of current_tid.
15466 (spu_resume): Likewise.
15468 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15470 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15473 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15475 Implement the multiprocess extensions, and add linux multiprocess
15478 * server.h (ULONGEST): Declare.
15479 (struct ptid, ptid_t): New.
15480 (minus_one_ptid, null_ptid): Declare.
15481 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15482 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15483 (struct inferior_list_entry): Change `id' type from unsigned from
15485 (struct sym_cache, struct breakpoint, struct
15486 process_info_private): Forward declare.
15487 (struct process_info): Declare.
15488 (current_process): Declare.
15489 (all_processes): Declare.
15490 (initialize_inferiors): Declare.
15491 (add_thread): Adjust to use ptid_t.
15492 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15493 (add_process, remove_process, find_thread_pid): Declare.
15494 (find_inferior_id): Adjust to use ptid_t.
15495 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15496 (multi_process): Declare.
15497 (push_event): Adjust to use ptid_t.
15498 (read_ptid, write_ptid): Declare.
15499 (prepare_resume_reply): Adjust to use ptid_t.
15500 (clear_symbol_cache): Declare.
15501 * inferiors.c (all_processes): New.
15502 (null_ptid, minus_one_ptid): New.
15503 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15504 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15505 (add_thread): Change unsigned long to ptid. Remove gdb_id
15507 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15508 (gdb_id_to_thread): Rename to ...
15509 (find_thread_pid): ... this. Change unsigned long to ptid.
15510 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15511 (loaded_dll, pull_pid_from_list): Adjust.
15512 (add_process, remove_process, find_process_pid)
15513 (get_thread_process, current_process, initialize_inferiors): New.
15514 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15515 (struct target_waitstatus) <related_pid>: Ditto.
15516 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15517 return type to int.
15518 (struct target_ops) <join>: Add `pid' argument.
15519 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15520 (struct target_ops) <wait>: Add `ptid' field. Change return type
15522 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15523 (mywait): Add `ptid' argument. Change return type to ptid_t.
15524 (target_pid_to_str): Declare.
15525 * target.c (set_desired_inferior): Adjust to use ptids.
15526 (mywait): Add new `ptid' argument. Adjust.
15527 (target_pid_to_str): New.
15528 * mem-break.h (free_all_breakpoints): Declare.
15529 * mem-break.c (breakpoints): Delelete.
15530 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15531 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15532 to use per-process breakpoint list.
15533 (free_all_breakpoints): New.
15534 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15535 (symbol_cache, all_symbols_looked_up): Delete.
15537 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15539 (prepare_resume_reply): Change ptid argument's type from unsigned
15540 long to ptid_t. Adjust. Implement W;process and X;process.
15541 (free_sym_cache, clear_symbol_cache): New.
15542 (look_up_one_symbol): Adjust to per-process symbol cache. *
15543 * server.c (cont_thread, general_thread, step_thread): Change type
15545 (attached): Delete.
15546 (multi_process): New.
15547 (last_ptid): Change type to ptid_t.
15548 (struct vstop_notif) <ptid>: Change type to ptid_t.
15549 (queue_stop_reply, push_event): Change `ptid' argument's type to
15551 (discard_queued_stop_replies): Add `pid' argument.
15552 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15553 changes. Don't reference the `attached' global.
15554 (attach_inferior): Adjust to mywait interface changes.
15555 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15556 features. Handle and report "multiprocess+". Handle
15558 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15560 (handle_v_kill): New.
15561 (handle_v_stopped): Adjust to use target_pid_to_str.
15562 (handle_v_requests): Allow multiple attaches and runs when
15563 multiprocess extensions are in effect. Handle "vKill".
15564 (myresume): Adjust to use ptids.
15565 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15566 (handle_status): Adjust to discard_queued_stop_replies interface
15568 (first_thread_of, kill_inferior_callback)
15569 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15570 (main): Call initialize_inferiors. Adjust to use ptids, killing
15571 and detaching from all inferiors. Handle multiprocess packet
15573 * linux-low.h: Include gdb_proc_service.h.
15574 (struct process_info_private): New.
15575 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15576 <lwpid_of>: Use ptid_get_lwp.
15577 (get_lwp_thread): Adjust.
15578 (struct lwp_info): Add `dead' member.
15579 (find_lwp_pid): Declare.
15580 * linux-low.c (thread_db_active): Delete.
15581 (new_inferior): Adjust comment.
15582 (inferior_pid): Delete.
15583 (linux_add_process): New.
15584 (handle_extended_wait): Adjust.
15585 (add_lwp): Change unsigned long to ptid.
15586 (linux_create_inferior): Add process to processes table. Adjust
15587 to use ptids. Don't set new_inferior here.
15588 (linux_attach_lwp): Rename to ...
15589 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15590 it. Adjust to use ptids.
15591 (linux_attach_lwp): New.
15592 (linux_attach): Add process to processes table. Don't set
15594 (struct counter): New.
15595 (second_thread_of_pid_p, last_thread_of_process_p): New.
15596 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15597 multiple processes.
15598 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15599 processes. Remove process from process table.
15600 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15601 to multiple processes.
15602 (any_thread_of): New.
15603 (linux_detach): Add `pid' argument, and handle it. Remove process
15604 from processes table.
15605 (linux_join): Add `pid' argument. Handle it.
15606 (linux_thread_alive): Change unsighed long argument to ptid_t.
15607 Consider dead lwps as not being alive.
15608 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15609 threads we're not interested in.
15610 (same_lwp, find_lwp_pid): New.
15611 (linux_wait_for_lwp): Change `pid' argument's type from int to
15613 (linux_wait_for_event): Rename to ...
15614 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15615 from int to ptid_t. Adjust.
15616 (linux_wait_for_event): New.
15617 (linux_wait_1): Add `ptid' argument. Change return type to
15618 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15619 that exit from the process table.
15620 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15622 (mark_lwp_dead): New.
15623 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15624 stopping all threads, mark its main lwp as dead.
15625 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15627 (fetch_register, usr_store_inferior_registers)
15628 (regsets_fetch_inferior_registers)
15629 (regsets_store_inferior_registers, linux_read_memory)
15630 (linux_write_memory): Inline `inferior_pid'.
15631 (linux_look_up_symbols): Adjust to use per-process
15632 `thread_db_active'.
15633 (linux_request_interrupt): Adjust to use ptids.
15634 (linux_read_auxv): Inline `inferior_pid'.
15635 (initialize_low): Don't reference thread_db_active.
15636 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15637 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15638 (ps_getpid): Return the pid of the current inferior.
15639 * thread-db.c (proc_handle, thread_agent): Delete.
15640 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15642 (find_one_thread): Change argument type to ptid_t. Adjust to
15644 (maybe_attach_thread): Adjust to per-process data and ptids.
15645 (thread_db_find_new_threads): Ditto.
15646 (thread_db_init): Ditto.
15647 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15648 processes table. Adjust to use ptids.
15649 (spu_kill, spu_detach): Adjust interface. Remove process from
15651 (spu_join, spu_thread_alive): Adjust interface.
15652 (spu_wait): Adjust interface. Remove process from processes
15653 table. Adjust to use ptids.
15654 * win32-low.c (current_inferior_tid): Delete.
15655 (current_inferior_ptid): New.
15656 (debug_event_ptid): New.
15657 (thread_rec): Take a ptid. Adjust.
15658 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15659 (child_delete_thread): Ditto.
15660 (do_initial_child_stuff): Add `attached' argument. Add process to
15662 (child_fetch_inferior_registers, child_store_inferior_registers):
15664 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15665 (win32_attach): Pass 1 to do_initial_child_stuff.
15666 (win32_kill): Adjust interface. Remove process from processes
15668 (win32_detach): Ditto.
15669 (win32_join): Adjust interface.
15670 (win32_thread_alive): Take a ptid.
15671 (win32_resume): Adjust to use ptids.
15672 (get_child_debug_event): Ditto.
15673 (win32_wait): Adjust interface. Remove exiting process from
15676 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15678 Non-stop mode support.
15680 * server.h (non_stop): Declare.
15681 (gdb_client_data, handler_func): Declare.
15682 (delete_file_handler, add_file_handler, start_event_loop):
15684 (handle_serial_event, handle_target_event, push_event)
15685 (putpkt_notif): Declare.
15686 * target.h (enum resume_kind): New.
15687 (struct thread_resume): Replace `step' field by `kind' field.
15688 (TARGET_WNOHANG): Define.
15689 (struct target_ops) <wait>: Add `options' argument.
15690 <supports_non_stop, async, start_non_stop>: New fields.
15691 (target_supports_non_stop, target_async): New.
15692 (start_non_stop): Declare.
15693 (mywait): Add `options' argument.
15694 * target.c (mywait): Add `options' argument. Print child exit
15695 notifications here.
15696 (start_non_stop): New.
15697 * server.c (non_stop, own_buf, mem_buf): New globals.
15698 (struct vstop_notif): New.
15699 (notif_queue): New global.
15700 (queue_stop_reply, push_event, discard_queued_stop_replies)
15701 (send_next_stop_reply): New.
15702 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15704 (attach_inferior): In non-stop mode, don't wait for the target
15706 (handle_general_set): Handle QNonStop.
15707 (handle_query): When handling qC, return the current general
15708 thread, instead of the first thread of the list.
15709 (handle_query): If the backend supports non-stop mode, include
15710 QNonStop+ in the qSupported query response.
15711 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15713 (handle_v_attach, handle_v_run): Handle non-stop mode.
15714 (handle_v_stopped): New.
15715 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15716 (myresume): Adjust to use resume_kind. Handle non-stop.
15717 (queue_stop_reply_callback): New.
15718 (handle_status): Handle non-stop mode.
15719 (main): Clear non_stop flag on reconnection. Use the event-loop.
15720 Refactor serial protocol handling from here ...
15721 (process_serial_event): ... to this new function. When GDB
15722 selects any thread, select one here. In non-stop mode, wait until
15723 GDB acks all pending events before exiting.
15724 (handle_serial_event, handle_target_event): New.
15725 * remote-utils.c (remote_open): Install remote_desc in the event
15727 (remote_close): Remove remote_desc from the event loop.
15728 (putpkt_binary): Rename to...
15729 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15730 (putpkt_binary): New as wrapper around putpkt_binary_1.
15731 (putpkt_notif): New.
15732 (prepare_resume_reply): In non-stop mode, don't change the
15734 * event-loop.c: New.
15735 * Makefile.in (OBJ): Add event-loop.o.
15736 (event-loop.o): New rule.
15738 * linux-low.h (pid_of): Moved here.
15740 (get_lwp_thread): Use lwpid_of.
15741 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15742 * linux-low.c (pid_of): Delete.
15743 (inferior_pid): Use lwpid_of.
15744 (linux_event_pipe): New.
15745 (target_is_async_p): New.
15747 (handle_extended_wait): Use lwpid_of.
15748 (add_lwp): Don't set lwpid field.
15749 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15750 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15751 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15752 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15753 first. Adjust to linux_wait_for_event interface changes. Use
15755 (linux_detach): Don't delete the main lwp here.
15756 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15757 (status_pending_p): Don't consider explicitly suspended lwps.
15758 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15759 pointer. Add OPTIONS argument. Change return type to int. Use
15760 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15761 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15762 pointer. Add status pointer argument. Return a pid instead of a
15763 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15764 changes. In non-stop mode, don't switch to a random thread.
15765 (linux_wait): Rename to...
15766 (linux_wait_1): ... this. Add target_options argument, and handle
15767 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15768 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15769 clean exit and signal exit code. Don't stop all threads in
15770 non-stop mode. In all-stop mode, only stop all threads when
15771 reporting a stop to GDB. Handle explicit thread stop requests.
15772 (async_file_flush, async_file_mark): New.
15774 (send_sigstop): Use lwpid_of.
15775 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15776 interface changes. In non-stop mode, don't switch to a random
15778 (linux_resume_one_lwp): Use lwpid_of.
15779 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15780 (linux_resume_one_thread): ... this. Handle resume_stop. In
15781 non-stop mode, don't look for pending flag in all threads.
15782 (resume_status_pending_p): Don't consider explicitly suspended
15784 (my_waitpid): Reimplement. Emulate __WALL.
15785 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15787 (sigchld_handler, linux_supports_non_stop, linux_async)
15788 (linux_start_non_stop): New.
15789 (linux_target_ops): Register linux_supports_non_stop, linux_async
15790 and linux_start_non_stop.
15791 (initialize_low): Install SIGCHLD handler.
15792 * thread-db.c (thread_db_create_event, find_one_thread)
15793 (thread_db_get_tls_address): Use lwpid_of.
15794 * win32-low.c (win32_detach): Adjust to use resume_kind.
15795 (win32_wait): Add `options' argument.
15796 * spu-low.c (spu_resume): Adjust to use resume_kind.
15797 (spu_wait): Add `options' argument.
15799 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15801 Decouple target code from remote protocol.
15803 * target.h (enum target_waitkind): New.
15804 (struct target_waitstatus): New.
15805 (struct target_ops) <wait>: Return an unsigned long. Take a
15806 target_waitstatus pointer instead of a char pointer.
15807 (mywait): Likewise.
15808 * target.c (mywait): Change prototype to return an unsigned long.
15809 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15810 * server.h (thread_from_wait, old_thread_from_wait): Delete
15812 (prepare_resume_reply): Change prototype to take a
15814 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15815 (last_status, last_ptid): New.
15816 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15817 pid instead of a signal.
15818 (attach_inferior): Remove "status" and "signal" parameters.
15820 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15822 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15823 (handle_v_requests, myresume): Remove "status" and "signal"
15824 parameters. Adjust.
15825 (handle_status): New.
15826 (main): Delete local `status'. Adjust.
15827 * remote-utils.c: Include target.h.
15828 (prepare_resume_reply): Change prototype to take a
15829 target_waitstatus. Adjust.
15831 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15833 * spu-low.c (spu_wait): Adjust.
15834 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15836 (win32_wait): Adjust.
15838 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15840 * target.h (struct thread_resume): Delete leave_stopped member.
15841 (struct target_ops): Add a `n' argument to the `resume' callback.
15842 * server.c (start_inferior): Adjust.
15843 (handle_v_cont, myresume): Adjust.
15844 * linux-low.c (check_removed_breakpoint): Adjust to resume
15845 interface change, and to removed leave_stopped field.
15846 (resume_ptr): Delete.
15847 (struct thread_resume_array): New.
15848 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15849 resume interface change.
15850 (linux_continue_one_thread, linux_queue_one_thread)
15851 (resume_status_pending_p): Check if the resume field is NULL
15852 instead of checking the leave_stopped member.
15853 (linux_resume): Adjust to the target resume interface change.
15854 * spu-low.c (spu_resume): Adjust to the target resume interface
15856 * win32-low.c (win32_detach, win32_resume): Ditto.
15858 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15860 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15862 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15864 (linux_continue_one_thread): Only preserve the stepping flag if
15865 there's a pending breakpoint.
15867 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15869 * server.c (main): After the inferior having exited, call
15870 remote_close before exiting gdbserver.
15872 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15874 Fix size of FPSCR in Power 7 processors.
15875 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15876 (PPC_FEATURE_HAS_DFP): New #define.
15877 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15880 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15882 * server.c (handle_query) Whitespace and formatting.
15884 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15886 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15887 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15888 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15889 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15890 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15891 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15892 Makefile.in, configure.ac: Fix whitespace throughout.
15893 * configure: Regenerate.
15895 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15897 * inferiors.c (find_inferior): Make it safe for the callback
15898 function to delete the currently iterated inferior.
15900 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15902 * Makefile.in (linuw_low_h): Move higher.
15903 (thread-db.o): Depend on $(linux_low_h).
15905 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15907 Rename "process" to "lwp" throughout.
15909 * linux-low.c (all_processes): Rename to...
15910 (all_lwps): ... this.
15911 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15912 (add_process): Rename to ...
15913 (add_lwp): ... this. Adjust.
15914 (linux_create_inferior): Adjust.
15915 (linux_attach_lwp): Adjust.
15916 (linux_attach): Adjust.
15917 (linux_kill_one_process): Rename to ...
15918 (linux_kill_one_lwp): ... this. Adjust.
15919 (linux_kill): Adjust.
15920 (linux_detach_one_process): Rename to ...
15921 (linux_detach_one_lwp): ... this. Adjust.
15922 (linux_detach): Adjust.
15923 (check_removed_breakpoint): Adjust.
15924 (status_pending_p): Adjust.
15925 (linux_wait_for_process): Rename to ...
15926 (linux_wait_for_lwp): ... this. Adjust.
15927 (linux_wait_for_event): Adjust.
15928 (send_sigstop): Adjust.
15929 (wait_for_sigstop): Adjust.
15930 (stop_all_processes): Rename to ...
15931 (stop_all_lwps): ... this.
15932 (linux_resume_one_process): Rename to ...
15933 (linux_resume_one_lwp): ... this. Adjust.
15934 (linux_set_resume_request, linux_continue_one_thread)
15935 (linux_queue_one_thread, resume_status_pending_p)
15936 (usr_store_inferior_registers, regsets_store_inferior_registers)
15937 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15939 * linux-low.h (get_process): Rename to ...
15940 (get_lwp): ... this. Adjust.
15941 (get_thread_process): Rename to ...
15942 (get_thread_lwp): ... this. Adjust.
15943 (get_process_thread): Rename to ...
15944 (get_lwp_thread): ... this. Adjust.
15945 (struct process_info): Rename to ...
15946 (struct lwp_info): ... this.
15947 (all_processes): Rename to ...
15948 (all_lwps): ... this.
15949 * proc-service.c (ps_lgetregs): Adjust.
15950 * thread-db.c (thread_db_create_event, find_one_thread)
15951 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15953 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15955 * server.c (handle_query): Handle "qAttached".
15957 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15959 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15960 GPLv3, update license URL.
15962 2009-03-01 Doug Evans <dje@google.com>
15964 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15965 (server_h): Add gdb_signals.h.
15966 (signals.o): Update.
15967 * server.h (target_signal_from_host,target_signal_to_host_p)
15968 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15970 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15972 * remote-utils.c (getpkt): Also generate remote-debug
15973 information if noack_mode is set.
15975 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15977 * server.c (handle_query): Report qXfer:siginfo:read and
15978 qXfer:siginfo:write as supported and handle them.
15979 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15980 * linux-low.c (linux_xfer_siginfo): New.
15981 (linux_target_ops): Set it.
15983 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15985 * server.c (gdbserver_usage): Mention --remote-debug.
15986 (main): Accept '--remote-debug' switch.
15988 2009-01-18 Doug Evans <dje@google.com>
15990 * regcache.c (new_register_cache): No need to check result of xcalloc.
15991 * server.c (handle_search_memory): Back out calls to xmalloc,
15992 result is checked and error is returned to user upon failure.
15993 (handle_query): Ditto. Add more checks for result of malloc.
15994 (handle_v_cont): Check result of malloc, report error back to
15996 (handle_v_run): Ditto. Call freeargv.
15997 * server.h (freeargv): Declare.
15998 * utils.c (freeargv): New fn.
16000 2009-01-15 Doug Evans <dje@google.com>
16002 * gdbreplay.c (perror_with_name): Make arg const char *.
16003 * server.h (target_signal_to_name): Make return type const char *.
16004 * thread-db.c (thread_db_err_str): Make return type const char *.
16005 * utils.c (perror_with_name): Make arg const char *.
16007 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16009 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16010 when handling a EXIT_PROCESS_DEBUG_EVENT.
16012 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16014 * gdbreplay.c (gdbreplay_version): Update copyright year.
16015 * server.c (gdbserver_version): Likewise.
16017 2009-01-05 Doug Evans <dje@google.com>
16019 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16020 (handle_extended_wait): Improve comment.
16022 2008-12-13 Doug Evans <dje@google.com>
16024 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16025 * server.h (ATTR_MALLOC): New macro.
16026 (xmalloc,xcalloc,xstrdup): Declare.
16027 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16028 * inferiors.c: Ditto.
16029 * linux-low.c: Ditto.
16030 * mem-break.c: Ditto.
16031 * regcache.c: Ditto.
16032 * remote-utils.c: Ditto.
16035 * win32-low.c: Ditto.
16037 2008-12-12 Doug Evans <dje@google.com>
16039 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16040 in debugging printf.
16042 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16044 2008-12-09 Doug Evans <dje@google.com>
16046 * linux-low.h (struct process_info): Delete member tid, unused.
16047 * thread-db.c (find_one_thread): Update.
16048 (maybe_attach_thread): Update.
16050 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16052 * target.h (struct target_ops): Add qxfer_osdata member.
16053 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16055 (linux_qxfer_osdata): New functions.
16056 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16058 * server.c (handle_query): Handle "qXfer:osdata:read:".
16059 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16060 (buffer_xml_printf): New functions.
16061 * server.h (struct buffer): New.
16062 (buffer_grow_str, buffer_grow_str0): New macros.
16063 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16064 (buffer_xml_printf): Declare.
16066 2008-11-24 Doug Evans <dje@google.com>
16068 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16070 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16072 * server.c (handle_v_run): Always use the supplied argument list.
16074 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16076 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16077 (xtensa_regmap_table): Add entry for scompare1.
16079 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16081 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16082 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16083 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16084 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16085 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16086 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16087 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16088 XML target descriptions.
16089 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16090 when inferior is running on an ISA 2.05 or later processor. Add
16091 special case to return offset for full 64-bit slot of FPSCR when
16094 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16096 * Makefile.in (SFILES, clean): Added sparc64 files.
16097 (reg-sparc64.o, reg-sparc64.c): New.
16098 * configure.srv (sparc*-*-linux*): New configuration.
16099 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16100 syscall arguments for SPARC.
16101 (regsets_store_inferior_registers): Likewise.
16102 * linux-sparc-low.c: New file.
16104 2008-10-21 Doug Evans <dje@google.com>
16106 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16107 (READLINE_DIR,READLINE_DEP): Delete.
16108 (INTERNAL_CFLAGS): Update.
16109 (LINTFLAGS): Update.
16111 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16113 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16114 whole argv from the last run, not just argv[0].
16116 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16118 * regcache.c (new_register_cache): Return NULL if the register
16119 cache size isn't known yet.
16120 (free_register_cache): Avoid dereferencing a NULL regcache.
16122 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16124 * configure.srv: Merge MIPS and MIPS64.
16126 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16128 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16130 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16132 * Makefile.in: Add required vsx dependencies.
16134 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16135 Declare init_registers_powerpc_vsx32l.
16136 Declare init_registers_powerpc_vsx64l.
16137 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16138 (ppc_arch_setup): Check for VSX in hwcap.
16139 (ppc_fill_vsxregset): New function.
16140 (ppc_store_vsxregset): New function.
16141 Add new VSX entry in regset_info target_regsets.
16143 * configure.srv: Add new VSX dependencies.
16145 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16147 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16148 (remote_open): Set or clear transport_is_reliable.
16149 (putpkt_binary): Don't expect acks in noack mode.
16150 (getpkt): Don't send ack/nac in noack mode.
16151 * server.c (handle_general_set): Handle QStartNoAckMode.
16152 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16154 (main): Reset noack_mode on every connection.
16155 * server.h (noack_mode): Declare.
16157 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16159 * Makefile.in (GDBREPLAY_OBS): New variable.
16160 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16162 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16163 Daniel Jacobowitz <dan@codesourcery.com>
16165 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16166 (usr_store_inferior_registers): Likewise.
16167 (regsets_store_inferior_registers): Likewise.
16169 2008-07-31 Rolf Jansen <rj@surtec.com>
16170 Pedro Alves <pedro@codesourcery.com>
16172 * configure.ac: Check for memmem declaration.
16173 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16174 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16175 (disable_packet_qfThreadInfo): Unconditionally compile.
16176 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16177 * configure, config.in: Regenerate.
16179 2008-07-28 Doug Kwan <dougkwan@google.com>
16181 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16182 (linux_write_memory): Remove declaration of errno.
16184 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16186 * linux-low.c (handle_extended_wait): Do not use "status"
16187 variable uninitialized.
16189 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16191 * server.c (handle_v_attach): Inhibit reporting dll changes.
16193 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16195 * remote-utils.c (prepare_resume_reply): If requested, don't
16196 output "thread:TID" in the T stop reply.
16198 * server.c (disable_packet_vCont, disable_packet_Tthread)
16199 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16200 (handle_query): If requested, disable support for qC, qfThreadInfo
16202 (handle_v_requests): If requested, disable support for vCont.
16203 (gdbserver_show_disableable): New.
16204 (main): Handle --disable-packet and --disable-packet=LIST.
16206 * server.h (disable_packet_vCont, disable_packet_Tthread)
16207 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16209 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16211 * server.c (gdbserver_usage): Mention --version.
16213 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16215 * Makefile.in (gdbreplay.o): New rule.
16217 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16219 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16220 message, not gdbserver.
16222 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16223 Nathan Sidwell <nathan@codesourcery.com>
16224 Joseph Myers <joseph@codesourcery.com>
16226 * acinclude.m4: Include ../../config/acx.m4.
16227 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16228 * configure, config.in: Regenerate.
16229 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16230 * server.c (gdbserver_version): Print PKGVERSION.
16231 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16232 (main): Adjust gdbserver_usage calls.
16233 * gdbreplay.c (version, host_name): Add declarations.
16234 (gdbreplay_version, gdbreplay_usage): New.
16235 (main): Accept --version and --help options.
16237 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16239 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16240 (arm_breakpoint_at): Handle Thumb.
16241 (the_low_target): Add comment.
16243 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16245 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16247 2008-05-09 Doug Evans <dje@google.com>
16249 * server.h (decode_search_memory_packet): Declare.
16250 * remote-utils.c (decode_search_memory_packet): New fn.
16251 * server.c (handle_search_memory_1): New fn.
16252 (handle_search_memory): New fn.
16253 (handle_query): Process qSearch:memory packets.
16255 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16257 * regcache.c (registers_length): Remove.
16258 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16259 full register packet.
16260 * regcache.h (registers_length): Remove prototype.
16261 * server.h (PBUFSIZ): Define to 16384.
16263 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16265 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16266 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16267 powerpc-64l.o, and powerpc-altivec64l.o.
16268 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16269 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16270 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16271 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16272 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16275 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16276 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16277 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16278 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16279 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16280 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16281 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16282 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16283 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16284 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16287 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16288 (init_registers_powerpc_32l): ... this new prototype.
16289 (init_registers_powerpc_32): Remove, replace by ...
16290 (init_registers_powerpc_altivec32l): ... this new prototype.
16291 (init_registers_powerpc_e500): Remove, replace by ...
16292 (init_registers_powerpc_e500l): ... this new prototype.
16293 (init_registers_ppc64): Remove, replace by ...
16294 (init_registers_powerpc_64l): ... this new prototype.
16295 (init_registers_powerpc_64): Remove, replace by ...
16296 (init_registers_powerpc_altivec64l): ... this new prototype.
16297 (ppc_num_regs): Set to 73.
16298 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16299 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16300 (ppc_cannot_store_register): Handle orig_r3 and trap.
16301 (ppc_arch_setup): Update init_registers_... calls.
16302 (ppc_fill_gregset): Handle orig_r3 and trap.
16304 * inferiors.c (clear_inferiors): Reset current_inferior.
16306 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16308 * acinclude.m4: Add override.m4.
16309 * configure: Regenerate.
16311 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16313 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16314 initial call to init_register_ppc64.
16316 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16318 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16319 single powerpc*-*-linux* case.
16320 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16322 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16324 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16325 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16327 * linux-ppc-low.c: Include <elf.h>.
16328 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16329 (ppc_hwcap): New global variable.
16330 (ppc_regmap): Remove __SPE__ #ifdef sections.
16331 (ppc_regmap_e500): New global variable.
16332 (ppc_cannot_store_register): Update __SPE__ special case.
16333 (ppc_get_hwcap): New function.
16334 (ppc_arch_setup): Use it to determine whether inferior supports
16335 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16336 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16337 Do not access registers if target does not support AltiVec.
16338 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16339 Do not access registers if target does not support SPE.
16340 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16342 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16344 * linux-low.c (disabled_regsets, num_regsets): New.
16345 (use_regsets_p): Delete.
16346 (linux_wait_for_process): Clear disabled_regsets.
16347 (regsets_fetch_inferior_registers): Check and set it.
16348 (regsets_store_inferior_registers): Likewise.
16349 (linux_fetch_registers, linux_store_registers): Do not use
16351 (initialize_low): Allocate disabled_regsets.
16353 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16355 * Makefile.in (LIBOBJS): New.
16356 (OBS): Use LIBOBJS.
16357 (memmem.o): New rule.
16358 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16359 * configure: Regenerated.
16361 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16363 * server.c (handle_query): Never return "unsupported" for
16364 qXfer:features:read queries.
16366 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16368 * server.c (get_features_xml): Fix inverted condition.
16369 (handle_query): Always support qXfer:feature:read.
16371 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16373 * server.c (wrapper_argv): New.
16374 (start_inferior): Handle wrapper_argv. If set, expect an extra
16376 (gdbserver_usage): Document --wrapper.
16377 (main): Parse --wrapper.
16379 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16381 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16382 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16383 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16384 (ppc_set_pc): Likewise.
16385 (ppc_arch_setup): New function.
16386 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16387 of collect_register.
16388 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16390 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16392 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16393 instead of linux-ppc64-low.o.
16394 * linux-ppc64-low.c: Remove file.
16395 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16396 (linux-ppc64-low.o): Remove rule.
16398 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16399 (init_registers_powerpc_64): Likewise.
16400 (ppc_regmap): Conditionally define depending on __powerpc64__.
16401 (ppc_cannot_store_register): Do not special-case "fpscr" when
16402 compiled on __powerpc64__.
16403 (ppc_collect_ptrace_register): New function.
16404 (ppc_supply_ptrace_register): New function.
16405 (ppc_breakpoint): Change type to "unsigned int".
16406 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16407 (the_low_target): Conditionally provide initializers for the
16408 arch_setup member depending on __powerpc64__. Install
16409 collect_ptrace_register and supply_ptrace_register members.
16411 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16413 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16414 * server.c (gdbserver_xmltarget): Define.
16415 (get_features_xml): Use it to replace "target.xml" and arch_string.
16417 * configure.srv: Remove srv_xmltarget. Add XML files that were
16418 mentioned there to srv_xmlfiles instead. Remove conditional tests
16419 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16420 srv_xmlfiles and srv_regobj to include all possible choices.
16421 * configure.ac (srv_xmltarget): Remove.
16422 (srv_xmlfiles): Do not add "target.xml".
16423 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16424 checks for supplementary target information.
16425 * configure: Regenerate.
16426 * Makefile.in (XML_TARGET): Remove.
16427 (target.xml): Remove rule.
16428 (clean): Do not clean up target.xml.
16429 (.PRECIOUS): Do not mention target.xml.
16431 * target.h (struct target_ops): Remove arch_string member.
16432 * linux-low.c (linux_arch_string): Remove.
16433 (linux_target_ops): Remove arch_string initializer.
16434 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16435 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16436 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16437 * spu-low.c (spu_arch_string): Remove.
16438 (spu_target_ops): Remove arch_string initializer.
16439 * win32-low.c (win32_arch_string): Remove.
16440 (win32_target_ops): Remove arch_string initializer.
16441 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16442 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16443 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16445 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16447 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16448 by collect_ptrace_register and supply_ptrace_register hooks.
16449 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16450 instead of checking for the_low_target.left_pad_xfer.
16451 (usr_store_inferior_registers): Use collect_ptrace_register callback
16452 instead of checking for the_low_target.left_pad_xfer.
16454 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16455 (s390_supply_ptrace_register): Likewise.
16456 (s390_fill_gregset): Call s390_collect_ptrace_register.
16457 (the_low_target): Update.
16459 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16460 (ppc_supply_ptrace_register): Likewise.
16461 (the_low_target): Update.
16463 * linux-i386-low.c (the_low_target): Update.
16464 * linux-x86-64-low.c (the_low_target): Update.
16466 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16468 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16469 reg-s390.o and reg-s390x.o.
16471 * linux-low.c (new_inferior): New global variable.
16472 (linux_create_inferior, linux_attach): Set it.
16473 (linux_wait_for_process): Call the_low_target.arch_setup after the
16474 target has stopped for the first time.
16475 (initialize_low): Do not call the_low_target.arch_setup.
16477 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16478 (s390_set_pc): Likewise.
16479 (s390_arch_setup): New function.
16480 (the_low_target): Use s390_arch_setup as arch_setup routine.
16482 * regcache.c (realloc_register_cache): New function.
16483 (set_register_cache): Call it for each existing regcache.
16485 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16487 * server.h (init_registers): Remove prototype.
16489 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16490 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16491 instead of init_registers ().
16492 * linux-arm-low.c (init_registers_arm): Add prototype.
16493 (init_registers_arm_with_iwmmxt): Likewise.
16494 (the_low_target): Add initializer for arch_setup field.
16495 * linux-cris-low.c (init_registers_cris): Add prototype.
16496 (the_low_target): Add initializer for arch_setup field.
16497 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16498 (the_low_target): Add initializer for arch_setup field.
16499 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16500 (the_low_target): Add initializer for arch_setup field.
16501 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16502 (the_low_target): Add initializer for arch_setup field.
16503 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16504 (the_low_target): Add initializer for arch_setup field.
16505 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16506 (the_low_target): Add initializer for arch_setup field.
16507 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16508 (init_registers_mips64_linux): Likewise.
16509 (the_low_target): Add initializer for arch_setup field.
16510 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16511 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16512 (the_low_target): Add initializer for arch_setup field.
16513 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16514 (init_registers_powerpc_64): Likewise.
16515 (the_low_target): Add initializer for arch_setup field.
16516 * linux-s390-low.c (init_registers_s390): Add prototype.
16517 (init_registers_s390x): Likewise.
16518 (the_low_target): Add initializer for arch_setup field.
16519 * linux-sh-low.c (init_registers_sh): Add prototype.
16520 (the_low_target): Add initializer for arch_setup field.
16521 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16522 (the_low_target): Add initializer for arch_setup field.
16523 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16524 (the_low_target): Add initializer for arch_setup field.
16526 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16527 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16528 instead of init_registers ().
16529 * win32-arm-low.c (init_registers_arm): Add prototype.
16530 (the_low_target): Add initializer for arch_setup field.
16531 * win32-i386-low.c (init_registers_i386): Add prototype.
16532 (the_low_target): Add initializer for arch_setup field.
16534 * spu-low.c (init_registers_spu): Add prototype.
16535 (initialize_low): Call initialie_registers_spu () instead of
16536 initialize_registers ().
16538 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16540 * server.c (handle_v_requests): When handling the vRun and vAttach
16541 packets, if already debugging a process, don't kill it. Return an
16544 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16546 * server.c (handle_query): Correct length check.
16548 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16550 * win32-low.c (do_initial_child_stuff): Add process handle
16551 parameter. Set current_process_handle and current_process_id from the
16552 parameters. Clear globals.
16553 (win32_create_inferior): Don't set current_process_handle and
16554 current_process_id here. Instead pass them on the call to
16555 do_initial_child_stuff.
16556 (win32_attach): Likewise.
16557 (win32_clear_inferiors): New.
16558 (win32_kill): Don't close the current process handle or the
16559 current thread handle here. Instead call win32_clear_inferiors.
16560 (win32_detach): Don't open a new handle to the process. Call
16561 win32_clear_inferiors.
16562 (win32_join): Don't rely on current_process_handle; open a new
16563 handle using the process id.
16564 (win32_wait): Call win32_clear_inferiors when the inferior process
16567 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16569 * server.c (monitor_show_help): Add "exit".
16571 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16573 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16574 (clean): Add reg-xtensa.c.
16575 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16576 * configure.srv (xtensa*-*-linux*) New target.
16577 * linux-xtensa-low.c: New.
16578 * xtensa-xtregs.c: New.
16580 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16582 * hostio.c: Don't include errno.h.
16583 (errno_to_fileio_errno): Move to hostio-errno.
16584 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16585 error number outputting to the target->hostio_last_error callback.
16586 (hostio_packet_error): Use FILEIO_EINVAL directly.
16587 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16588 calls to hostio_error.
16589 * hostio-errno.c: New.
16590 * server.h (hostio_last_error_from_errno): Declare.
16591 * target.h (target_ops): Add hostio_last_error member.
16592 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16593 as hostio_last_error handler.
16594 * spu-low.c (spu_target_ops): Likewise.
16595 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16596 (wince_hostio_last_error): New functions.
16597 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16598 as hostio_last_error handler.
16599 (win32_target_ops) [!_WIN32_WCE]: Register
16600 hostio_last_error_from_errno as hostio_last_error handler.
16601 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16602 (hostio-errno.o): New rule.
16603 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16604 * configure.srv (srv_hostio_err_objs): New variable. Default to
16606 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16607 * configure: Regenerate.
16609 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16611 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16612 (linux_kill, linux_detach): Clean up the process list.
16613 * remote-utils.c (remote_open): Improve port number parsing.
16614 (putpkt_binary, input_interrupt): Only send interrupts if the target
16616 * server.c (extended_protocol): Make static.
16617 (attached): Define earlier.
16618 (exit_requested, response_needed, program_argv): New variables.
16619 (target_running): New.
16620 (start_inferior): Clear attached here.
16621 (attach_inferior): Set attached here.
16622 (require_running): Define.
16623 (handle_query): Use require_running and target_running. Implement
16625 (handle_v_attach, handle_v_run): New.
16626 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16627 (gdbserver_usage): Update.
16628 (main): Redo argument parsing. Handle --debug and --multi. Handle
16629 --attach along with other options or after the port. Save
16630 program_argv. Support no initial program. Resynchronize
16631 communication with GDB after an error. Handle "monitor exit".
16632 Use require_running and target_running. Always allow the extended
16633 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16634 restart in extended mode.
16635 * README: Refer to the GDB manual. Update --attach usage.
16637 2007-12-20 Andreas Schwab <schwab@suse.de>
16639 * linux-low.c (STACK_SIZE): Define.
16640 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16641 (linux_test_for_tracefork): Likewise.
16643 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16645 * linux-low.c (linux_wait_for_event): Update messages. Do not
16646 reinsert auto-delete breakpoints.
16647 * mem-break.c (struct breakpoint): Change return type of handler to
16649 (set_breakpoint_at): Update handler type.
16650 (reinsert_breakpoint_handler): Return 1 instead of calling
16652 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16654 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16655 * mem-break.h (set_breakpoint_at): Update handler type.
16656 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16657 * win32-low.c (auto_delete_breakpoint): New.
16658 (get_child_debug_event): Use it.
16660 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16662 * configure.ac: Check for pread and pwrite.
16663 * hostio.c (handle_pread): Fall back to lseek and read.
16664 (handle_pwrite): Fall back to lseek and write.
16665 * config.in, configure: Regenerated.
16667 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16669 * server.c (myresume): Add own_buf argument.
16670 (main): Update calls.
16672 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16674 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16675 * remote-utils.c (remote_open): Do not call disable_async_io.
16676 (block_async_io): Delete.
16677 (unblock_async_io): Make static.
16678 (initialize_async_io): New.
16679 * server.c (handle_v_cont): Handle async I/O here.
16680 (myresume): Likewise. Move other common resume tasks here...
16681 (main): ... from here. Call initialize_async_io. Disable async
16682 I/O before the main loop.
16683 * server.h (initialize_async_io): Declare.
16684 (block_async_io, unblock_async_io): Delete prototypes.
16685 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16687 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16689 * remote-utils.c (readchar): Allow binary data in received messages.
16691 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16693 * win32-low.c (attaching): New global.
16694 (win32_create_inferior): Clear the `attaching' global.
16695 (win32_attach): Set the `attaching' global.
16696 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16697 attaching. Only set a breakpoint at the entry point if not
16700 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16702 * server.c (main): Don't report dll events on the initial
16703 connection on attaches.
16705 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16707 * server.c (main): Relax numerical bases supported for the pid of
16708 the --attach command line argument.
16710 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16712 * win32-low.c (win32_attach): Call OpenProcess before
16713 DebugActiveProcess, not after. Add last error output to error
16716 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16718 * win32-low.c (win32_get_thread_context)
16719 (win32_set_thread_context): New functions.
16720 (thread_rec): Use win32_get_thread_context.
16721 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16722 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16725 2007-12-03 Leo Zayas
16726 Pedro Alves <pedro_alves@portugalmail.pt>
16728 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16730 (child_add_thread): Minor cleanup.
16731 (child_continue): Resume artificially suspended threads before
16732 calling ContinueDebugEvent.
16733 (suspend_one_thread): New.
16734 (fake_breakpoint_event): New.
16735 (get_child_debug_event): Change return type to int. Check here if
16736 gdb sent an interrupt request. If a soft interrupt was requested,
16737 fake a breakpoint event. Return 0 if there is no event to handle,
16739 (win32_wait): Don't check here if gdb sent an interrupt request.
16740 Ensure there is a valid event to handle.
16741 (win32_request_interrupt): Add soft interruption method as last
16744 2007-12-03 Leo Zayas
16745 Pedro Alves <pedro_alves@portugalmail.pt>
16747 * win32-low.h (win32_thread_info): Add descriptions to the
16748 structure members. Replace `suspend_count' counter by a
16750 * win32-low.c (thread_rec): Update condition of when to get the
16751 context from the inferior. Rely on ContextFlags being set if it
16752 has already been retrieved. Only suspend the inferior thread if
16753 we haven't already. Warn if that fails.
16754 (continue_one_thread): s/suspend_count/suspended/. Only call
16755 ResumeThread once. Warn if that fails.
16757 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16759 * win32-low.c (win32_wait): Don't read from the inferior when it
16760 has already exited.
16762 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16764 * Makefile.in (win32_low_h): New variable.
16765 (win32-low.o): Add dependency on $(win32_low_h).
16766 (win32-arm-low.o, win32-i386-low.o): New rules.
16768 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16770 * hostio.c: Correct copyright year.
16772 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16774 * Makefile.in (OBS): Add hostio.o.
16775 (hostio.o): New rule.
16776 * server.h (handle_vFile): Declare.
16777 * hostio.c: New file.
16778 * server.c (handle_v_requests): Take packet_len and new_packet_len
16779 for binary packets. Call handle_vFile.
16780 (main): Update call to handle_v_requests.
16782 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16784 * linux-low.c: Include <sched.h>.
16786 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16788 * linux-low.c (linux_tracefork_grandchild): New.
16789 (linux_tracefork_child): Use clone.
16790 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16792 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16794 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16796 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16798 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16800 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16802 * inferiors.c (change_inferior_id): Delete.
16803 (add_pid_to_list, pull_pid_from_list): New.
16804 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16805 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16806 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16807 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16808 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16809 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16810 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16811 (using_threads): Always set to 1.
16812 (handle_extended_wait): New.
16813 (add_process): Do not set TID.
16814 (linux_create_inferior): Set must_set_ptrace_flags.
16815 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16816 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16817 (linux_thread_alive): Rename TID argument to LWPID.
16818 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16819 (linux_wait_for_event): Do not use TID or check using_threads. Update
16820 call to dead_thread_notify. Call handle_extended_wait.
16821 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16822 (send_sigstop): Delete sigstop_sent.
16823 (wait_for_sigstop): Avoid TID.
16824 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16825 (linux_test_for_tracefork): New.
16826 (linux_lookup_signals): Use thread_db_active and
16827 linux_supports_tracefork_flag.
16828 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16829 * linux-low.h (get_process_thread): Avoid TID.
16830 (struct process_ifo): Move thread_known and tid to the end. Remove
16832 (linux_attach_lwp, thread_db_init): Update prototypes.
16833 * server.h (change_inferior_id): Delete prototype.
16834 (add_pid_to_list, pull_pid_from_list): New prototypes.
16835 * thread-db.c (thread_db_use_events): New.
16836 (find_first_thread): Rename to...
16837 (find_one_thread): ...this. Update callers and messages. Do not
16838 call fatal. Check thread_db_use_events. Do not call
16839 change_inferior_id or new_thread_notify.
16840 (maybe_attach_thread): Update. Do not call new_thread_notify.
16841 (thread_db_init): Set thread_db_use_events. Check use_events.
16842 * utils.c (fatal, warning): Correct message prefix.
16844 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16846 * Makefile.in (clean): Remove new files.
16847 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16848 (powerpc-64.o, powerpc-64.c): New rules.
16849 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16850 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16852 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16854 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16855 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16856 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16857 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16858 (target_regsets): Add AltiVec and SPE register sets.
16859 * configure.ac: Check for AltiVec and SPE.
16860 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16861 (ppc_fill_vrregset, ppc_store_vrregset): New.
16862 (target_regsets): Add AltiVec register set.
16863 * configure: Regenerated.
16865 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16867 * linux-low.c (O_LARGEFILE): Define.
16868 (linux_read_memory): Use /proc/PID/mem.
16869 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16870 * configure, config.in: Regenerated.
16872 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16874 * linux-low.c (linux_wait_for_event): Do not pass signals while
16877 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16879 * win32-low.c (create_process): New.
16880 (win32_create_inferior): Use create_process instead of
16881 CreateProcess. If create_process failed retry appending an ".exe"
16882 suffix. Store the GetLastError result immediatelly after
16883 create_process calls and use it on the call to error.
16885 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16887 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16889 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16891 * configure.ac: Switch license to GPLv3.
16893 2007-08-01 Michael Snyder <msnyder@access-company.com>
16895 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16897 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16899 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16901 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16902 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16903 CloseToolhelp32Snapshot.
16904 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16905 CloseToolhelp32Snapshot.
16907 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16909 * server.c (main): Check for inferior exit before main loop.
16911 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16913 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16914 instead of on tmp_desc.
16916 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16917 Daniel Jacobowitz <dan@codesourcery.com>
16919 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16920 (add_thread): Minor cleanups.
16921 (clear_inferiors): Move lower in the file. Clear the DLL
16923 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16924 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16925 (xml_escape_text): New.
16926 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16928 (handle_v_cont): Report errors.
16929 (gdbserver_version): Update.
16930 (main): Correct size of own_buf. Do not report initial DLL events.
16931 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16932 (unloaded_dll, xml_escape_text): New.
16933 * win32-low.c (enum target_waitkind): Update comments.
16934 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16935 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16936 (win32_EnumProcessModules, win32_GetModuleInformation)
16937 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16938 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16939 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16940 (win32_Module32First, win32_Module32Next, load_toolhelp)
16941 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16942 (get_child_debug_event): Handle DLL events.
16943 (win32_wait): Likewise.
16945 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16947 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16948 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16950 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16952 * win32-low.c (handle_output_debug_string): Ignore event if not
16955 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16957 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16959 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16961 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16963 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16965 * inferiors.c (change_inferior_id): Add comment.
16966 * linux-low.c (check_removed_breakpoint): Add an early
16967 prototype. Improve debug output.
16968 (linux_attach): Doc update.
16969 (linux_detach_one_process, linux_detach): Clean up before releasing
16971 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16972 * linux-low.h (struct process_info): Doc improvement.
16973 * mem-break.c (delete_all_breakpoints): New.
16974 * mem-break.h (delete_all_breakpoints): New prototype.
16975 * thread-db.c (find_first_thread): New.
16976 (thread_db_create_event): Call it instead of
16977 thread_db_find_new_threads. Clean up unused variables.
16978 (maybe_attach_thread): Remove first thread handling.
16979 (thread_db_find_new_threads): Use find_first_thread.
16980 (thread_db_get_tls_address): Likewise.
16982 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16984 * thread-db.c (thread_db_find_new_threads): Add prototype.
16985 (thread_db_create_event): Check for the main thread before adding
16987 (maybe_attach_thread): Only enable event reporting if TID == 0.
16988 (thread_db_get_tls_address): Check for new threads.
16990 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16992 * linux-low.c (linux_create_inferior): Try execv before execvp.
16993 * spu-low.c (spu_create_inferior): Likewise.
16995 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16997 * linux-low.c (linux_create_inferior): Change execv to execvp.
16998 * spu-low.c (spu_create_inferior): Likewies.
17000 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17002 * Makefile.in (clean): Clean new files instead of deleted ones.
17003 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17004 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17006 * configure.srv: Specify XML files and new regformats for MIPS and
17008 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17009 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17010 an entry for the restart register.
17011 (mips_cannot_fetch_register, mips_cannot_store_register)
17012 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17013 register names to match the XML descriptions.
17014 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17015 restart register instead of $0.
17017 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17018 Markus Deuling <deuling@de.ibm.com>
17020 * remote-utils.c (decode_xfer_write): New function.
17021 * server.h (decode_xfer_write): Add prototype.
17022 * server.c (handle_query): Add PACKET_LEN argument. Support
17023 qXfer:spu:read and qXfer:spu:write packets.
17024 (main): Pass packet_len to handle_query.
17025 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17026 * target.h (target_ops): Add qxfer_spu.
17028 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17030 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17031 accessing non-seekable spufs files.
17033 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17035 * server.c (handle_query): Add reply for qC packet.
17037 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17038 Leo Zayas <lerele@champenstudios@com>
17040 * server.h (check_remote_input_interrupt_request): New function.
17041 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17042 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17043 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17044 (check_remote_input_interrupt_request): New function.
17045 * server.h (check_remote_input_interrupt_request): Declare.
17046 * win32-low.c (winapi_DebugBreakProcess,
17047 winapi_GenerateConsoleCtrlEvent): New typedefs.
17048 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17050 (win32_wait): Check for remote interrupt request
17051 with check_remote_input_interrupt_request.
17052 (win32_request_interrupt): New function.
17053 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17055 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17057 * win32-low.c (debug_registers_changed,
17058 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17059 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17060 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17061 (thread_rec): Get context using the low target.
17062 (child_add_thread): Call thread_added on the low target,
17063 which does the same thing.
17065 (do_initial_child_stuff): Remove debug registers references.
17066 Set context using the low target. Resume threads after
17067 setting the contexts.
17068 (child_continue): Remove dead variable. Remove debug
17069 registers references.
17070 (child_fetch_inferior_registers): Go through the low target.
17071 (do_child_store_inferior_registers): Remove.
17072 (child_store_inferior_registers): Go through the low target.
17073 (win32_resume): Remove debug registers references.
17074 Set context using the low target.
17075 (handle_exception): Change return type to void. Don't record
17076 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17077 first chance exception.
17078 (get_child_debug_event): Change return type to void. Remove
17079 goto loop. Always return after waiting for debug event.
17080 (win32_wait): Convert to switch statement. Handle spurious
17083 * win32-i386-low.c (debug_registers_changed,
17084 debug_registers_used): New.
17085 (initial_stuff): Rename to ...
17086 (i386_initial_stuff): ... this. Clear debug registers
17088 (store_debug_registers): Delete.
17089 (i386_get_thread_context): New.
17090 (load_debug_registers): Delete.
17091 (i386_set_thread_context): New.
17092 (i386_thread_added): New.
17093 (single_step): Rename to ...
17094 (i386_single_step): ... this.
17095 (do_fetch_inferior_registers): Rename to ...
17096 (i386_fetch_inferior_register): ... this.
17097 (i386_store_inferior_register): New.
17098 (the_low_target): Adapt to new interface.
17100 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17101 (arm_get_thread_context): New.
17102 (arm_set_thread_context): New.
17104 (do_fetch_inferior_registers): Rename to ...
17105 (arm_fetch_inferior_register): ... this.
17106 (arm_store_inferior_register): New.
17107 (arm_wince_breakpoint): Reimplement as unsigned long.
17108 (arm_wince_breakpoint_len): Define.
17109 (the_low_target): Adapt to new interface.
17111 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17112 load_debug_registers. Add get_thread_context, set_thread_context,
17113 thread_added and store_inferior_register. Rename
17114 fetch_inferior_registers to fetch_inferior_register.
17115 (regptr): Remove declaration.
17117 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17119 * linux-low.c (linux_detach): Change return type to int. Return 0.
17120 * spu-low.c (spu_detach): Likewise.
17122 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17124 * target.h (target_ops): Change return type of detach to int.
17126 (join_inferior): New.
17127 * server.c (main): Don't skip detach support on mingw32.
17128 If the inferior doesn't support detaching return error.
17129 Call join_inferior instead of using waitpid.
17130 * linux-low.c (linux_join): New.
17131 (linux_target_op): Add linux_join.
17132 * spu-low.c (spu_join): New.
17133 (spu_target_ops): Add spu_join.
17134 * win32-low.c (win32_detach): Adapt to new interface.
17135 Reopen current_process_handle before detaching. Issue a child
17136 resume before detaching.
17138 (win32_target_op): Add win32_join.
17140 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17142 * win32-low.c (win32-attach): Fix return value.
17143 * target.h (target_ops): Describe ATTACH return values.
17145 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17147 * win32-low.c (GETPROCADDRESS): Define.
17148 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17149 (winapi_DebugSetProcessKillOnExit): Likewise.
17150 (win32_create_inferior): Force usage of ansi CreateProcessA.
17151 (win32_attach): Use GETPROCADDRESS.
17152 (win32_detach): Likewise.
17154 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17156 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17158 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17160 * win32-low.c: Commit leftover changes from 2007-03-29.
17162 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17164 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17165 fields short instead of int. Add explicit padding.
17166 (i387_cache_to_fsave): Remove unnecessary casts.
17167 (i387_fsave_to_cache): Doc fix.
17168 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17170 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17172 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17173 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17175 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17177 * configure.srv (arm*-*-mingw32ce*): Move near the other
17180 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17182 * configure.ac: Add errno checking.
17183 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17184 sys/file.h and malloc.h.
17185 (AC_CHECK_DECLS): Add perror.
17186 (srv_mingwce): Handle.
17187 * configure.srv (i[34567]86-*-cygwin*): Add
17188 win32-i386-low.o to srv_tgtobj.
17189 (i[34567]86-*-mingw*): Likewise.
17190 (arm*-*-mingw32ce*): Add case.
17191 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17192 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17193 [__MINGW32CE__] (strerror): New function.
17194 [__MINGW32CE__] (errno): Define to GetLastError.
17195 [__MINGW32CE__] (COUNTOF): New macro.
17196 (remote_open): Remove extra close call.
17197 * mem-break.c (delete_breakpoint_at): New function.
17198 * mem-break.h (delete_breakpoint_at): Declare.
17199 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17200 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17201 [USE_WIN32API] (read, write): Add char* casts.
17202 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17203 * server.h: Include wincecompat.h on Windows CE.
17204 [HAVE_ERRNO_H]: Check.
17205 (perror): Declare if not declared.
17206 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17207 (perror_with_name): Remove errno declaration.
17208 * wincecompat.h: New.
17209 * wincecompat.c: New.
17210 * win32-low.h: New.
17211 * win32-arm-low.c: New.
17212 * win32-i386-low.c: New.
17213 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17214 (OUTMSG2): Make it safe.
17216 (COUNTOF): New macro.
17217 (NUM_REGS): Get it from the low target.
17218 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17219 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17220 (thread_rec): Let low target handle debug registers.
17221 (child_add_thread): Likewise.
17222 (child_init_thread_list): Likewise.
17223 (continue_one_thread): Likewise.
17225 (do_child_fetch_inferior_registers): Move to ...
17226 * win32-i386-low.c: ... here, and rename to ...
17227 (do_fetch_inferior_registers): ... this.
17228 * win32-low.c (child_fetch_inferior_registers):
17229 Go through the low target.
17230 (do_child_store_inferior_registers): Use regptr.
17231 (strwinerror): New function.
17232 (win32_create_inferior): Handle Windows CE.
17233 Use strwinerror instead of strerror on Windows error
17234 codes. Add program to the error output.
17235 Don't close the main thread handle on Windows CE.
17236 (win32_attach): Use coredll.dll on Windows CE.
17237 (win32_kill): Close current process and current
17239 (win32_detach): Use coredll.dll on Windows CE.
17240 (win32_resume): Let low target handle debug registers, and
17242 (handle_exception): Add/Remove initial breakpoint. Avoid
17243 non-existant WSTOPSIG on Windows CE.
17244 (win32_read_inferior_memory): Cast to remove warning.
17245 (win32_arch_string): Go through the low target.
17246 (initialize_low): Call set_breakpoint_data with the low
17247 target's breakpoint.
17248 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17249 FOP_REGNUM, mappings): Move to ...
17250 * win32-i386-low.c: ... here.
17251 * win32-low.c (win32_thread_info): Move to ...
17252 * win32-low.h: ... here.
17253 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17254 win32-arm-low.c and wincecompat.c.
17255 (all:): Add $EXEEXT.
17256 (install-only:): Likewise.
17257 (gdbserver:): Likewise.
17258 (gdbreplay:): Likewise.
17259 * config.in: Regenerate.
17260 * configure: Regenerate.
17262 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17264 * win32-low.c: Rename typedef thread_info to
17265 win32_thread_info throughout.
17267 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17269 * win32-i386-low.c: Rename to ...
17270 * win32-low.c: ... this.
17271 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17272 * Makefile.in: Likewise.
17274 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17276 * remote-utils.c (monitor_output): Constify msg parameter.
17277 * server.h (monitor_output): Likewise.
17278 * win32-i386-low.c (handle_output_debug_string): New.
17279 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17280 handle_output_debug_string.
17281 (get_child_debug_event): Likewise.
17283 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17285 * server.c (main): Correct strtoul check.
17287 2007-03-27 Jon Ringle <jon@ringle.org>
17289 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17291 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17293 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17295 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17297 * terminal.h: Check HAVE_SGTTY_H.
17299 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17301 * remote-utils.c (remote_open): Print out the assigned port number.
17303 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17305 * remote-utils.c (monitor_output): New function.
17306 * server.c (debug_threads): Define here.
17307 (monitor_show_help): New function.
17308 (handle_query): Handle qRcmd.
17309 (main): Do not handle 'd' packet.
17310 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17311 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17314 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17316 * Makefile.in (EXEEXT): New.
17317 (clean): Use $(EXEEXT).
17319 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17321 * target.h (target_ops): Rename send_signal to request_interrupt,
17322 and remove enum target_signal parameter.
17323 * linux-low.c (linux_request_interrupt): Rename from
17324 linux_send_signal, and always send SIGINT.
17325 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17326 and always send SIGINT.
17327 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17329 (input_interrupt): Likewise.
17331 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17333 * server.c (get_features_xml): Check if target implemented
17335 * win32-i386-low.c (win32_arch_string): New.
17336 (win32_target_ops): Add win32_arch_string as arch_string member.
17338 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17340 * spu-low.c (spu_arch_string): New.
17341 (spu_target_ops): Add spu_arch_string.
17343 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17345 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17346 * configure.ac: Do not check for terminal.h.
17347 * configure, config.in: Regenerated.
17349 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17351 * Makefile.in (OBS): Add $(XML_BUILTIN).
17352 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17354 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17355 (arm-with-iwmmxt.c): New.
17356 * config.in, configure: Regenerate.
17357 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17358 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17359 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17360 (arm*-*-linux*): Add iWMMXt and regset support.
17361 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17362 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17363 (arm_store_wmmxregset, target_regsets): New.
17364 * server.c (get_features_xml): Take annex argument. Check builtin
17366 (handle_query): Handle multiple annexes.
17368 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17370 * remote-utils.c [USE_WIN32API] (read, write): Define.
17371 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17374 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17376 * linux-i386-low.c (the_low_target): Set arch_string.
17377 * linux-x86-64-low.c (the_low_target): Likewise.
17378 * linux-low.c (linux_arch_string): New.
17379 (linux_target_ops): Add it.
17380 * linux-low.h (struct linux_target_ops): Add arch_string.
17381 * server.c (write_qxfer_response): Use const void * for DATA.
17382 (get_features_xml): New.
17383 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17384 * target.h (struct target_ops): Add arch_string method.
17386 2007-01-03 Denis Pilat <denis.pilat@st.com>
17387 Daniel Jacobowitz <dan@codesourcery.com>
17389 * linux-low.c (linux_kill): Handle being called with no threads.
17390 * win32-i386-low.c (win32_kill): Likewise.
17391 (get_child_debug_event): Clear current_process_handle.
17393 2006-12-30 Denis PILAT <denis.pilat@st.com>
17394 Daniel Jacobowitz <dan@codesourcery.com>
17396 * remote-utils.c (remote_open): Check the type of specified
17397 serial port devices before opening them.
17398 * server.c (main): Kill the inferior if an error occurs during
17399 the first remote_open.
17401 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17403 * README: Update supported targets.
17405 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17407 * Makefile.in (clean): Remove reg-mips64.c.
17408 (reg-mips64.c, reg-mips64.o): New rules.
17409 * configure.srv: Handle mips64. Include regset support for mips.
17410 * linux-mips-low.c (union mips_register): New.
17411 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17412 (mips_breakpoint, mips_breakpoint_at): Use int.
17413 (mips_collect_register, mips_supply_register)
17414 (mips_collect_register_32bit, mips_supply_register_32bit)
17415 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17416 (mips_store_fpregset, target_regsets): New.
17417 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17419 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17421 * configure.srv: Add target "spu*-*-*".
17422 * Makefile.in (clean): Remove reg-spu.c.
17423 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17424 * spu-low.c: New file.
17426 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17428 * configure.ac: Correct td_thr_tls_get_addr test.
17429 * configure: Regenerated.
17431 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17433 * linux-low.c (linux_wait_for_event): Reformat. Use the
17434 pass_signals array.
17435 * remote-utils.c (decode_address_to_semicolon): New.
17436 * server.c (pass_signals, handle_general_set): New.
17437 (handle_query): Mention QPassSignals for qSupported.
17438 (main): Call handle_general_set.
17439 * server.h (pass_signals, decode_address_to_semicolon): New.
17441 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17443 * server.c (handle_query): Correct error handling for read_auxv.
17445 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17447 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17448 and srv_linux_thread_db to yes.
17449 * linux-s390-low.c (s390_fill_gregset): New function.
17450 (target_regsets): Define data structure.
17452 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17454 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17455 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17456 * config.in, configure: Regenerated.
17457 * inferiors.c (gdb_id_to_thread): New function.
17458 (gdb_id_to_thread_id): Use it.
17459 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17460 * linux-low.h (struct process_info): Add th member.
17461 (thread_db_get_tls_address): New prototype.
17462 * remote-utils.c (decode_address): Make non-static.
17463 * server.c (handle_query): Handle qGetTLSAddr.
17464 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17465 * target.h (struct target_ops): Add get_tls_address.
17466 * thread-db.c (maybe_attach_thread): Save the thread handle.
17467 (thread_db_get_tls_address): New.
17469 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17471 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17472 (linux_resume_one_process): Take a siginfo_t *. Update all
17473 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17474 (struct pending_signals): Add a siginfo_t.
17475 (linux_wait_for_process): Always set last_status.
17476 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17477 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17478 * linux-low.h (struct process_info): Add last_status.
17480 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17482 * remote-utils.c (try_rle): New function.
17483 (putpkt_binary): Use it.
17485 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17487 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17488 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17489 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17490 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17491 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17494 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17496 * server.c (terminal_fd): New variable.
17497 (old_foreground_pgrp): Likewise.
17498 (restore_old_foreground_pgrp): New function.
17499 (start_inferior): Record the terminal file descriptor in terminal_fd
17500 and its original foreground group in old_foreground_pgrp. Register
17501 restore_old_foreground_pgrp with atexit().
17503 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17505 * server.c (handle_query): Correct qPart to qXfer.
17507 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17509 * configure.ac: Check for more headers which are missing on
17510 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17511 * configure.srv: Add Cygwin and mingw32.
17512 * remote-utils.c: Don't include headers unconditionally which
17513 are missing on mingw32. Include <winsock.h> for mingw32.
17514 (remote_open): Adjust for mingw32 support. Flush
17515 standard error after writing to it.
17516 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17517 (unblock_async_io, enable_async_io, disable_async_io)
17518 (readchar, getpkt): Update for Winsock support.
17519 (prepare_resume_reply): Expect a protocol signal number.
17520 * server.c: Disable <sys/wait.h> on mingw32.
17521 (start_inferior): Adjust for mingw32 support. Flush
17522 standard error after writing to it.
17523 (attach_inferior): Likewise. Use protocol signal
17525 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17527 * win32-i386-low.c: New file.
17528 * Makefile.in (XM_CLIBS): Set.
17529 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17530 (win32-i386-low.o): New dependency rule.
17531 * linux-low.c (linux_wait): Use target signal numbers.
17532 * target.h (struct target_ops): Doc fix.
17533 * server.h (target_signal_to_name): New prototype.
17534 * gdbreplay.c: Don't include headers unconditionally which
17535 are missing on mingw32. Include <winsock.h> for mingw32.
17536 (remote_close, remote_open): Adjust for Winsock support.
17537 * configure, config.in: Regenerated.
17539 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17541 * server.c (decode_xfer_read, write_qxfer_response): New.
17542 (handle_query): Take a packet length argument. Handle
17543 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17544 the qSupported response.
17545 (main): Update call to handle_query.
17547 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17549 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17550 (putpkt_binary): Renamed from putpkt and adjusted for binary
17552 (putpkt): New wrapper for putpkt_binary.
17553 (readchar): Don't mask off the high bit.
17554 (decode_X_packet): New function.
17555 * server.c (main): Call putpkt_binary if a handler sets the packet
17556 length. Save the length of the incoming packet. Handle 'X'.
17557 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17559 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17561 * server.c (handle_query): Handle qSupported.
17563 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17565 * remote-utils.c (all_symbols_looked_up): New variable.
17566 (look_up_one_symbol): Check it.
17567 * server.h (look_up_one_symbol): New declaration.
17568 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17570 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17572 * Makefile.in (linux-arm-low.o): Update dependencies.
17573 * linux-arm-low.c: Include "gdb_proc_service.h".
17574 (PTRACE_GET_THREAD_AREA): Define.
17575 (ps_get_thread_area): New function.
17577 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17579 * configure.srv (m68k*-*-uclinux*): New target.
17580 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17581 (linux_resume_one_process): Remove extraneous cast.
17582 (linux_read_offsets): New.
17583 (linux_target_op): Add linux_read_offsets on mmuless systems.
17584 * server.c (handle_query): Add qOffsets logic.
17585 * target.h (struct target_ops): Add read_offsets.
17587 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17589 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17590 (PTRACE_GET_THREAD_AREA): Define.
17591 (ps_get_thread_area): New function.
17592 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17593 (linux-x86-64-low.o): Update.
17595 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17597 * configure.ac: Remove checks for prfpregset_t.
17598 * gdb_proc_service.h: New file.
17599 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17600 new "gdb_proc_service.h".
17601 * proc-service.c: Likewise.
17602 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17603 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17604 * Makefile.in (gdb_proc_service_h): Updated.
17605 * configure, config.in: Regenerated.
17607 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17609 * remote-utils.c (prepare_resume_reply): Move declaration
17610 of gdb_id_from_wait to the top of the block.
17612 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17614 * linux-low.c (regsets_store_inferior_registers): Read the regset
17615 from the target before filling it.
17617 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17619 * server.c (attach_inferior): Return SIGTRAP for a successful
17622 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17624 * Makefile.in (OBS): Add version.o.
17625 (STAGESTUFF): Delete.
17626 (version.o): Add dependencies.
17627 (version.c): Replace rule.
17628 (clean): Remove version.c.
17629 * server.c (gdbserver_version): New.
17630 (gdbserver_usage): Use printf.
17631 (main): Handle --version and --help.
17632 * server.h (version, host_name): Add declarations.
17634 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17646 * linux-x86-64-low.c:
17648 * linux-s390-low.c:
17649 * linux-ppc64-low.c:
17651 * linux-mips-low.c:
17652 * linux-m68k-low.c:
17653 * linux-m32r-low.c:
17656 * linux-ia64-low.c:
17657 * linux-i386-low.c:
17658 * linux-crisv32-low.c:
17670 * gdbserver.1: Add (C) after Copyright. Update the FSF
17673 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17675 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17676 (arm_breakpoint_at): Recognize both breakpoints.
17677 (the_low_target): Use the correct breakpoint instruction.
17679 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17681 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17682 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17683 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17684 (the_low_target): Update.
17686 2005-10-25 Andreas Schwab <schwab@suse.de>
17688 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17690 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17691 (ia64_num_regs): Reduce to 462.
17693 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17695 * acinclude.m4: Correct quoting.
17696 * aclocal.m4: Regenerated.
17698 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17699 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17700 (thread_db_init): Call thread_db_err_str.
17701 * configure.ac: Check for TD_VERSION.
17702 * config.in, configure: Regenerated.
17704 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17706 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17708 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17710 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17711 is not available. Define HAVE_PTRACE_GETREGS if it is.
17712 * config.in, configure: Regenerated.
17713 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17714 * linux-i386-low.c, linux-m68k-low.c: Update to use
17715 HAVE_PTRACE_GETREGS.
17716 * linux-low.c (regsets_fetch_inferior_registers)
17717 (regsets_store_inferior_registers): Only return 0 if we processed
17719 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17720 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17722 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17724 * inferiors.c (struct thread_info): Add gdb_id.
17725 (add_thread): Add gdb_id argument.
17726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17727 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17728 calls to add_thread.
17729 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17730 * server.c (handle_query): Use thread_to_gdb_id.
17731 (handle_v_cont, main): Use gdb_id_to_thread_id.
17732 * server.h (add_thread): Update prototype.
17733 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17736 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17738 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17739 left-padded registers.
17740 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17741 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17743 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17745 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17746 * configure: Regenerate.
17747 * config.in: Regenerate.
17748 * server.h (NEED_DECLARATION_STRERROR):
17749 Replace with !HAVE_DECL_STRERROR.
17751 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17753 * linux-low.c (linux_wait, linux_send_signal): Don't test
17754 an unsigned long variable for > 0 if it could be MAX_ULONG.
17755 * server.c (myresume): Likewise.
17756 * target.c (set_desired_inferior): Likewise.
17758 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17760 * configure.ac: Simplify and improve check for socklen_t.
17761 * configure, config.in: Regenerate.
17763 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17765 * acconfig.h: Remove.
17766 * configure.ac: Add a test for socklen_t. Use three-argument
17767 AC_DEFINE throughout.
17768 * config.in: Regenerated using autoheader 2.59.
17769 * configure: Regenerated.
17771 * gdbreplay.c (socklen_t): Provide a default.
17772 (remote_open): Use socklen_t.
17773 * remote-utils.c (socklen_t): Provide a default.
17774 (remote_open): Use socklen_t.
17775 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17778 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17780 * linux-low.c (linux_read_memory, linux_write_memory)
17781 (linux_read_auxv): Likewise.
17782 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17783 (check_mem_write): Likewise.
17784 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17786 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17787 (registers_from_string, register_data): Likewise.
17788 * server.c (handle_query, main): Likewise.
17789 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17790 (decode_M_packet): Likewise.
17791 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17792 * target.h (struct target_ops): Update read_memory, write_memory,
17794 (read_inferior_memory, write_inferior_memory): Update.
17795 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17796 to unsigned char *.
17797 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17798 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17799 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17800 linux-s390-low.c, linux-sh-low.c: Update for changes in
17801 read_inferior_memory and the_low_target->breakpoint.
17803 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17805 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17806 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17807 * configure.srv: Add powerpc64-*-linux*.
17808 * linux-ppc64-low.c: New file.
17810 2005-05-23 Orjan Friberg <orjanf@axis.com>
17812 * linux-cris-low.c: New file with support for CRIS.
17813 * linux-crisv32-low.c: Ditto for CRISv32.
17814 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17815 (clean): Add reg-cris.c and reg-crisv32.c.
17816 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17817 reg-crisv32.o, and reg-crisv32.c to make rules.
17818 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17819 recognized targets.
17821 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17823 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17824 of sizeof (PTRACE_XFER_TYPE).
17825 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17827 2005-05-12 Orjan Friberg <orjanf@axis.com>
17829 * target.h (struct target_ops): Add insert_watchpoint,
17830 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17831 pointers for hardware watchpoint support.
17832 * linux-low.h (struct linux_target_ops): Ditto.
17833 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17834 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17835 to linux_target_ops.
17836 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17838 * server.c (main): Recognize 'Z' and 'z' packets.
17840 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17842 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17843 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17844 (the_low_target): Add new members.
17846 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17848 * proc-service.c (ps_lgetregs): Search all_processes instead of
17851 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17853 * server.c (start_inferior): Change return type to int.
17854 (attach_inferior): Change sigptr to int *.
17855 (handle_v_cont, handle_v_requests): Change signal to int *.
17856 (main): Change signal to int.
17858 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17860 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17861 * configure.srv: Add m32r*-*-linux*.
17862 * linux-m32r-low.c: New file.
17864 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17866 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17868 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17870 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17871 Take unsigned long arguments for PIDs.
17872 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17873 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17874 (wait_for_sigstop, linux_resume_one_process)
17875 (regsets_fetch_inferior_registers, linux_send_signal)
17876 (linux_read_auxv): Likewise. Update the types of variables holding
17877 PIDs. Update format string specifiers.
17878 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17879 * remote-utils.c (prepare_resume_reply): Likewise.
17880 * server.c (cont_thread, general_thread, step_thread)
17881 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17883 (handle_query): Update format specifiers.
17884 (handle_v_cont, main): Use strtoul for thread IDs.
17885 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17886 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17887 (general_thread, step_thread, thread_from_wait)
17888 (old_thread_from_wait): Update.
17889 * target.h (struct thread_resume): Use unsigned long for THREAD.
17890 (struct target_ops): Use unsigned long for arguments to attach and
17893 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17895 * acinclude.m4: Include bfd/bfd.m4 directly.
17896 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17897 <agriffis@toolchain.org>.
17898 * aclocal.m4, configure: Regenerated.
17900 2005-01-07 Andrew Cagney <cagney@gnu.org>
17902 * configure.ac: Rename configure.in, require autoconf 2.59.
17903 * configure: Re-generate.
17905 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17907 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17908 LIBS when finished.
17909 * aclocal.m4: Regenerated.
17910 * configure: Regenerated.
17912 2004-11-21 Andreas Schwab <schwab@suse.de>
17914 * linux-m68k-low.c (m68k_num_gregs): Define.
17915 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17916 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17917 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17918 (m68k_breakpoint_at): New. Add to the_low_target.
17920 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17921 srv_linux_thread_db to yes.
17923 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17925 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17926 (ARCH_SET_FS): Likewise.
17927 (ARCH_GET_FS): Likewise.
17928 (ARCH_GET_GS): Likewise.
17930 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17932 * linux-i386-low.c (ps_get_thread_area): New.
17933 * linux-x86-64-low.c (ps_get_thread_area): New.
17934 * linux-low.c: Include <sys/syscall.h>.
17935 (linux_kill_one_process): Don't kill the first thread here.
17936 (linux_kill): Kill the first thread here.
17937 (kill_lwp): New function.
17938 (send_sigstop, linux_send_signal): Use it.
17939 * proc-service.c: Clean up #ifdefs.
17940 (fpregset_info): Delete.
17941 (ps_lgetregs): Update and enable implementation.
17942 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17944 * remote-utils.c (struct sym_cache, symbol_cache): New.
17945 (input_interrupt): Print a clearer message.
17946 (async_io_enabled): New variable.
17947 (enable_async_io, disable_async_io): Use it. Update comments.
17948 (look_up_one_symbol): Use the symbol cache.
17949 * thread-db.c (thread_db_look_up_symbols): New function.
17950 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17952 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17954 * configure.in: Test for -rdynamic.
17955 * configure: Regenerated.
17956 * Makefile (INTERNAL_LDFLAGS): New.
17957 (gdbserver, gdbreplay): Use it.
17959 2004-09-02 Andrew Cagney <cagney@gnu.org>
17961 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17963 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17965 * linux-low.c (linux_wait): Clear all_processes list also.
17967 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17969 * linux-low.c: Include <errno.h>. Remove extern declaration of
17972 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17974 * gdbreplay.c, server.h, utils.c: Update copyright years.
17976 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17978 * server.c (main): Print child status or termination signal from
17979 variable 'signal', not 'sig'.
17981 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17983 * linux-low.c (linux_read_memory): Change return type to
17984 int. Check for and return error from ptrace().
17985 * target.c (read_inferior_memory): Change return type to int. Pass
17986 back return status from the_target->read_memory().
17987 * target.h (struct target_ops): Adapt *read_memory() prototype.
17989 (read_inferior_memory): Adapt prototype.
17990 * server.c (main): Return an error packet if
17991 read_inferior_memory() returns an error.
17993 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17995 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17996 Unify with other clean targets.
17998 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18000 * server.c (handle_v_cont): Call set_desired_inferior.
18002 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18004 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18006 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18008 * linux-low.c (linux_wait): Unblock async I/O.
18009 (linux_resume): Block and enable async I/O.
18010 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18011 * server.h (block_async_io, unblock_async_io): Add prototypes.
18013 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18015 * remote-utils.c (remote_open): Print a status notice after
18016 opening a TCP port.
18017 * server.c (attach_inferior): Print a status notice after
18020 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18022 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18024 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18026 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18028 * server.c, target.h: Update copyright years.
18030 2004-02-25 Roland McGrath <roland@redhat.com>
18032 * target.h (struct target_ops): New member `read_auxv'.
18033 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18034 * linux-low.c (linux_read_auxv): New function.
18035 (linux_target_ops): Initialize `read_auxv' member to that.
18037 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18039 Committed by Jim Blandy <jimb@redhat.com>.
18041 * linux-s390-low.c (s390_num_regs): Update.
18042 (s390_regmap): Remove control registers. Use __s390x__ predefine
18043 instead of GPR_SIZE to distiguish s390 and s390x targets.
18045 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18047 * linux-low.c: Update copyright year.
18048 (check_removed_breakpoint): Clear pending_is_breakpoint.
18049 (linux_set_resume_request, linux_queue_one_thread)
18050 (resume_status_pending_p): New functions.
18051 (linux_continue_one_thread): Use process->resume.
18052 (linux_resume): Only resume threads if there are no pending events.
18053 * linux-low.h (struct process_info): Add resume request
18056 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18058 * regcache.c (new_register_cache): Clear the allocated register
18059 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18061 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18063 * linux-low.c (linux_resume): Take a struct thread_resume *
18065 (linux_wait): Update call.
18066 (resume_ptr): New static variable.
18067 (linux_continue_one_thread): Renamed from
18068 linux_continue_one_process. Use resume_ptr.
18069 (linux_resume): Use linux_continue_one_thread.
18070 * server.c (handle_v_cont, handle_v_requests): New functions.
18071 (myresume): New function.
18072 (main): Handle 'v' case.
18073 * target.h (struct thread_resume): New type.
18074 (struct target_ops): Change argument of "resume" to struct
18076 (myresume): Delete macro.
18078 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18080 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18081 (uninstall): Support DESTDIR.
18083 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18085 * configure.srv: Add xscale*linux copy of arm*linux entry.
18087 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18089 * linux-arm-low.c (arm_reinsert_addr): New function.
18090 (the_low_target): Add arm_reinsert_addr.
18092 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18094 * mem-break.c: Remove whitespace at end of file.
18096 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18098 * configure.in: Check whether we need to prototype strerror.
18099 * server.h: Optionally prototype strerror.
18100 * gdbreplay.c (perror_with_name): Use strerror.
18101 * linux-low.c (linux_attach_lwp): Use strerror.
18102 * utils.c (perror_with_name): Use strerror.
18103 * config.in, configure: Regenerated.
18105 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18107 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18108 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18110 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18112 * Makefile.in (SFILES): Update.
18113 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18114 low-sun3.c: Remove files.
18116 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18118 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18119 (linux_detach_one_process, linux_detach): New functions.
18120 (linux_target_ops): Add linux_detach.
18121 * server.c (main): Handle 'D' packet.
18122 * target.h (struct target_ops): Add "detach" member.
18123 (detach_inferior): Define.
18125 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18127 From Kelley Cook <kelleycook@wideopenwest.com>:
18128 * configure.srv: Accept i[34567]86 variants.
18130 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18132 * linux-low.c (linux_wait_for_event): Correct comment typos.
18133 (linux_resume_one_process): Call check_removed_breakpoint.
18134 (linux_send_signal): New function.
18135 (linux_target_ops): Add linux_send_signal.
18136 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18138 * target.h (struct target_ops): Add send_signal.
18140 2003-05-29 Jim Blandy <jimb@redhat.com>
18142 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18143 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18144 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18145 away part of the register's value.
18147 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18149 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18150 (linux_wait_for_event, linux_init_signals): Likewise.
18152 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18154 * configure.in: Check for stdlib.h.
18155 * configure: Regenerated.
18156 * config.in: Regenerated.
18158 2003-01-04 Andreas Schwab <schwab@suse.de>
18160 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18162 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18164 * Makefile.in: Remove obsolete code.
18166 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18168 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18169 defined(PT_FPR0_HI).
18171 2002-11-17 Stuart Hughes <seh@zee2.com>
18173 * linux-arm-low.c (arm_num_regs): Increase.
18174 (arm_regmap): Include status register.
18176 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18178 * linux-low.c (register_addr): Remove incorrect -1 check.
18180 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18182 * linux-low.c (linux_create_inferior): Call setpgid. Return
18184 (unstopped_p, linux_signal_pid): Remove.
18185 (linux_target_ops): Remove linux_signal_pid.
18186 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18187 global instead of target method.
18188 * target.h (struct target_ops): Remove signal_pid. Update comment
18189 for create_inferior.
18190 * server.c (signal_pid): New variable.
18191 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18192 gdbserver. Set the child to be the foreground process group.
18193 (attach_inferior): Set signal_pid.
18195 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18197 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18199 2002-08-20 Jim Blandy <jimb@redhat.com>
18201 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18204 2002-08-01 Andrew Cagney <cagney@redhat.com>
18206 * Makefile.in: Make chill references obsolete.
18208 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18210 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18211 * configure: Regenerate.
18212 * config.in: Regenerate.
18214 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18216 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18217 (perror_with_name, remote_close, remote_open, expect, play): Static.
18219 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18221 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18222 byte offsets instead of an array of indexes.
18223 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18225 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18227 * regcache.c: Add comment.
18229 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18231 * thread-db.c: New file.
18232 * proc-service.c: New file.
18233 * acinclude.m4: New file.
18234 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18235 proc-service.o, and thread-db.o.
18236 (linux-low.o): Add USE_THREAD_DB.
18237 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18238 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18239 * aclocal.m4: Regenerated.
18240 * config.in: Regenerated.
18241 * configure: Regenerated.
18242 * configure.in: Check for proc_service.h, sys/procfs.h,
18243 thread_db.h, and linux/elf.h headrs.
18244 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18245 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18246 Check for -lthread_db and thread support.
18247 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18248 PowerPC, and SuperH.
18249 * i387-fp.c: Constify arguments.
18250 * i387-fp.h: Likewise.
18251 * inferiors.c: (struct thread_info): Renamed from
18252 `struct inferior_info'. Remove PID member. Use generic inferior
18253 list header. All uses updated.
18254 (inferiors, signal_pid): Removed.
18255 (all_threads): New variable.
18256 (get_thread): Define.
18257 (add_inferior_to_list): New function.
18258 (for_each_inferior): New function.
18259 (change_inferior_id): New function.
18260 (add_inferior): Removed.
18261 (remove_inferior): New function.
18262 (add_thread): New function.
18263 (free_one_thread): New function.
18264 (remove_thread): New function.
18265 (clear_inferiors): Use for_each_inferior and free_one_thread.
18266 (find_inferior): New function.
18267 (find_inferior_id): New function.
18268 (inferior_target_data): Update argument type.
18269 (set_inferior_target_data): Likewise.
18270 (inferior_regcache_data): Likewise.
18271 (set_inferior_regcache_data): Likewise.
18272 * linux-low.c (linux_bp_reinsert): Remove.
18273 (all_processes, stopping_threads, using_thrads)
18274 (struct pending_signals, debug_threads, pid_of): New.
18275 (inferior_pid): Replace with macro.
18276 (struct inferior_linux_data): Remove.
18277 (get_stop_pc, add_process): New functions.
18278 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18279 Use add_process and add_thread.
18280 (linux_attach_lwp): New function, based on old linux_attach. Use
18281 add_process and add_thread. Set stop_expected for new threads.
18282 (linux_attach): New function.
18283 (linux_kill_one_process): New function.
18284 (linux_kill): Kill all LWPs.
18285 (linux_thread_alive): Use find_inferior_id.
18286 (check_removed_breakpoints, status_pending_p): New functions.
18287 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18288 Update. Use WNOHANG. Wait for cloned processes also. Update process
18289 struct for the found process.
18290 (linux_wait_for_event): New function.
18291 (linux_wait): Use it. Support LWPs.
18292 (send_sigstop, wait_for_sigstop, stop_all_processes)
18293 (linux_resume_one_process, linux_continue_one_process): New functions.
18294 (linux_resume): Support LWPs.
18295 (REGISTER_RAW_SIZE): Remove.
18296 (fetch_register): Use register_size instead. Call supply_register.
18297 (usr_store_inferior_registers): Likewise. Call collect_register.
18298 Fix recursive case.
18299 (regsets_fetch_inferior_registers): Improve error message.
18300 (regsets_store_inferior_registers): Add debugging.
18301 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18302 (unstopped_p, linux_signal_pid): New functions.
18303 (linux_target_ops): Add linux_signal_pid.
18304 (linux_init_signals): New function.
18305 (initialize_low): Call it. Initialize using_threads.
18306 * regcache.c (inferior_regcache_data): Add valid
18308 (get_regcache): Fetch registers lazily. Add fetch argument
18309 and update all callers.
18310 (regcache_invalidate_one, regcache_invalidate): New
18312 (new_register_cache): Renamed from create_register_cache.
18313 Return the new regcache.
18314 (free_register_cache): Change argument to a void *.
18315 (registers_to_string, registers_from_string): Call get_regcache
18316 with fetch flag set.
18317 (register_data): Make static. Pass fetch flag to get_regcache.
18318 (supply_register): Call get_regcache with fetch flag clear.
18319 (collect_register): Call get_regcache with fetch flag set.
18320 (collect_register_as_string): New function.
18321 * regcache.h: Update.
18322 * remote-utils.c (putpkt): Flush after debug output and use
18324 Handle input interrupts while waiting for an ACK.
18325 (input_interrupt): Use signal_pid method.
18326 (getpkt): Flush after debug output and use stderr.
18327 (outreg): Use collect_register_as_string.
18328 (new_thread_notify, dead_thread_notify): New functions.
18329 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18330 and general_thread.
18331 (look_up_one_symbol): Flush after debug output.
18332 * server.c (step_thread, server_waiting): New variables.
18333 (start_inferior): Don't use signal_pid. Update call to mywait.
18334 (attach_inferior): Update call to mywait.
18335 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18336 (main): Don't fetch/store registers explicitly. Use
18337 set_desired_inferior. Support proposed ``Hs'' packet. Update
18339 * server.h: Update.
18340 (struct inferior_list, struct_inferior_list_entry): New.
18341 * target.c (set_desired_inferior): New.
18342 (write_inferior_memory): Constify.
18343 (mywait): New function.
18344 * target.h: Update.
18345 (struct target_ops): New signal_pid method.
18346 (mywait): Removed macro, added prototype.
18348 * linux-low.h (regset_func): Removed.
18349 (regset_fill_func, regset_store_func): New.
18350 (enum regset_type): New.
18351 (struct regset_info): Add type field. Use new operation types.
18352 (struct linux_target_ops): stop_pc renamed to get_pc.
18353 Add decr_pc_after_break and breakpoint_at.
18354 (get_process, get_thread_proess, get_process_thread)
18355 (strut process_info, all_processes, linux_attach_lwp)
18356 (thread_db_init): New.
18358 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18359 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18360 (the_low_target): Add new members.
18361 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18362 (i386_store_fpxregset): Constify.
18363 (target_regsets): Add new kind identifier.
18364 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18365 (i386_set_pc): Add debugging.
18366 (i386_breakpoint_at): New function.
18367 (the_low_target): Add new members.
18368 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18369 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18370 (mips_breakpoint_at): New.
18371 (the_low_target): Add new members.
18372 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18373 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18374 (the_low_target): Add new members.
18375 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18376 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18377 (the_low_target): Add new members.
18378 * linux-x86-64-low.c (target_regsets): Add new kind
18381 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18383 From Martin Pool <mbp@samba.org>:
18384 * server.c (gdbserver_usage): New function.
18387 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18389 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18390 stop_at -> stop_pc.
18392 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18394 * Makefile.in: Remove obsolete code.
18396 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18398 * linux-low.c (regsets_fetch_inferior_registers),
18399 (regsets_store_inferior_registers): Removed cast to int from
18401 * regcache.h: Added declaration of struct inferior_info.
18403 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18405 * inferiors.c (struct inferior_info): Add regcache_data.
18406 (add_inferior): Call create_register_cache.
18407 (clear_inferiors): Call free_register_cache.
18408 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18409 * regcache.c (struct inferior_regcache_data): New.
18410 (registers): Remove.
18411 (get_regcache): New function.
18412 (create_register_cache, free_register_cache): New functions.
18413 (set_register_cache): Don't initialize the register cache here.
18414 (registers_to_string, registers_from_string, register_data): Call
18416 * regcache.h: Add prototypes.
18417 * server.h: Likewise.
18419 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18421 * mem-break.c: New file.
18422 * mem-break.h: New file.
18423 * Makefile.in: Add mem-break.o rule; update server.h
18425 * inferiors.c (struct inferior_info): Add target_data
18427 (clear_inferiors): Free target_data member if set.
18428 (inferior_target_data, set_inferior_target_data): New functions.
18429 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18430 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18431 * linux-low.c (linux_bp_reinsert): New variable.
18432 (struct inferior_linux_data): New.
18433 (linux_create_inferior): Use set_inferior_target_data.
18434 (linux_attach): Likewise. Call add_inferior.
18435 (linux_wait_for_one_inferior): New function.
18436 (linux_wait): Call it.
18437 (linux_write_memory): Add const.
18438 (initialize_low): Call set_breakpoint_data.
18439 * linux-low.h (struct linux_target_ops): Add breakpoint
18441 * server.c (attach_inferior): Remove extra add_inferior
18443 * server.h: Include mem-break.h. Update inferior.c
18445 * target.c (read_inferior_memory)
18446 (write_inferior_memory): New functions.
18447 * target.h (read_inferior_memory)
18448 (write_inferior_memory): Change macros to prototypes.
18449 (struct target_ops): Update comments. Add const to write_memory
18452 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18454 * linux-low.c (usr_store_inferior_registers): Support
18455 registers which are allowed to fail to store.
18456 * linux-low.h (linux_target_ops): Likewise.
18457 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18458 (ppc_cannot_store_register): FPSCR may not be storable.
18460 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18462 * server.h: Include <string.h> if HAVE_STRING_H.
18463 * ChangeLog: Correct paths in last ChangeLog entry.
18465 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18467 * linux-low.h: Remove obsolete prototypes.
18468 (struct linux_target_ops): New.
18469 (extern the_low_target): New.
18470 * linux-low.c (num_regs, regmap): Remove declarations.
18471 (register_addr): Use the_low_target explicitly.
18472 (fetch_register): Likewise.
18473 (usr_fetch_inferior_registers): Likewise.
18474 (usr_store_inferior_registers): Likewise.
18475 * linux-arm-low.c (num_regs): Remove.
18476 (arm_num_regs): Define.
18477 (arm_regmap): Renamed from regmap, made static.
18478 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18480 (arm_cannot_store_register): Renamed from cannot_store_register,
18482 (the_low_target): New.
18483 * linux-i386-low.c (num_regs): Remove.
18484 (i386_num_regs): Define.
18485 (i386_regmap): Renamed from regmap, made static.
18486 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18488 (i386_cannot_store_register): Renamed from cannot_store_register,
18490 (the_low_target): New.
18491 * linux-ia64-low.c (num_regs): Remove.
18492 (ia64_num_regs): Define.
18493 (ia64_regmap): Renamed from regmap, made static.
18494 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18496 (ia64_cannot_store_register): Renamed from cannot_store_register,
18498 (the_low_target): New.
18499 * linux-m68k-low.c (num_regs): Remove.
18500 (m68k_num_regs): Define.
18501 (m68k_regmap): Renamed from regmap, made static.
18502 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18504 (m68k_cannot_store_register): Renamed from cannot_store_register,
18506 (the_low_target): New.
18507 * linux-mips-low.c (num_regs): Remove.
18508 (mips_num_regs): Define.
18509 (mips_regmap): Renamed from regmap, made static.
18510 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18512 (mips_cannot_store_register): Renamed from cannot_store_register,
18514 (the_low_target): New.
18515 * linux-ppc-low.c (num_regs): Remove.
18516 (ppc_num_regs): Define.
18517 (ppc_regmap): Renamed from regmap, made static.
18518 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18520 (ppc_cannot_store_register): Renamed from cannot_store_register,
18522 (the_low_target): New.
18523 * linux-s390-low.c (num_regs): Remove.
18524 (s390_num_regs): Define.
18525 (s390_regmap): Renamed from regmap, made static.
18526 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18528 (s390_cannot_store_register): Renamed from cannot_store_register,
18530 (the_low_target): New.
18531 * linux-sh-low.c (num_regs): Remove.
18532 (sh_num_regs): Define.
18533 (sh_regmap): Renamed from regmap, made static.
18534 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18536 (sh_cannot_store_register): Renamed from cannot_store_register,
18538 (the_low_target): New.
18539 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18540 (the_low_target): New.
18542 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18544 * Makefile.in: Add stamp-h target.
18545 * configure.in: Create stamp-h.
18546 * configure: Regenerated.
18548 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18550 * inferiors.c: New file.
18551 * target.c: New file.
18552 * target.h: New file.
18553 * Makefile.in: Add target.o and inferiors.o. Update
18555 * linux-low.c (inferior_pid): New static variable,
18556 moved from server.c.
18557 (linux_create_inferior): Renamed from create_inferior.
18558 Call add_inferior. Return 0 on success instead of a PID.
18559 (linux_attach): Renamed from myattach.
18560 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18561 (linux_thread_alive): Renamed from mythread_alive.
18562 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18564 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18565 (regsets_store_inferior_registers): Correct error message.
18566 Add missing ``return 0''.
18567 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18568 (linux_store_registers): Renamed from store_inferior_registers.
18569 (linux_read_memory): Renamed from read_inferior_memory.
18570 (linux_write_memory): Renamed from write_inferior_memory.
18571 (linux_target_ops): New structure.
18572 (initialize_low): Call set_target_ops ().
18573 * remote-utils.c (unhexify): New function.
18574 (hexify): New function.
18575 (input_interrupt): Send signals to ``signal_pid''.
18576 * server.c (inferior_pid): Remove.
18577 (start_inferior): Update create_inferior call.
18578 (attach_inferior): Call add_inferior.
18579 (handle_query): New function.
18580 (main): Call handle_query for `q' packets.
18581 * server.h: Include "target.h". Remove obsolete prototypes.
18582 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18584 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18586 * Makefile.in: Add WARN_CFLAGS. Update configury
18588 * configure.in: Check for <string.h>
18589 * configure: Regenerate.
18590 * config.in: Regenerate.
18591 * gdbreplay.c: Include needed system headers.
18592 (remote_open): Remove strchr prototype.
18593 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18594 * regcache.c (supply_register): Change buf argument to const void *.
18595 (supply_register_by_name): Likewise.
18596 (collect_register): Change buf argument to void *.
18597 (collect_register_by_name): Likewise.
18598 * regcache.h: Add missing prototypes.
18599 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18600 * server.c (handle_query): New function.
18601 (attached): New static variable, moved out of main.
18602 (main): Quiet longjmp clobber warnings.
18603 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18604 * utils.c (error): Remove NORETURN.