1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's read_auxv op into a method of
6 * target.h (class process_stratum_target): Remove the target op.
7 (struct process_target): Add the target op. Also add
9 * target.cc (process_target::read_auxv): Define.
10 (process_target::supports_read_auxv): Define.
12 Update the derived classes and callers below.
14 * server.cc (handle_qxfer_auxv): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_read_auxv): Define.
18 (linux_read_auxv): Turn into ...
19 (linux_process_target::read_auxv): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 (nto_process_target::supports_read_auxv): Define.
24 (nto_read_auxv): Turn into ...
25 (nto_process_target::read_auxv): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
29 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
31 Turn process_stratum_target's request_interrupt op into a method of
34 * target.h (struct process_stratum_target): Remove the target op.
35 (class process_target): Add the target op.
37 Update the derived classes and callers below.
39 * remote-utils.cc (putpkt_binary_1): Update.
40 (input_interrupt): Update.
42 * server.cc (handle_v_requests): Update.
43 * linux-low.cc (linux_target_ops): Update.
44 (linux_request_interrupt): Turn into ...
45 (linux_process_target::request_interrupt): ... this.
46 * linux-low.h (class linux_process_target): Update.
47 * lynx-low.cc (lynx_target_ops): Update.
48 (lynx_request_interrupt): Turn into ...
49 (lynx_process_target::request_interrupt): ... this.
50 * lynx-low.h (class lynx_process_target): Update.
51 * nto-low.cc (nto_target_ops): Update.
52 (nto_request_interrupt): Turn into ...
53 (nto_process_target::request_interrupt): ... this.
54 * nto-low.h (class nto_process_target): Update.
55 * win32-low.cc (win32_target_ops): Update.
56 (win32_request_interrupt): Turn into ...
57 (win32_process_target::request_interrupt): ... this.
58 * win32-low.h (class win32_process_target): Update.
60 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
62 Turn process_stratum_target's look_up_symbols op into a method of
65 * target.h (struct process_stratum_target): Remove the target op.
66 (class process_target): Add the target op.
67 * target.cc (process_target::look_up_symbols): Define.
69 Update the derived classes and callers below.
71 * server.cc (handle_query): Update.
72 * linux-low.cc (linux_target_ops): Update.
73 (linux_look_up_symbols): Turn into ...
74 (linux_process_target::look_up_symbols): ... this.
75 * linux-low.h (class linux_process_target): Update.
76 * lynx-low.cc (lynx_target_ops): Update.
77 * nto-low.cc (nto_target_ops): Update.
78 * win32-low.cc (win32_target_ops): Update.
80 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
82 Turn process_stratum_target's read_memory and write_memory
83 ops into methods of process_target.
85 * target.h (struct process_stratum_target): Remove the target ops.
86 (class process_target): Add the target ops.
88 Update the derived classes and callers below.
90 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
91 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
92 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
93 (arm_get_syscall_trapinfo): Update.
94 * linux-cris-low.cc (cris_breakpoint_at): Update.
95 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
96 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
97 * linux-mips-low.cc (mips_breakpoint_at): Update.
98 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
99 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
100 * linux-sh-low.cc (sh_breakpoint_at): Update.
101 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
102 (sparc_store_gregset_from_stack): Update.
103 (sparc_breakpoint_at): Update.
104 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
105 * linux-tile-low.cc (tile_breakpoint_at): Update.
106 * linux-x86-low.cc (x86_breakpoint_at): Update.
107 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
108 * mem-brea.cc (insert_memory_breakpoint): Update.
109 (validate_inserted_breakpoint): Update.
110 * target.cc (read_inferior_memory): Update.
111 (target_write_memory): Update.
112 * linux-low.cc (linux_target_ops): Update.
113 (linux_read_memory): Make a wrapper around the read_memory target
115 (linux_process_target::read_memory): Rename from linux_read_memory.
116 (linux_write_memory): Turn into ...
117 (linux_process_target::write_memory): ... this.
118 * linux-low.h (class linux_process_target): Update.
119 * lynx-low.cc (lynx_target_ops): Update.
120 (lynx_read_memory): Turn into ...
121 (lynx_process_target::read_memory): ... this.
122 (lynx_write_memory): Turn into ...
123 (lynx_process_target::write_memory): ... this.
124 * lynx-low.h (class lynx_process_target): Update.
125 * nto-low.cc (nto_target_ops): Update.
126 (nto_read_memory): Turn into ...
127 (nto_process_target::read_memory): ... this.
128 (nto_write_memory): Turn into ...
129 (nto_process_target::write_memory): ... this.
130 * nto-low.h (class nto_process_target): Update.
131 * win32-low.cc (win32_target_ops): Update.
132 (win32_read_inferior_memory): Turn into ...
133 (win32_process_target::read_memory): ... this.
134 (win32_write_inferior_memory): Turn into ...
135 (win32_process_target::write_memory): ... this.
136 * win32-low.h (class win32_process_target): Update.
138 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
140 Turn process_stratum_target's prepare_to_access_memory and
141 done_accessing_memory ops into methods of process_target.
143 * target.h (struct process_stratum_target): Remove the target ops.
144 (class process_target): Add the target ops.
145 * target.cc (process_target::prepare_to_access_memory): Define.
146 (process_target::done_accessing_memory): Define.
147 (prepare_to_access_memory): Update.
148 (done_accessing_memory): Update.
150 Update the derived classes and callers below.
152 * linux-low.cc (linux_target_ops): Update.
153 (linux_prepare_to_access_memory): Turn into ...
154 (linux_process_target::prepare_to_access_memory): ... this.
155 (linux_done_accessing_memory): Turn into ...
156 (linux_process_target::done_accessing_memory): ... this.
157 * linux-low.h (class linux_process_target): Update.
158 * lynx-low.cc (lynx_target_ops): Update.
159 * nto-low.cc (nto_target_ops): Update.
160 * win32-low.cc (win32_target_ops): Update.
162 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
164 Turn process_stratum_target's fetch_registers and store_registers
165 ops into methods of process_target.
167 * target.h (struct process_stratum_target): Remove the target ops.
168 (class process_target): Add the target ops.
169 (fetch_inferior_registers): Update the macro.
170 (store_inferior_registers): Update the macro.
172 Update the derived classes and callers below.
174 * linux-low.cc (linux_target_ops): Update.
175 (linux_fetch_registers): Turn into ...
176 (linux_process_target::fetch_registers): ... this.
177 (linux_store_registers): Turn into ...
178 (linux_process_target::store_registers): ... this.
179 * linux-low.h (class linux_process_target): Update.
180 * lynx-low.cc (lynx_target_ops): Update.
181 (lynx_fetch_registers): Turn into ...
182 (lynx_process_target::fetch_registers): ... this.
183 (lynx_store_registers): Turn into ...
184 (lynx_process_target::store_registers): ... this.
185 * lynx-low.h (class lynx_process_target): Update.
186 * nto-low.cc (nto_target_ops): Update.
187 (nto_fetch_registers): Turn into ...
188 (nto_process_target::fetch_registers): ... this.
189 (nto_store_registers): Turn into ...
190 (nto_process_target::store_registers): ... this.
191 * nto-low.h (class nto_process_target): Update.
192 * win32-low.cc (win32_target_ops): Update.
193 (win32_fetch_inferior_registers): Turn into ...
194 (win32_process_target::fetch_registers): ... this.
195 (win32_store_inferior_registers): Turn into ...
196 (win32_process_target::store_registers): ... this.
197 * win32-low.h (class win32_process_target): Update.
199 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
201 Turn process_stratum_target's wait op into a method of
204 * target.h (struct process_stratum_target): Remove the target op.
205 (class process_target): Add the target op.
207 Update the derived classes and callers below.
209 * target.cc (target_wait): Update.
210 * linux-low.cc (linux_target_ops): Update.
211 (linux_wait): Turn into ...
212 (linux_process_target::wait): ... this.
213 * linux-low.h (class linux_process_target): Update.
214 * lynx-low.cc (lynx_target_ops): Update.
215 (lynx_wait): Turn into ...
216 (lynx_process_target::wait): ... this.
217 * lynx-low.h (class lynx_process_target): Update.
218 * nto-low.cc (nto_target_ops): Update.
219 (nto_wait): Turn into ...
220 (nto_process_target::wait): ... this.
221 * nto-low.h (class nto_process_target): Update.
222 * win32-low.cc (win32_target_ops): Update.
223 (win32_wait): Turn into ...
224 (win32_process_target::wait): ... this.
225 (do_initial_child_stuff): Update.
226 * win32-low.h (class win32_process_target): Update.
228 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
230 Turn process_stratum_target's resume op into a method of
233 * target.h (struct process_stratum_target): Remove the target op.
234 (class process_target): Add the target op.
236 Update the derived classes and callers below.
238 * server.cc (resume): Update.
239 * target.cc (target_stop_and_wait): Update.
240 (target_continue_no_signal): Update.
241 (target_continue): Update.
242 * linux-low.cc (linux_target_ops): Update.
243 (linux_resume): Turn into ...
244 (linux_process_target::resume): ... this.
245 * linux-low.h (class linux_process_target): Update.
246 * lynx-low.cc (lynx_target_ops): Update.
247 (lynx_resume): Turn into ...
248 (lynx_process_target::resume): ... this.
249 * lynx-low.h (class lynx_process_target): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 (nto_resume): Turn into ...
252 (nto_process_target::resume): ... this.
253 * nto-low.h (class nto_process_target): Update.
254 * win32-low.cc (win32_target_ops): Update.
255 (win32_resume): Turn into ...
256 (win32_process_target::resume): ... this.
257 (win32_process_target::detach): Update.
258 (do_initial_child_stuff): Update.
259 * win32-low.h (class win32_process_target): Update.
261 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
263 Turn process_stratum_target's thread_alive op into a method of
266 * target.h (struct process_stratum_target): Remove the target op.
267 (class process_target): Add the target op.
268 (mythread_alive): Update the macro.
270 Update the derived classes and callers below.
272 * linux-low.cc (linux_target_ops): Update.
273 (linux_thread_alive): Turn into ...
274 (linux_process_target::thread_alive): ... this.
275 (wait_for_sigstop): Update.
276 * linux-low.h (class linux_process_target): Update.
277 * lynx-low.cc (lynx_target_ops): Update.
278 (lynx_thread_alive): Turn into ...
279 (lynx_process_target::thread_alive): ... this.
280 * lynx-low.h (class lynx_process_target): Update.
281 * nto-low.cc (nto_target_ops): Update.
282 (nto_thread_alive): Turn into ...
283 (nto_process_target::thread_alive): ... this.
284 * nto-low.h (class nto_process_target): Update.
285 * win32-low.cc (win32_target_ops): Update.
286 (win32_thread_alive): Turn into ...
287 (win32_process_target::thread_alive): ... this.
288 * win32-low.h (class win32_process_target): Update.
290 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
292 Turn process_stratum_target's join op into a method of
295 * target.h (struct process_stratum_target): Remove the target op.
296 (class process_target): Add the target op.
297 (join_inferior): Update the macro.
299 Update the derived classes and callers below.
301 * linux-low.cc (linux_target_ops): Update.
302 (linux_join): Turn into ...
303 (linux_process_target::join): ... this.
304 * linux-low.h (class linux_process_target): Update.
305 * lynx-low.cc (lynx_target_ops): Update.
306 (lynx_join): Turn into ...
307 (lynx_process_target::join): ... this.
308 * lynx-low.h (class lynx_process_target): Update.
309 * nto-low.cc (nto_target_ops): Update.
310 (nto_process_target::join): Define.
311 * nto-low.h (class nto_process_target): Update.
312 * win32-low.cc (win32_target_ops): Update.
313 (win32_join): Turn into ...
314 (win32_process_target::join): ... this.
315 * win32-low.h (class win32_process_target): Update.
317 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
319 Turn process_stratum_target's mourn op into a method of
322 * target.h (struct process_stratum_target): Remove the target op.
323 (class process_target): Add the target op.
325 Update the derived classes and callers below.
327 * target.cc (target_mourn_inferior): Update.
328 * linux-low.cc (linux_target_ops): Update.
329 (linux_mourn): Turn into ...
330 (linux_process_target::mourn): ... this.
331 (handle_extended_wait): Update.
332 (linux_process_target::kill): Update.
333 (linux_process_target::detach): Update.
334 * linux-low.h (class linux_process_target): Update.
335 * lynx-low.cc (lynx_target_ops): Update.
336 (lynx_mourn): Turn into ...
337 (lynx_process_target::mourn): ... this.
338 * lynx-low.h (class lynx_process_target): Update.
339 * nto-low.cc (nto_target_ops): Update.
340 (nto_mourn): Turn into ...
341 (nto_process_target::mourn): ... this.
342 * nto-low.h (class nto_process_target): Update.
343 * win32-low.cc (win32_target_ops): Update.
344 (win32_mourn): Turn into ...
345 (win32_process_target::mourn): ... this.
346 * win32-low.h (class win32_process_target): Update.
348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
350 Turn process_stratum_target's detach op into a method of
353 * target.h (struct process_stratum_target): Remove the target op.
354 (class process_target): Add the target op.
355 (detach_inferior): Update the macro.
357 Update the derived classes and callers below.
359 * linux-low.cc (linux_target_ops): Update.
360 (linux_detach): Turn into ...
361 (linux_process_target::detach): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 (lynx_detach): Turn into ...
365 (lynx_process_target::detach): ... this.
366 * lynx-low.h (class lynx_process_target): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 (nto_detach): Turn into ...
369 (nto_process_target::detach): ... this.
370 * nto-low.h (class nto_process_target): Update.
371 * win32-low.cc (win32_target_ops): Update.
372 (win32_detach): Turn into ...
373 (win32_process_target::detach): ... this.
374 * win32-low.h (class win32_process_target): Update.
376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
378 Turn process_stratum_target's kill op into a method of
381 * target.h (struct process_stratum_target): Remove the target op.
382 (class process_target): Add the target op.
384 Update the derived classes and callers below.
386 * target.cc (kill_inferior): Update.
387 * linux-low.cc (linux_target_ops): Update.
388 (linux_kill): Turn into ...
389 (linux_process_target::kill): ... this.
390 * linux-low.h (class linux_process_target): Update.
391 * lynx-low.cc (lynx_target_ops): Update.
392 (lynx_kill): Turn into ...
393 (lynx_process_target::kill): ... this.
394 * lynx-low.h (class lynx_process_target): Update.
395 * nto-low.cc (nto_target_ops): Update.
396 (nto_kill): Turn into ...
397 (nto_process_target::kill): ... this.
398 * nto-low.h (class nto_process_target): Update.
399 * win32-low.cc (win32_target_ops): Update.
400 (win32_kill): Turn into ...
401 (win32_process_target::kill): ... this.
402 * win32-low.h (class win32_process_target): Update.
404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
406 Turn process_stratum_target's attach op into a method of
409 * target.h (struct process_stratum_target): Remove the target op.
410 (class process_target): Add the target op.
411 (myattach): Update the macro.
413 Update the derived classes and callers below.
415 * linux-low.cc (linux_target_ops): Update.
416 (linux_attach): Turn into ...
417 (linux_process_target::attach): ... this.
418 * linux-low.h (class linux_process_target): Update.
419 * lynx-low.cc (lynx_target_ops): Update.
420 (lynx_attach): Turn into ...
421 (lynx_process_target::attach): ... this.
422 * lynx-low.h (class lynx_process_target): Update.
423 * nto-low.cc (nto_target_ops): Update.
424 (nto_attach): Turn into ...
425 (nto_process_target::attach): ... this.
426 * nto-low.h (class nto_process_target): Update.
427 * win32-low.cc (win32_target_ops): Update.
428 (win32_attach): Turn into ...
429 (win32_process_target::attach): ... this.
430 * win32-low.h (class win32_process_target): Update.
432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434 Turn process_stratum_target's post_create_inferior op into a method
437 * target.h (struct process_stratum_target): Remove the target op.
438 (class process_target): Add the target op.
439 (target_post_create_inferior): Update the macro.
440 * target.cc (process_target::post_create_inferior): Define.
442 Update the derived classes and callers below.
444 * linux-low.cc (linux_target_ops): Update.
445 (linux_post_create_inferior): Turn into ...
446 (linux_process_target::post_create_inferior): ... this.
447 * linux-low.h (class linux_process_target): Update.
448 * lynx-low.cc (lynx_target_ops): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 * win32-low.cc (win32_target_ops): Update.
452 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
454 Turn process_stratum_target's create_inferior op into a method of
457 * target.h (struct process_stratum_target): Remove the target op.
458 (class process_target): Add the target op.
459 (create_inferior): Rename the macro to ...
460 (target_create_inferior): ... this.
462 Update the derived classes and callers below.
464 * server.cc (handle_v_run): Update.
465 (captured_main): Update.
466 (process_serial_event): Update.
467 * linux-low.cc (linux_target_ops): Update.
468 (linux_create_inferior): Turn into ...
469 (linux_process_target::create_inferior): ... this.
470 * linux-low.h (class linux_process_target): Update.
471 * lynx-low.cc (lynx_target_ops): Update.
472 (lynx_create_inferior): Turn into ...
473 (lynx_process_target::create_inferior): ... this.
474 * lynx-low.h (class lynx_process_target): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 (nto_create_inferior): Turn into ...
477 (nto_process_target::create_inferior): ... this.
478 * nto-low.h (class nto_process_target): Update.
479 * win32-low.cc (win32_target_ops): Update.
480 (win32_create_inferior): Turn into ...
481 (win32_process_target::create_inferior): ... this.
482 * win32-low.h (class win32_process_target): Update.
484 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
486 * target.h (class process_target): New class definition.
487 (struct process_stratum_target) <pt>: New field with type
489 * linux-low.h (class linux_process_target): Define as a derived
490 class of 'process_target'.
491 * linux-low.cc (linux_target_ops): Add a linux_process_target*
493 * lynx-low.h (class lynx_process_target): Define as a derived
494 class of 'process_target'.
495 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
497 * nto-low.h (class nto_process_target): Define as a derived
498 class of 'process_target'.
499 * nto-low.cc (nto_target_ops): Add an nto_process_target*
501 * win32-low.h (class win32_process_target): Define as a derived
502 class of 'process_target'.
503 * win32-low.cc (win32_target_ops): Add a win32_process_target*
506 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
508 * configure: Regenerate.
510 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
511 Andrew Burgess <andrew.burgess@embecosm.com>
513 * linux-riscv-low.cc: New file.
514 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
515 and nat/riscv-linux-tdesc.c.
516 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
517 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
520 2020-02-14 Tom Tromey <tom@tromey.com>
522 * acinclude.m4: Don't include acx_configure_dir.m4.
523 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
524 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
525 (all, install-only, uninstall, clean-info, clean)
526 (maintainer-clean): Don't recurse.
527 (subdir_do, all-lib): Remove.
528 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
530 (generated_files): Update.
531 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
532 * configure: Rebuild.
533 * configure.ac: Don't configure gnulib or libiberty.
536 2020-02-14 Eli Zaretskii <eliz@gnu.org>
538 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
539 preparing the command line for CreateProcess.
540 (win32_create_inferior): Reflect the program name in debugging
541 output that shows the process and its command line.
543 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
545 * Makefile.in: Rename source files from .c to .cc.
546 * %.c: Rename to %.cc.
547 * configure.ac: Rename server.c to server.cc.
548 * configure: Re-generate.
550 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
552 * Makefile.in: Rename gdbsupport source files from .c to .cc.
554 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
556 * win32-low.c (win32_create_inferior): Set signal_pid.
558 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
559 Pedro Alves <palves@redhat.com>
561 Skip building gdbserver in a cross-configuration.
562 * configure.srv: Set $gdbserver_host depending on whether $target
563 is $host. Use $gdbserver_host instead of $host.
565 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
567 * configure: Re-generate.
569 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
571 * configure: Re-generate.
573 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
575 * acinclude.m4: Update warning.m4 path.
577 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
579 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
580 (handle_exception): Set siginfo_er.
581 (win32_xfer_siginfo): New function.
583 2020-02-07 Tom Tromey <tom@tromey.com>
584 Pedro Alves <palves@redhat.com>
586 * README: Update build documentation.
587 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
589 * configure.ac: Update paths.
590 * configure: Rebuild.
591 * acinclude.m4: Update paths.
592 * Makefile.in: Update include paths.
593 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
594 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
595 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
596 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
597 (%-generated.c): Update paths.
598 * Move entire directory from ../gdb/gdbserver.
600 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
602 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
604 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
606 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
607 assignment instead of srv_linux_obj.
609 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
611 * server.c (handle_qxfer_libraries): Write segment-address with
614 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
616 * Makefile.in (install-strip): New target.
617 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
618 * aclocal.m4: Regenerate.
619 * configure: Regenerate.
620 * configure.ac: Add AM_PROG_INSTALL_STRIP.
622 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
624 * Makefile.in (SFILES): Adjust paths to point to real files.
625 (OBS): Move waitstatus.o to target/waitstatus.o.
626 (TAGS): Transform paths appropriately.
628 (nat/%.o): ... this pattern rule.
630 (target/%.o): ... this pattern rule.
631 * configure.srv: Adjust paths throughout to include nat/ prefix
632 with the revant files.
633 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
634 * configure: Regenerate.
636 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
638 * Makefile.in (TAGS): Remove config files from the recipe.
640 2020-01-14 Tom Tromey <tom@tromey.com>
642 * configure: Rebuild.
643 * configure.ac: Remove any checks that were added to common.m4.
644 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
647 2020-01-14 Tom Tromey <tom@tromey.com>
649 * server.h: Include config.h.
650 * gdbreplay.c: Include config.h.
651 * configure: Rebuild.
652 * configure.ac: Don't source common.host.
653 * acinclude.m4: Update path.
654 * Makefile.in (INCSUPPORT): New variable.
655 (INCLUDE_CFLAGS): Add INCSUPPORT.
656 (SFILES): Update paths.
657 (version-generated.c): Update path to create-version.sh.
658 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
660 2020-01-14 Tom Tromey <tom@tromey.com>
662 * configure.ac (LIBS): Use WIN32APILIBS.
663 (USE_WIN32API): Don't define.
664 * configure: Rebuild.
666 2020-01-14 Tom Tromey <tom@tromey.com>
668 * configure: Rebuild.
670 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
672 * Makefile.in (%-generated.c): Remove rule for files from
675 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
677 * configure: Re-generate.
679 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
681 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
683 * tracepoint.c (stop_tracing, flush_trace_buffer,
684 about_to_request_buffer_space, get_trace_state_variable_value,
685 set_trace_state_variable_value, gdb_collect): Add declaration.
687 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
689 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
690 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
691 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
692 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
693 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
696 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
698 * inferiors.c: Include gdbsupport/common-inferior.h.
700 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
702 * hostio-errno.c: Include hostio.h.
704 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
706 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
709 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
711 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
712 * linux-arm-tdesc.h: Include arch/arm.h.
714 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
716 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
718 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
720 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
721 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
723 2020-01-10 Pedro Alves <palves@redhat.com>
725 * fork-child.c (post_fork_inferior): Pass target down to
727 * inferiors.c (switch_to_thread): Add process_stratum_target
729 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
730 * nto-low.c (nto_target_ops): Now a process_stratum_target.
731 * linux-low.c (linux_target_ops): Now a process_stratum_target.
732 * remote-utils.c (prepare_resume_reply): Pass the target to
734 * target.c (the_target): Now a process_stratum_target.
735 (done_accessing_memory): Pass the target to switch_to_thread.
736 (set_target_ops): Ajust to use process_stratum_target.
737 * target.h (struct target_ops): Rename to ...
738 (struct process_stratum_target): ... this.
739 (the_target, set_target_ops): Adjust.
740 (prepare_to_access_memory): Adjust comment.
741 * win32-low.c (child_xfer_memory): Adjust to use
742 process_stratum_target.
743 (win32_target_ops): Now a process_stratum_target.
745 2020-01-06 Eli Zaretskii <eliz@gnu.org>
746 Pedro Alves <palves@redhat.com>
748 * win32-low.c (get_child_debug_event): Extract the fatal exception
749 from the exit status and convert to the equivalent Posix signal
751 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
752 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
754 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
756 * Makefile.in: Use INSTALL_PROGRAM_ENV.
758 2020-01-01 Joel Brobecker <brobecker@adacore.com>
760 * server.c (gdbserver_version): Change copyright year to 2020.
761 * gdbreplay.c (gdbreplay_version): Likewise.
763 2019-12-19 Christian Biesinger <cbiesinger@google.com>
765 * configure: Regenerate.
766 * configure.ac: Quote variable arguments of test.
768 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
770 * Makefile.in: Fix build with GNU Make 3.81
772 2019-12-16 Tom Tromey <tromey@adacore.com>
774 * server.c (get_exec_file): Constify result.
776 2019-12-10 Christian Biesinger <cbiesinger@google.com>
778 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
779 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
780 * config.in: Regenerate.
781 * configure: Regenerate.
782 * configure.ac: Don't check for strerror.
783 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
784 Call safe_strerror instead of strerror.
785 * server.h (strerror): Remove this now-unnecessary declaration.
786 * tracepoint.c (init_named_socket): Call safe_strerror instead of
788 (gdb_agent_helper_thread): Likewise.
789 * utils.c (perror_with_name): Likewise.
791 2019-11-26 Tom Tromey <tom@tromey.com>
793 * configure, config.in: Rebuild.
795 2019-11-26 Tom Tromey <tom@tromey.com>
797 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
798 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
800 * configure, config.in: Rebuild.
802 2019-11-26 Tom Tromey <tom@tromey.com>
804 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
805 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
806 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
807 * acinclude.m4: Include ax_pthread.m4.
808 * config.in, configure: Rebuild.
810 2019-11-26 Christian Biesinger <cbiesinger@google.com>
812 * debug.c (debug_set_output): Call safe_strerror instead of
814 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
815 (linux_kill_one_lwp): Likewise.
816 (linux_detach_one_lwp): Likewise.
817 (linux_wait_for_event_filtered): Likewise.
818 (store_register): Likewise.
819 * lynx-low.c (lynx_attach): Likewise.
820 * mem-break.c (insert_memory_breakpoint): Likewise.
821 (remove_memory_breakpoint): Likewise.
822 (delete_fast_tracepoint_jump): Likewise.
823 (set_fast_tracepoint_jump): Likewise.
824 (uninsert_fast_tracepoint_jumps_at): Likewise.
825 (reinsert_fast_tracepoint_jumps_at): Likewise.
826 * nto-low.c (nto_xfer_memory): Likewise.
827 (nto_resume): Likewise.
829 2019-11-20 Luis Machado <luis.machado@linaro.org>
831 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
832 instead of register count.
833 * tdesc.c (tdesc_contains_feature): New function.
834 * tdesc.h (tdesc_contains_feature): New prototype.
836 2019-11-15 Christian Biesinger <cbiesinger@google.com>
838 * Makefile.in: Add safe-strerror.c.
839 * configure: Regenerate.
840 * configure.ac: Don't source common.host.
842 2019-11-15 Christian Biesinger <cbiesinger@google.com>
844 * config.in: Regenerate.
845 * configure: Regenerate.
847 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
849 * ax.c (ax_printf): Handle size_t_arg.
851 2019-11-06 Christian Biesinger <cbiesinger@google.com>
853 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
854 * mi/mi-main.c (output_cores): Likewise.
855 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
856 (linux_xfer_osdata_modules): Likewise.
857 * remote.c (register_remote_support_xml): Likewise.
858 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
859 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
861 2019-11-01 Christian Biesinger <cbiesinger@google.com>
863 * configure: Regenerate.
864 * configure.ac: Remove check for strerror_r.
866 2019-10-31 Christian Biesinger <cbiesinger@google.com>
868 * config.in: Regenerate.
869 * configure: Regenerate.
870 * configure.ac: Also check for strerror_r.
872 2019-10-31 Christian Biesinger <cbiesinger@google.com>
874 * ax.h (debug_agent): Remove duplicate declaration.
876 2019-10-26 Tom de Vries <tdevries@suse.de>
878 * linux-aarch64-low.c: Fix typos in comments.
879 * linux-arm-low.c: Same.
881 * linux-ppc-low.c: Same.
882 * proc-service.c: Same.
885 * tracepoint.c: Same.
888 2019-10-25 Tom Tromey <tromey@adacore.com>
890 * utils.c (xstrdup): Remove.
892 2019-10-23 Tom Tromey <tom@tromey.com>
894 * configure, config.in: Rebuild.
896 2019-10-23 Tom Tromey <tom@tromey.com>
898 * configure: Rebuild.
899 * acinclude.m4: Use m4_include, not sinclude.
901 2019-10-17 Tom Tromey <tromey@adacore.com>
903 * configure: Rebuild.
904 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
905 in AC_CONFIG_FILES invocation.
906 * Makefile.in (stamp-h, Makefile): Use new-style config.status
909 2019-10-16 Christian Biesinger <cbiesinger@google.com>
911 * server.c: Include xml-builtin.h.
912 (get_xml_features): Don't declare xml_builtins here.
914 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
916 * Makefile.in: Remove references to vec-ipa.o.
918 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
920 * Makefile.in: Remove references to vec.c.
922 2019-10-02 Christian Biesinger <cbiesinger@google.com>
924 * server.c (server_waiting): Change to bool.
925 (extended_protocol): Likewise.
926 (response_needed): Likewise.
927 (exit_requested): Likewise.
928 (run_once): Likewise.
929 (report_no_resumed): Likewise.
930 (non_stop): Likewise.
931 (disable_packet_vCont): Likewise.
932 (disable_packet_Tthread): Likewise.
933 (disable_packet_qC): Likewise.
934 (disable_packet_qfThreadInfo): Likewise.
935 (handle_general_set): Update.
936 (handle_detach): Update.
937 (handle_monitor_command): Update.
938 (handle_query): Update.
939 (captured_main): Update.
940 (process_serial_event): Update.
941 * server.h (server_waiting): Change to bool.
942 (disable_packet_vCont): Likewise.
943 (disable_packet_Tthread): Likewise.
944 (disable_packet_qC): Likewise.
945 (disable_packet_qfThreadInfo): Likewise.
946 (run_once): Likewise.
947 (non_stop): Likewise.
948 * target.c (target_stop_and_wait): Update.
950 2019-10-02 Tom Tromey <tromey@adacore.com>
952 * Makefile.in (SFILES): Add common-inferior.c.
953 (OBS): Add common-inferior.o.
954 * server.c (startup_with_shell): Don't define.
956 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
958 * linux-low.c (linux_low_read_btrace): Update for change to
961 2019-09-20 Christian Biesinger <cbiesinger@google.com>
963 * debug.c (debug_threads): Remove comment in favor of the header.
964 * debug.h (using_threads): Add declaration.
965 (debug_threads): Add comment.
966 * linux-aarch64-low.c: Include debug.h and remove declaration of
968 * nto-low.c: Likewise.
969 * remote-utils.c: Likewise.
970 * thread-db.c: Likewise.
972 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
974 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
975 and powerpc-cell64l-ipa.o.
976 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
977 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
978 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
981 * spu-low.c: Remove file.
983 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
984 (parse_spufs_run): Remove.
985 (ppc_get_pc): Remove Cell/B.E. support.
986 (ppc_set_pc): Likewise.
987 (ppc_breakpoint_at): Likewise.
988 (ppc_arch_setup): Likewise.
989 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
990 tdesc_powerpc_cell32l.
991 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
992 or init_registers_powerpc_cell32l.
993 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
994 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
995 or init_registers_powerpc_cell32l.
996 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
997 (init_registers_powerpc_cell32l): Remove prototype.
998 (init_registers_powerpc_cell64l): Likewise.
1000 * target.h (struct target_ops): Remove qxfer_spu member.
1001 * server.c (handle_qxfer_spu): Remove.
1002 (qxfer_packets): Remove entry for "spu".
1003 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1004 * linux-low.c (SPUFS_MAGIC): Remove.
1005 (spu_enumerate_spu_ids): Remove.
1006 (linux_qxfer_spu): Remove.
1007 (linux_target_ops): Remove qxfer_spu member.
1008 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1009 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1010 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1012 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1014 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1015 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1016 * config.in: Regenerate.
1017 * configure: Regenerate.
1019 2019-08-15 Tom Tromey <tromey@adacore.com>
1021 * target.c (target_write_memory): Use gdb::byte_vector.
1023 2019-08-15 Tom Tromey <tromey@adacore.com>
1025 * tracepoint.c (write_inferior_data_pointer)
1026 (write_inferior_integer, write_inferior_int8)
1027 (write_inferior_uinteger, m_tracepoint_action_download)
1028 (r_tracepoint_action_download, x_tracepoint_action_download)
1029 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1030 (download_agent_expr, download_tracepoint_1)
1031 (download_trace_state_variables, upload_fast_traceframes): Update.
1032 * server.c (gdb_write_memory): Update.
1033 * remote-utils.c (relocate_instruction): Update.
1034 * proc-service.c (ps_pdwrite): Update.
1035 * mem-break.c (remove_memory_breakpoint)
1036 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1037 (uninsert_fast_tracepoint_jumps_at)
1038 (reinsert_fast_tracepoint_jumps_at): Update.
1039 * linux-x86-low.c (append_insns)
1040 (i386_install_fast_tracepoint_jump_pad)
1041 (amd64_write_goto_address, i386_write_goto_address): Update.
1042 * linux-s390-low.c (append_insns, s390_write_goto_address):
1044 * linux-ppc-low.c (ppc_relocate_instruction)
1045 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1046 (ppc_write_goto_address): Update.
1047 * linux-aarch64-low.c (append_insns): Update.
1048 * target.h (struct target_ops): Update.
1049 (write_inferior_memory): Don't declare.
1050 * target.c (target_write_memory): Rename from
1051 write_inferior_memory. Remove old target_write_memory.
1053 2019-08-15 Tom Tromey <tromey@adacore.com>
1055 * target.c (write_inferior_memory): Use std::vector.
1057 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1060 * configure.ac: Drop enable-libmcheck support.
1061 * configure, config.in: Rebuild.
1062 * acinclude.m4: Don't include it.
1064 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1066 * configure.srv: Remove Arm xml files.
1068 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1070 * configure.srv: Add new files. Remove xml generated files.
1071 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1073 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1074 * linux-aarch32-tdesc.c: New file.
1075 * linux-aarch32-tdesc.h: New file.
1076 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1077 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1078 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1079 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1080 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1081 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1082 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1083 (arm_read_description): Call arm_linux_read_description.
1084 (initialize_low_arch): Don't init registers.
1085 * linux-arm-tdesc.c: New file.
1086 * linux-arm-tdesc.h: New file.
1088 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1090 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1091 Move counter inside for.
1092 (arm_read_description): Check ptrace earlier.
1093 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1095 2019-07-09 Tom Tromey <tom@tromey.com>
1097 * configure: Rebuild.
1098 * configure.ac: Change common to gdbsupport.
1099 * acinclude.m4: Change common to gdbsupport.
1100 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1101 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1102 common to gdbsupport.
1103 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1104 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1105 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1106 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1107 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1108 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1109 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1110 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1111 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1112 common to gdbsupport.
1114 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1116 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1118 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1120 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1122 * configure.srv: Remove legacy xml.
1123 * linux-aarch64-low.c (initialize_low_arch): Remove
1124 initialize_low_tdesc call.
1125 * linux-aarch64-tdesc-selftest.c: Remove file.
1126 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1127 * linux-x86-low.c (initialize_low_arch): Remove
1128 initialize_low_tdesc call.
1129 * linux-x86-tdesc-selftest.c: Remove file.
1130 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1132 2019-06-20 Tom de Vries <tdevries@suse.de>
1134 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1135 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1137 2019-06-19 Tom de Vries <tdevries@suse.de>
1139 * debug.h (debug_write): Change return type to ssize_t.
1140 * debug.c (debug_write): Same.
1142 2019-06-14 Tom Tromey <tom@tromey.com>
1144 * configure.ac: Use new path to gnulib.
1145 * configure: Rebuild.
1146 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1149 2019-06-11 Tom Tromey <tom@tromey.com>
1151 * Makefile.in (SFILES): Add alloc.c.
1153 (IPA_OBJS): Add alloc-ipa.o.
1154 (alloc-ipa.o): New target.
1155 (%.o: ../%.c): New pattern rule.
1157 2019-06-10 Tom Tromey <tromey@adacore.com>
1159 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1160 end warning with a newline.
1161 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1163 * thread-db.c (attach_thread): Don't end warning with a newline.
1164 (thread_db_notice_clone): Likewise.
1165 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1167 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1168 end warning with a newline.
1170 2019-06-04 Pedro Alves <palves@redhat.com>
1172 * server.c (captured_main): Use make_unique_xstrdup.
1174 2019-06-02 Tom Tromey <tom@tromey.com>
1176 * gdbreplay.c (fromhex): Remove.
1177 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1179 2019-05-29 Tom Tromey <tromey@adacore.com>
1181 * configure: Rebuild.
1183 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1185 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1186 sign extension code on 32-bit builds.
1188 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1191 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1193 2019-04-19 Tom Tromey <tom@tromey.com>
1195 * server.c (struct vstop_notif): Derive from notif_event.
1197 (queue_stop_reply): Update.
1198 (remove_all_on_match_ptid): Change type. Rewrite.
1199 (discard_queued_stop_replies): Rewrite.
1200 (in_queued_stop_replies_ptid): Change type.
1201 (in_queued_stop_replies): Rewrite.
1202 (notif_stop): Update.
1203 (queue_stop_reply_callback): Update.
1204 (captured_main): Don't call initialize_notif.
1205 (push_stop_notification): Update.
1206 * notif.c (notif_write_event, handle_notif_ack)
1207 (notif_event_enque, notif_push): Update.
1208 (notif_event_xfree, initialize_notif): Remove.
1209 * notif.h (struct notif_event): Include <list>, not
1211 (struct notif_server) <queue>: Now a std::list.
1212 (notif_event_p): Remove typedef.
1213 (initialize_notif): Don't declare.
1214 (struct notif_event): Add virtual destructor.
1216 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1218 * ax.c (ax_vdebug): Call debug_printf.
1219 * debug.c (debug_write): New function.
1220 * debug.h (debug_write): New declaration.
1221 * linux-low.c (sigchld_handler): Call debug_write.
1223 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1225 * debug.c (debug_set_output): New function.
1226 (debug_vprintf): Send output to debug_file.
1227 (debug_flush): Likewise.
1228 * debug.h (debug_set_output): New declaration.
1229 * server.c (handle_monitor_command): Add debug-file option.
1230 (captured_main): Likewise.
1232 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1234 * debug.c (remote_debug): Add definition.
1235 * debug.h (remote_debug): Add declaration.
1236 * hostio.c (remote_debug): Remove declaration.
1237 * remote-utils.c (struct ui_file): Likewise.
1238 (remote_debug): Likewise.
1239 * remote-utils.h (remote_debug): Likewise,
1240 * server.c (remote_debug): Remove definition.
1242 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1244 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1245 when using a 64-bit gdbserver.
1247 2019-04-09 Tom Tromey <tromey@adacore.com>
1249 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1251 2019-04-08 Tom Tromey <tom@tromey.com>
1253 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1255 (linux_resume_one_lwp): Likewise.
1257 2019-04-08 Tom Tromey <tom@tromey.com>
1259 * gdbreplay.c: Update.
1260 * linux-low.c: Update.
1263 2019-04-08 Tom Tromey <tom@tromey.com>
1265 * server.c: Use C++ exception handling.
1266 * linux-low.c: Use C++ exception handling.
1267 * gdbreplay.c: Use C++ exception handling.
1269 2019-04-08 Tom Tromey <tom@tromey.com>
1271 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1272 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1273 (captured_main, main): Update.
1274 * gdbreplay.c (main): Update.
1276 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1278 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1279 value in argument pointer, return 1 if the entry is found and 0
1280 otherwise. Move comment.
1281 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1282 * linux-low.h (linux_get_auxv): Declare.
1283 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1285 2019-04-05 Tom Tromey <tromey@adacore.com>
1287 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1290 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1292 * linux-low.c (AT_HWCAP2): Add define if not already included.
1294 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1296 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1297 (aarch64_arch_setup): Call linux_get_hwcap.
1298 * linux-arm-low.c (arm_get_hwcap): Remove function.
1299 (arm_read_description): Call linux_get_hwcap.
1300 * linux-low.c (linux_get_auxv): New function.
1301 (linux_get_hwcap): Likewise.
1302 (linux_get_hwcap2): Likewise.
1303 * linux-low.h (linux_get_hwcap): New declaration.
1304 (linux_get_hwcap2): Likewise.
1305 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1306 (ppc_arch_setup): Call linux_get_hwcap.
1307 * linux-s390-low.c (s390_get_hwcap): Remove function.
1308 (s390_arch_setup): Call linux_get_hwcap.
1310 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1311 Jiong Wang <jiong.wang@arm.com>
1313 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1314 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1316 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1318 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1319 Jiong Wang <jiong.wang@arm.com>
1321 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1322 (aarch64_get_hwcap): New function.
1323 (aarch64_arch_setup): Read APIA hwcap.
1325 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1326 Jiong Wang <jiong.wang@arm.com>
1328 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1329 (initialize_low_tracepoint): Likewise.
1330 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1331 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1332 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1333 (aarch64_linux_read_description): Likewise.
1334 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1336 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1338 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1339 i386_create_target_description for 'segments' parameter.
1340 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1341 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1342 * win32-i386-low.c (i386_arch_setup): Likewise.
1344 2019-03-12 Tom Tromey <tromey@adacore.com>
1346 * linux-low.c (iterate_over_lwps): Update.
1348 2019-03-06 Tom Tromey <tom@tromey.com>
1350 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1351 (captured_main): Use SCOPE_EXIT.
1353 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1355 * configure.srv: Use '$enable_unittest' instead of '$development'
1356 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1359 2019-02-27 Tom Tromey <tromey@adacore.com>
1361 * gdbreplay.c (logchar): Handle \r\n.
1363 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1365 * linux-low.c (linux_attach): Add process before lwp.
1366 * server.c (attach_inferior): Check if already attached.
1368 2019-02-07 Tom Tromey <tom@tromey.com>
1370 * x86-tdesc.h: Rename include guard.
1371 * x86-low.h: Add include guard.
1372 * wincecompat.h: Rename include guard.
1373 * win32-low.h: Add include guard.
1374 * utils.h: Rename include guard.
1375 * tracepoint.h: Rename include guard.
1376 * tdesc.h: Rename include guard.
1377 * target.h: Rename include guard.
1378 * server.h: Rename include guard.
1379 * remote-utils.h: Rename include guard.
1380 * regcache.h: Rename include guard.
1381 * nto-low.h: Rename include guard.
1382 * notif.h: Add include guard.
1383 * mem-break.h: Rename include guard.
1384 * lynx-low.h: Add include guard.
1385 * linux-x86-tdesc.h: Add include guard.
1386 * linux-s390-tdesc.h: Add include guard.
1387 * linux-ppc-tdesc-init.h: Add include guard.
1388 * linux-low.h: Add include guard.
1389 * linux-aarch64-tdesc.h: Add include guard.
1390 * linux-aarch32-low.h: Add include guard.
1391 * inferiors.h: Rename include guard.
1392 * i387-fp.h: Rename include guard.
1393 * hostio.h: Rename include guard.
1394 * gdbthread.h: Rename include guard.
1395 * gdb_proc_service.h: Rename include guard.
1396 * event-loop.h: Rename include guard.
1397 * dll.h: Rename include guard.
1398 * debug.h: Rename include guard.
1399 * ax.h: Rename include guard.
1401 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1404 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1405 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1407 2019-01-25 Tom Tromey <tom@tromey.com>
1409 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1411 2019-01-25 Tom Tromey <tom@tromey.com>
1413 * win32-low.c: Fix common/ includes.
1414 * win32-i386-low.c: Fix common/ includes.
1415 * tracepoint.c: Fix common/ includes.
1416 * thread-db.c: Fix common/ includes.
1417 * target.h: Fix common/ includes.
1418 * symbol.c: Fix common/ includes.
1419 * spu-low.c: Fix common/ includes.
1420 * server.h: Fix common/ includes.
1421 * server.c: Fix common/ includes.
1422 * remote-utils.c: Fix common/ includes.
1423 * regcache.h: Fix common/ includes.
1424 * regcache.c: Fix common/ includes.
1425 * nto-x86-low.c: Fix common/ includes.
1426 * notif.h: Fix common/ includes.
1427 * mem-break.h: Fix common/ includes.
1428 * lynx-low.c: Fix common/ includes.
1429 * lynx-i386-low.c: Fix common/ includes.
1430 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1431 * linux-x86-low.c: Fix common/ includes.
1432 * linux-low.c: Fix common/ includes.
1433 * inferiors.h: Fix common/ includes.
1434 * i387-fp.c: Fix common/ includes.
1435 * hostio.c: Fix common/ includes.
1436 * hostio-errno.c: Fix common/ includes.
1437 * gdbthread.h: Fix common/ includes.
1438 * gdbreplay.c: Fix common/ includes.
1439 * fork-child.c: Fix common/ includes.
1440 * event-loop.c: Fix common/ includes.
1442 (enum gdb_agent_op): Fix common/ includes.
1444 2019-01-21 Tom Tromey <tom@tromey.com>
1446 * tracepoint.c: Fix includes.
1447 * remote-utils.c: Fix includes.
1448 * linux-x86-low.c: Fix includes.
1450 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1452 * gdbreplay.c (gdbreplay_version): Update copyright year in
1454 * server.c (gdbserver_version): Likewise.
1456 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1458 * linux-low.c (add_lwp): Switch ordering.
1460 2018-11-29 Tom Tromey <tom@tromey.com>
1462 * win32-low.c (win32_join): Take pid, not process.
1463 * target.h (struct target_ops) <join>: Change argument type.
1464 (join_inferior): Change argument name.
1465 * spu-low.c (spu_join): Take pid, not process.
1466 * server.c (handle_detach): Preserve pid before destroying
1468 * lynx-low.c (lynx_join): Take pid, not process.
1469 * linux-low.c (linux_join): Take pid, not process.
1471 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1473 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1474 (aarch64_cannot_fetch_register): Likewise.
1475 (struct linux_target_ops): Update references.
1477 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1479 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1481 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1483 * configure.srv (ipa_ppc_linux_regobj): Add
1484 powerpc-isa207-htm-vsx32l-ipa.o and
1485 powerpc-isa207-htm-vsx64l-ipa.o.
1486 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1487 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1488 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1489 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1490 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1491 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1492 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1493 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1494 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1495 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1496 (init_registers_powerpc_isa207_htm_vsx32l)
1497 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1498 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1499 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1500 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1501 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1502 (ppc_store_tm_ctarregset): New functions.
1503 (ppc_regsets): Add entries for HTM regsets.
1504 (ppc_arch_setup): Set htm in features struct when needed. Set
1505 sizes for the HTM regsets.
1506 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1507 (initialize_low_arch): Call
1508 init_registers_powerpc_isa207_htm_vsx32l and
1509 init_registers_powerpc_isa207_htm_vsx64l.
1510 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1511 PPC_TDESC_ISA207_HTM_VSX.
1512 (initialize_low_tracepoint): Call
1513 init_registers_powerpc_isa207_htm_vsx32l and
1514 init_registers_powerpc_isa207_htm_vsx64l.
1516 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1518 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1519 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1520 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1521 (ppc_store_pmuregset): New functions.
1522 (ppc_regsets): Add entries for ebb and pmu regsets.
1523 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1524 pmu regsets are available. Set sizes for these regsets.
1526 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1528 * configure.srv (ipa_ppc_linux_regobj): Add
1529 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1530 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1531 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1532 rs6000/powerpc-isa207-vsx32l.xml, and
1533 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1534 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1535 <PPC_TDESC_ISA207_VSX>: New enum value.
1536 (init_registers_powerpc_isa207_vsx32l): Declare.
1537 (init_registers_powerpc_isa207_vsx64l): Declare.
1538 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1539 (ppc_store_tarregset): New function.
1540 (ppc_regsets): Add entry for the TAR regset.
1541 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1542 size for the TAR regsets.
1543 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1544 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1545 and init_registers_powerpc_isa207_vsx64l.
1546 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1547 (initialize_low_tracepoint): Call
1548 init_registers_powerpc_isa207_vsx32l and
1549 init_registers_powerpc_isa207_vsx64l.
1551 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1552 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1554 * configure.srv (ipa_ppc_linux_regobj): Add
1555 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1556 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1557 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1558 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1559 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1560 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1561 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1562 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1563 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1564 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1565 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1566 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1567 (ppc_hwcap): Add comment.
1568 (ppc_hwcap2): New global.
1569 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1570 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1571 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1572 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1573 when needed. Set sizes for the the DSCR and PPR regsets.
1574 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1575 (initialize_low_arch): Call
1576 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1577 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1578 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1579 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1580 (initialize_low_tracepoint): Call
1581 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1582 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1584 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1586 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1588 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1589 Simon Marchi <simark@simark.ca>
1591 * acinclude.m4: Include "../selftest.m4".
1592 * configure: Regenerate.
1593 * configure.ac: Use "GDB_AC_SELFTEST".
1594 * configure.srv: Use "$enable_unittests" instead of
1595 "$development" when checking whether unit tests have been
1597 * server.c (captured_main): Update message informing that
1598 selftests have been disabled.
1600 2018-10-04 Tom Tromey <tom@tromey.com>
1602 * configure: Rebuild.
1604 2018-10-04 Tom Tromey <tom@tromey.com>
1606 * server.c (handle_status): Rename inner "thread".
1607 (process_serial_event): Declare "res" in 'm' case.
1608 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1609 (iterate_over_lwps): Rename inner "thread".
1610 (linux_qxfer_libraries_svr4): Rename inner "len".
1611 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1613 2018-10-01 Gary Benson <gbenson@redhat.com>
1615 * gdb_proc_service.h: Moved common code to
1616 common/gdb_proc_service.h.
1618 2018-10-01 Gary Benson <gbenson@redhat.com>
1620 * gdb_proc_service.h: Synchronize comments and whitespace with
1621 GDB's version of this file.
1623 2018-09-25 Tom Tromey <tom@tromey.com>
1625 * configure: Rebuild.
1626 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1628 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1630 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1631 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1632 ($(IPA_LIB)): Sort IPA_OBJS.
1634 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1636 * Makefile.in: Remove references to $(ADD_DEPS).
1638 2018-09-16 Tom Tromey <tom@tromey.com>
1640 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1642 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1645 2018-09-05 Tom Tromey <tom@tromey.com>
1647 * configure: Rebuild.
1649 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1652 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1654 2018-08-27 Tom Tromey <tom@tromey.com>
1657 * configure: Rebuild.
1659 2018-08-27 Tom Tromey <tom@tromey.com>
1661 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1662 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1663 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1664 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1665 (s390x_emit_stack_adjust): Add casts to unsigned char.
1667 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1671 * server.h (struct client_state) <disable_randomization>:
1674 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1676 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1678 (mips_supply_ptrace_register): Likewise.
1680 2018-07-22 Tom Tromey <tom@tromey.com>
1682 * configure: Rebuild.
1684 2018-07-22 Tom Tromey <tom@tromey.com>
1686 * win32-low.c (win32_create_inferior): Remove unused variables.
1687 * gdbreplay.c (remote_open): Remove unused variable.
1688 * remote-utils.c (remote_prepare): Remove unused variable.
1689 * x86-tdesc.h (X86_TDESC_H): Define.
1690 (amd64_expedite_regs): Define conditionally.
1691 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1692 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1693 * remote-utils.c (readchar): Remove unused variable.
1695 2018-07-13 Pedro Alves <palves@redhat.com>
1697 * linux-low.c (linux_kill): Change parameter to process_info
1698 pointer instead of pid. Adjust.
1699 * lynx-low.c (lynx_kill): Likewise.
1700 * nto-low.c (nto_kill): Likewise.
1701 * spu-low.c (spu_kill): Likewise.
1702 * win32-low.c (win32_kill): Likewise.
1703 * server.c (handle_v_kill, kill_inferior_callback)
1704 (detach_or_kill_for_exit): Adjust.
1705 * target.c (kill_inferior): Change parameter to process_info
1706 pointer instead of pid. Adjust.
1707 * target.h (struct target_ops) <kill>: Change parameter to
1708 process_info pointer instead of pid. Adjust all implementations
1710 (kill_inferior): Likewise.
1712 2018-07-13 Pedro Alves <palves@redhat.com>
1714 * linux-low.c (linux_detach, linux_join): Change parameter to
1715 process_info pointer instead of pid. Adjust.
1716 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1717 * nto-low.c (nto_detach): Likewise.
1718 * spu-low.c (spu_detach, spu_join): Likewise.
1719 * win32-low.c (win32_detach, win32_join): Likewise.
1720 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1721 * target.h (struct target_ops) <detach, join>: Change parameter to
1722 process_info pointer instead of pid. Adjust all implementations
1724 (detach_inferior, join_inferior): Rename 'pid' parameter to
1727 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1728 Jan Kratochvil <jan.kratochvil@redhat.com>
1729 Paul Fertser <fercerpav@gmail.com>
1730 Tsutomu Seki <sekiriki@gmail.com>
1732 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1733 (OBS): Add 'common/netstuff.o'.
1734 (GDBREPLAY_OBS): Likewise.
1735 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1736 (remote_open): Implement support for IPv6
1738 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1740 (handle_accept_event): Accept connections from IPv6 sources.
1741 (remote_prepare): Handle IPv6-style hostnames; implement
1742 support for IPv6 connections.
1743 (remote_open): Implement support for printing connections from
1746 2018-07-11 Pedro Alves <palves@redhat.com>
1749 * mem-break.c (any_persistent_commands): Add process_info
1750 parameter and use it instead of relying on the current process.
1751 Change return type to bool.
1752 * mem-break.h (any_persistent_commands): Add process_info
1753 parameter and change return type to bool.
1754 * server.c (handle_detach): Remove require_running_or_return call.
1755 Look up the process_info for the process we're about to detach.
1756 If not found, return back error to GDB. Adjust
1757 any_persistent_commands call to pass down a process pointer.
1759 2018-07-11 Pedro Alves <palves@redhat.com>
1761 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1762 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1763 instead of collect_register_by_name.
1764 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1765 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1767 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1768 Pedro Alves <palves@redhat.com>
1770 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1772 2018-07-03 Tom Tromey <tom@tromey.com>
1774 * linux-low.c: Update.
1775 * lynx-low.c: Update.
1776 * mem-break.c: Update.
1777 * nto-low.c: Update.
1778 * remote-utils.c: Update.
1780 * spu-low.c: Update.
1782 * win32-low.c: Update.
1784 2018-07-03 Tom Tromey <tom@tromey.com>
1788 2018-07-03 Tom Tromey <tom@tromey.com>
1790 * linux-low.c: Update.
1792 2018-07-03 Tom Tromey <tom@tromey.com>
1796 2018-07-03 Tom Tromey <tom@tromey.com>
1798 * linux-low.c: Update.
1799 * linux-mips-low.c: Update.
1800 * lynx-low.c: Update.
1801 * nto-low.c: Update.
1802 * remote-utils.c: Update.
1804 * spu-low.c: Update.
1806 * thread-db.c: Update.
1808 2018-07-03 Tom Tromey <tom@tromey.com>
1810 * linux-low.c: Update.
1811 * linux-mips-low.c: Update.
1812 * lynx-low.c: Update.
1813 * mem-break.c: Update.
1814 * nto-low.c: Update.
1815 * remote-utils.c: Update.
1817 * spu-low.c: Update.
1819 * tracepoint.c: Update.
1821 2018-07-03 Tom Tromey <tom@tromey.com>
1823 * linux-low.c: Update.
1824 * linux-ppc-low.c: Update.
1825 * linux-x86-low.c: Update.
1826 * proc-service.c: Update.
1828 * spu-low.c: Update.
1829 * thread-db.c: Update.
1830 * win32-low.c: Update.
1832 2018-07-03 Tom Tromey <tom@tromey.com>
1834 * linux-low.c: Update.
1835 * lynx-low.c: Update.
1836 * nto-low.c: Update.
1837 * remote-utils.c: Update.
1838 * spu-low.c: Update.
1839 * thread-db.c: Update.
1840 * win32-low.c: Update.
1842 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1844 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1845 parameter in call to 'amd64_create_target_description'.
1847 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1849 * x86-tdesc.h: Remove executable permission flag.
1851 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1853 * configure.ac: Remove AC_PREREQ, add missing quoting.
1854 * configure: Re-generate.
1855 * config.in: Re-generate.
1856 * aclocal.m4: Re-generate.
1858 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1860 * tracepoint.h (current_traceframe): Remove declaration.
1862 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1864 * linux-aarch64-low.c (is_sve_tdesc): New function.
1865 (aarch64_sve_regs_copy_to_regcache): Likewise.
1866 (aarch64_sve_regs_copy_from_regcache): Likewise.
1867 (aarch64_regs_info): Add SVE checks.
1868 (initialize_low_arch): Initialize SVE.
1870 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1872 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1874 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1876 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1877 (initialize_low_tracepoint): Likewise
1878 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1879 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1881 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1883 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1885 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1887 * server.h (PBUFSIZ): Increase size
1889 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1891 * regcache.c (regcache::raw_compare): New function.
1892 * regcache.h (regcache::raw_compare): New declaration.
1894 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1896 * regcache.c (new_register_cache): Use new.
1897 (free_register_cache): Use delete.
1898 (register_data): Use const.
1899 (supply_register): Move body inside regcache.
1900 (regcache::raw_supply): New override function.
1901 (collect_register): Move body inside regcache.
1902 (regcache::raw_collect): New override function.
1903 (regcache::get_register_status): New override function.
1904 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1906 2018-06-09 Tom Tromey <tom@tromey.com>
1908 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1910 (event_queue): Use std::queue.
1911 (gdb_event_xfree): Remove.
1912 (initialize_event_loop, process_event, wait_for_event): Update.
1914 2018-06-08 Stan Cox <scox@redhat.com>
1916 * win32-low.c (win32_create_inferior): last_ptid and last_status
1917 moved to client_state.
1919 2018-06-08 Pedro Alves <palves@redhat.com>
1921 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1922 common/common-exceptions.o, common/common-utils.o,
1923 common/errors.o, common/print-utils.o and utils.o.
1924 * gdbreplay.c: Include "common-defs.h" instead of the two
1925 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1926 string.h or alloca.h.
1927 (perror_with_name): Delete.
1928 (remote_open): Use xstrdup instead of strdup.
1929 (main): Rename to ...
1930 (captured_main): ... this.
1933 2018-06-08 Tom Tromey <tom@tromey.com>
1935 * linux-low.c (linux_low_read_btrace): Update.
1937 2018-06-04 Stan Cox <scox@redhat.com>
1939 * server.h (struct client_state): New.
1940 * server.c (cont_thread, general_thread, multi_process)
1941 (report_fork_events, report_vfork_events, report_exec_events)
1942 (report_thread_events, swbreak_feature, hwbreak_feature)
1943 (vCont_supported, disable_randomization, pass_signals)
1944 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1945 Moved to client_state.
1946 * remote-utils.c (remote_debug, noack_mode)
1947 (transport_is_reliable): Moved to client_state.
1948 * tracepoint.c (current_traceframe): Moved to client_state.
1951 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1952 linux-low.c, remote-utils.h, target.c: Use client_state.
1954 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1956 * configure.srv: Add new c/h file.
1958 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1960 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1963 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1965 * gdb.arch/mips-fpregset-core.exp: New test.
1966 * gdb.arch/mips-fpregset-core.c: New test source.
1968 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1971 * hostio.c (require_int): Do not report overflow for integers
1972 between 0xfffffff and 0x7fffffff.
1974 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1976 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1977 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1978 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1980 (the_low_target): Wire them.
1982 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1984 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1985 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1986 mode. Call collect_register_by_name with vscr using
1987 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1988 (ppc_store_vrregset): Add and set vscr_offset variable as in
1989 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1992 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1994 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1995 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1996 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1998 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2000 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2001 (ppc_store_vsxregset): Likewise.
2002 (ppc_fill_vrregset): Likewise.
2003 (ppc_store_vrregset): Likewise.
2004 (ppc_fill_evrregset): Likewise.
2005 (ppc_store_evrregset): Likewise.
2006 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2007 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2010 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2012 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2013 wordsize of the inferior. Call ppc_linux_target_wordsize.
2015 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2017 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2018 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2019 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2020 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2021 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2022 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2023 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2024 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2025 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2026 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2027 (tdesc_powerpc_e500l): Remove.
2028 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2029 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2030 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2031 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2033 (ppc_arch_setup): Remove target description matching code. Fill a
2034 ppc_linux_features struct and call ppc_linux_match_description
2037 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2039 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2040 width of the requested register exceeds the width of the
2042 (mips_cannot_store_register): Likewise.
2044 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2046 * linux-mips-low.c (mips_fetch_register): New function. Update
2048 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2049 (the_low_target): Wire `mips_fetch_register'.
2051 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2053 * lynx-i386-low.c (LYNXOS_178): New macro.
2054 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2055 the layout on LynxOS-178.
2056 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2057 handle floating point registers that are not supported by
2060 2018-05-10 Tom Tromey <tom@tromey.com>
2062 * configure: Rebuild.
2064 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2067 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2068 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2069 Use it to set the expedite_regs field in the given tdesc.
2070 * x86-tdesc.h: New file.
2071 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2072 Adjust following the addition of the new expedite_regs parameter
2073 to init_target_desc.
2074 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2075 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2076 (i386_linux_read_description, amd64_linux_read_description):
2077 Adjust following the addition of the new expedite_regs parameter
2078 to init_target_desc.
2079 * lynx-i386-low.c: #include "x86-tdesc.h".
2080 (lynx_i386_arch_setup): Adjust following the addition of the new
2081 expedite_regs parameter to init_target_desc.
2082 * nto-x86-low.c: #include "x86-tdesc.h".
2083 (nto_x86_arch_setup): Adjust following the addition of the new
2084 expedite_regs parameter to init_target_desc.
2085 * win32-i386-low.c: #include "x86-tdesc.h".
2086 (i386_arch_setup): Adjust following the addition of the new
2087 expedite_regs parameter to init_target_desc.
2089 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2092 * win32-low.c (win32_create_inferior): Add call to my_wait
2093 setting last_status global.
2095 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2098 * win32-low.c (create_process): Only call gdb_tilde_expand if
2099 inferior_cwd is not NULL.
2101 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2103 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2104 registers to the cache if their values have changed.
2105 (i387_xsave_to_cache): Provide default values for x87 control
2106 registers when these features are available, but disabled.
2107 * regcache.c (supply_register_by_name_zeroed): New function.
2108 * regcache.h (supply_register_by_name_zeroed): Declare new
2111 2018-05-07 Tom Tromey <tom@tromey.com>
2113 * configure: Rebuild.
2115 2018-05-04 Tom Tromey <tom@tromey.com>
2117 * configure: Rebuild.
2119 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2120 Pedro Alves <palves@redhat.com>
2122 * linux-aarch64-low.c (aarch64_stopped_data_address):
2125 2018-04-27 Tom Tromey <tom@tromey.com>
2127 * configure: Rebuild.
2129 2018-04-23 Tom Tromey <tom@tromey.com>
2131 * configure: Rebuild.
2133 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2135 * Makefile.in (depcomp): Add "..".
2136 (all_deps_files): New and use it.
2138 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2140 * configure.srv (aarch64*-*-linux*): Don't include xml.
2141 (i[34567]86-*-cygwin*): Likewise.
2142 (i[34567]86-*-linux*): Likewise.
2143 (i[34567]86-*-lynxos*): Likewise.
2144 (i[34567]86-*-mingw32ce*): Likewise.
2145 (i[34567]86-*-mingw*): Likewise.
2146 (i[34567]86-*-nto*): Likewise.
2147 (tic6x-*-uclinux): Likewise.
2148 (x86_64-*-linux*): Likewise.
2149 (x86_64-*-mingw*): Likewise.
2150 (x86_64-*-cygwin*): Likewise.
2152 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2154 * tdesc.c: Remove xml parameter.
2156 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2158 * server.c (get_features_xml): Remove cast.
2159 * tdesc.c (void target_desc::accept): Fill in function.
2160 (tdesc_get_features_xml): Remove old xml creation.
2161 (print_xml_feature::visit_pre): Add xml vistor.
2162 * tdesc.h (struct target_desc): Make xmltarget mutable.
2163 (tdesc_get_features_xml): Remove declaration.
2165 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2167 * tdesc.c (tdesc_architecture_name): Add new function.
2168 (tdesc_osabi_name): Likewise.
2169 (tdesc_get_features_xml): Use new functions.
2171 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2173 * tdesc.c (tdesc_create_flags): Remove.
2174 (tdesc_add_flag): Likewise.
2175 (tdesc_named_type): Likewise.
2176 (tdesc_create_union): Likewise.
2177 (tdesc_create_struct): Likewise.
2178 (tdesc_create_vector): Likewise.
2179 (tdesc_add_bitfield): Likewise.
2180 (tdesc_add_field): Likewise.
2181 (tdesc_set_struct_size): Likewise.
2183 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2185 * tdesc.c (~target_desc): Remove implictly deleted items.
2186 (init_target_desc): Iterate all features.
2187 (tdesc_get_features_xml): Use vector.
2188 (tdesc_create_feature): Create feature.
2189 * tdesc.h (tdesc_feature) Remove
2190 (target_desc): Add features.
2192 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2194 * Makefile.in: Add common/tdesc.c
2195 * tdesc.c (init_target_desc): init all reg_defs from register
2197 (tdesc_create_reg): Create tdesc_reg.
2198 * tdesc.h (tdesc_feature): Add register vector.
2200 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2202 * tdesc.h (struct target_desc) <features>: Change type to
2203 std::vector<std::string>.
2204 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2206 (tdesc_get_features_xml): Likewise.
2207 (tdesc_create_feature): Likewise.
2209 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2211 * regcache.c (find_register_by_number): Return a ref.
2212 (find_regno): Use references.
2213 (register_size): Likewise.
2214 (register_data): Likewise.
2215 * tdesc.c (target_desc::~target_desc): Remove free calls.
2216 (target_desc::operator==): Use std::vector compare.
2217 (init_target_desc): Use reference.
2218 (tdesc_create_reg): Use reg constructors.
2219 * tdesc.h (struct target_desc): Replace pointer with object.
2221 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2223 * regcache.c (find_register_by_number): Make static.
2224 (find_regno): Use find_register_by_number
2225 * regcache.h (struct reg): Remove declaration.
2227 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2229 * tdesc.c (target_desc::~target_desc): Move to here.
2230 (target_desc::operator==): Likewise.
2231 * tdesc.h (target_desc::~target_desc): Move from here.
2232 (target_desc::operator==): Likewise.
2234 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2236 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2238 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2240 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2242 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2243 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2244 and init_registers_s390_gs_linux64.
2246 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2248 * linux-s390-low.c (s390_fill_gs): Remove function.
2249 (s390_fill_gsbc): Remove function.
2250 (s390_regsets): Set fill functions for the guarded storage regsets
2253 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2255 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2256 the word size. Add comment.
2257 (s390_get_wordsize): New function.
2258 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2259 pswm with it. Instead, use s390_get_wordsize to determine the
2260 word size first and derive the correct tdesc from that directly.
2262 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2264 * Makefile.in: Include silent-rules.mk.
2265 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2266 (COMPILE): Add ECHO_CXX.
2267 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2268 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2269 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2270 (version-generated.c): Add ECHO_GEN.
2271 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2272 (IPAGENT_COMPILE): Add ECHO_CXX.
2273 (%-generated.c): Add ECHO_REGDAT.
2275 2018-03-14 Tom Tromey <tom@tromey.com>
2278 * ax.c (ax_printf): Special case for NULL.
2280 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2282 * linux-low.c (linux_qxfer_libraries_svr4): Use
2283 xml_escape_text_append.
2285 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2287 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2289 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2291 * server.c (handle_general_set): Remove unnecessary xstrdup.
2293 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2295 * server.c (parse_debug_format_options): Adjust to
2296 delim_string_to_char_ptr_vec changes.
2297 * thread-db.c (thread_db_load_search): Adjust to
2298 dirnames_to_char_ptr_vec changes.
2300 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2302 * target.h (target_enable_btrace, target_disable_btrace)
2303 (target_read_btrace, target_read_btrace_conf): Turn macro into
2304 inline function. Throw error if target method is not defined.
2305 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2306 check for btrace target method. Be prepared to handle exceptions
2307 from btrace target methods.
2309 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2311 * server.c (captured_main): Change order of error message printed
2312 when the current working directory cannot be found.
2314 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2316 * server.c: Include "filenames.h" and "pathstuff.h".
2317 (program_name): Delete variable.
2318 (program_path): New anonymous class.
2319 (get_exec_wrapper): Use "program_path" instead of
2321 (handle_v_run): Likewise.
2322 (captured_main): Likewise.
2323 (process_serial_event): Likewise.
2325 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2327 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2328 (OBJS): Add "pathstuff.o".
2329 * server.c (current_directory): New global variable.
2330 (captured_main): Initialize "current_directory".
2332 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2334 * tdesc.c: Use common/tdesc.h.
2335 * tdesc.h: Likewise.
2337 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2338 Simon Marchi <simon.marchi@ericsson.com>
2340 * Makefile.in: Switch order of make rules.
2342 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2344 * Makefile.in: Add common directory in build.
2345 * configure.ac: Add common reference.
2346 * configure: Regenerate.
2348 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2350 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2351 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2352 * spu-low.c (spu_target_ops): Likewise.
2353 * win32-low.c (win32_target_ops): Likewise.
2354 * server.c (supported_btrace_packets): Report packets unconditionally.
2355 * target.h (target_ops) <supports_btrace>: Remove.
2356 (target_supports_btrace): Remove.
2358 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2360 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2361 (handle_btrace_disable): Change return type to void. Use exceptions
2363 (handle_btrace_general_set): Catch exception and copy message to
2366 2018-02-08 Tom Tromey <tom@tromey.com>
2368 * linux-low.c (install_software_single_step_breakpoints): Use
2369 make_scoped_restore.
2370 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2371 (do_restore_current_thread_cleanup): Remove.
2372 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2375 2018-02-08 Tom Tromey <tom@tromey.com>
2377 * mem-break.c (set_raw_breakpoint_at): Use
2378 gdb::unique_xmalloc_ptr.
2380 2018-01-30 Pedro Alves <palves@redhat.com>
2383 * target.c (target_terminal::terminal_state): Rename to ...
2384 (target_terminal::m_terminal_state): ... this.
2386 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2388 * linux-low.c (handle_extended_wait): Surround call to
2389 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2391 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2393 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2394 linux_ptrace_attach_fail_reason_string now returning an
2396 (linux_attach): Likewise.
2397 * thread-db.c (attach_thread): Likewise.
2399 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2402 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2403 checking for fs_base/gs_base fields in struct user_regs_struct.
2404 * configure: Regenerate.
2406 2018-01-16 Yao Qi <yao.qi@linaro.org>
2409 * linux-low.c (fetch_register): Call supply_register instead of
2412 2018-01-08 Yao Qi <yao.qi@linaro.org>
2413 Simon Marchi <simon.marchi@ericsson.com>
2415 * Makefile.in (OBS): Remove selftest.o.
2416 * configure.ac: Set srv_selftest_objs if $development is true.
2417 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2418 * configure: Re-generated.
2419 * server.c (captured_main): Wrap variable selftest_filter with
2422 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2424 * server.c (parse_debug_format_options): Return std::string.
2425 (handle_monitor_command, captured_main): Adjust.
2427 2018-01-05 Pedro Alves <palves@redhat.com>
2430 * server.c (captured_main): Pass quiet=false to
2431 save_original_signals_state.
2433 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2435 * gdbreplay.c (gdbreplay_version): Update copyright year in
2437 * server.c (gdbserver_version): Likewise.
2439 2017-12-08 Tom Tromey <tom@tromey.com>
2441 * ax.c (ax_printf): Update.
2443 2017-12-07 Yao Qi <yao.qi@linaro.org>
2445 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2446 aarch64_linux_read_description.
2447 * linux-amd64-ipa.c (idx2mask): New array.
2448 (get_ipa_tdesc): Move idx2mask out.
2449 (initialize_low_tracepoint): Initialize target descriptions.
2450 * linux-i386-ipa.c (idx2mask): New array.
2451 (get_ipa_tdesc): Move idx2mask out.
2452 (initialize_low_tracepoint): Initialize target descriptions.
2454 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2456 * tdesc.c (struct tdesc_type): Change return type.
2457 (tdesc_add_flag): Change parameter type.
2458 (tdesc_add_bitfield): Likewise.
2459 (tdesc_add_field): Likewise.
2460 (tdesc_set_struct_size): Likewise.
2462 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2464 * regcache.c (registers_to_string): Remove unused variable.
2466 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2468 * inferiors.c (for_each_inferior_with_data): Remove.
2469 * inferiors.h (for_each_inferior_with_data): Remove.
2470 * server.c (handle_qxfer_threads_worker): Change parameter type.
2471 (handle_qxfer_threads_proper): Use for_each_thread.
2473 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2475 * inferiors.c (for_each_inferior): Remove.
2476 (clear_inferiors): Use for_each_thread.
2477 * inferiors.h (for_each_inferior): Remove.
2478 * linux-low.c (linux_wait_for_event_filtered): Use
2480 (linux_stabilize_threads): Likewise.
2481 * regcache.c (regcache_release): Likewise.
2482 * server.c (gdb_wants_all_threads_stopped): Likewise.
2483 (clear_pending_status_callback): Remove.
2484 (handle_status): Use for_each_thread.
2485 (captured_main): Likewise.
2486 * win32-low.c (child_init_thread_list): Likewise.
2487 (win32_clear_inferiors): Likewise.
2488 (fake_breakpoint_event): Likewise.
2490 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2492 * inferiors.h (find_inferior): Remove.
2493 * inferiors.c (find_inferior): Remove.
2495 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2497 * linux-low.c (resume_status_pending_p): Update comment.
2498 (need_step_over_p): Update comment.
2500 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2502 * linux-low.c (proceed_one_lwp): Return void, change parameter
2504 (unsuspend_and_proceed_one_lwp): Likewise.
2505 (proceed_all_lwps): Use for_each_thread.
2506 (unstop_all_lwps): Likewise.
2508 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2510 * linux-low.c (linux_resume_one_thread): Return void, take
2512 (linux_resume): Use for_each_thread.
2514 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2516 * linux-low.c (send_sigstop_callback): Return void, change
2517 parameter type. Rename to...
2518 (send_sigstop): ... this.
2519 (suspend_and_send_sigstop_callback): Return void, change parameter
2521 (suspend_and_send_sigstop): ... this.
2522 (stop_all_lwps): Use for_each_thread.
2524 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2526 * linux-low.c (lwp_running): Return bool, remove unused
2528 (linux_stabilize_threads): Use find_thread.
2530 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2532 * linux-low.c (select_singlestep_lwp_callback): Remove.
2533 (count_events_callback): Remove.
2534 (select_event_lwp_callback): Remove.
2535 (select_event_lwp): Use find_thread/for_each_thread.
2537 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2539 * linux-low.c (not_stopped_callback): Return bool, take filter
2541 (linux_wait_for_event_filtered): Use find_thread.
2542 (linux_wait_1): Likewise.
2544 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2546 * linux-low.c (same_lwp): Remove.
2547 (find_lwp_pid): Use find_thread.
2549 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2551 * linux-low.c (delete_lwp_callback): Remove.
2552 (linux_mourn): Use for_each_thread.
2554 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2556 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2557 args parameter, don't check for pid.
2558 (linux_detach): Use for_each_thread.
2560 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2562 * linux-low.c (struct counter): Remove.
2563 (second_thread_of_pid_p): Remove.
2564 (last_thread_of_process_p): Use find_thread.
2566 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2568 * inferiors.c (find_inferior_in_random): Remove.
2569 * inferiors.h (find_inferior_in_random): Remove.
2570 * linux-low.c (status_pending_p_callback): Return bool, accept
2571 parameter ptid directly.
2572 (linux_wait_for_event_filtered): Use find_thread_in_random.
2573 (linux_wait_1): Likewise.
2575 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2577 * inferiors.c (find_inferior_id): Remove.
2578 (find_thread_ptid): Move implemention from find_inferior_id to
2580 * inferiors.h (find_inferior_id): Remove.
2581 * server.c (handle_status): Use find_thread_ptid.
2582 (process_serial_event): Likewise.
2583 * thread-db.c (find_one_thread): Likewise.
2584 (thread_db_thread_handle): Likewise.
2585 * win32-low.c (thread_rec): Likewise.
2586 (child_delete_thread): Likewise.
2587 (win32_thread_alive): Likewise.
2588 (get_child_debug_event): Likewise.
2590 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2592 * linux-mips-low.c (update_watch_registers_callback): Return
2593 void, remove pid_p parameter, don't check for pid.
2594 (mips_insert_point, mips_remove_point): Use for_each_thread.
2596 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2598 * lynx.low (lynx_delete_thread_callback): Remove.
2599 (lynx_mourn): Use for_each_thread.
2601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2603 * regcache.c (regcache_invalidate_one): Remove.
2604 (regcache_invalidate_pid): use for_each_thread.
2606 2017-11-26 Tom Tromey <tom@tromey.com>
2608 * linux-low.c (linux_create_inferior): Update.
2610 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2612 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2614 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2616 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2617 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2618 * linux-aarch64-tdesc-selftest.c: New file.
2619 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2621 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2623 * configure.srv: Add new file.
2624 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2625 * linux-aarch64-tdesc-selftest.c: New file.
2626 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2628 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2630 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2631 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2632 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2634 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2636 * configure.srv: Add new files.
2637 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2638 aarch64_linux_read_description.
2639 * linux-aarch64-low.c (aarch64_linux_read_description):
2640 Merge with aarch64_arch_setup.
2641 (aarch64_arch_setup): Call aarch64_linux_read_description.
2642 * linux-aarch64-tdesc.c: New file.
2643 * linux-aarch64-tdesc.h: New file.
2645 2017-11-24 Yao Qi <yao.qi@linaro.org>
2647 * configure.srv: Set $srv_regobj for tic6x-linux.
2648 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2649 (tic6x_read_description): Move some code to tic6x_arch_setup.
2650 (tic6x_tdesc_test): New function.
2651 (initialize_low_arch): Call selftests::register_test.
2653 2017-11-22 Yao Qi <yao.qi@linaro.org>
2655 * remote-utils.c (prepare_resume_reply): Use memcpy.
2657 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2659 * linux-low.c (kill_one_lwp_callback): Return void, take
2660 argument directly, don't filter on pid.
2661 (linux_kill): Use for_each_thread.
2663 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2665 * linux-low.c (need_step_over_p): Return bool, remove dummy
2667 (linux_resume, proceed_all_lwps): Use find_thread.
2669 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2671 * linux-low.c (resume_status_pending_p): Return bool, remove
2673 (linux_resume): Use find_thread.
2675 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2677 * linux-low.c (struct thread_resume_array): Remove.
2678 (linux_set_resume_request): Return void, take arguments
2680 (linux_resume): Use for_each_thread.
2682 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2684 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2685 return bool, remove data argument.
2686 (linux_stabilize_threads): Use find_thread.
2688 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2690 * linux-low.c (unsuspend_one_lwp): Remove.
2691 (unsuspend_all_lwps): Use for_each_thread, inline code from
2694 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2696 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2697 * linux-low.c (struct iterate_over_lwps_args): Remove.
2698 (iterate_over_lwps_filter): Remove.
2699 (iterate_over_lwps): Use find_thread.
2701 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2703 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2704 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2705 code from reset_lwp_ptrace_options_callback.
2707 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2709 * linux-arm-low.c (struct update_registers_data): Remove.
2710 (update_registers_callback): Return void, take arguments
2711 directly, don't check thread's pid.
2712 (arm_insert_point, arm_remove_point): Use for_each_thread.
2714 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2716 * win32-low.c (continue_one_thread): Return void, take argument
2718 (child_continue): Use for_each_thread.
2720 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2722 * win32-i386-low.c (update_debug_registers_callback): Rename
2724 (update_debug_registers): ... this, return void, remove pid_p arg.
2725 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2727 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2729 * inferiors.h (struct process_info): Add constructor, initialize
2731 <syscalls_to_catch>: Change type to std::vector<int>.
2732 * inferiors.c (add_process): Allocate process_info with new.
2733 (remove_process): Free process_info with delete.
2734 * linux-low.c (handle_extended_wait): Adjust.
2735 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2736 * server.c (handle_general_set): Adjust.
2738 2017-11-16 Pedro Alves <palves@redhat.com>
2740 * remote-utils.c (remote_close): Block SIGIO signals instead of
2741 uninstalling the SIGIO handler.
2743 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2745 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2747 2017-11-16 Yao Qi <yao.qi@linaro.org>
2749 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2750 (tic6x_store_gregset): Likewise.
2751 (tic6x_usrregs_info): Move it up.
2753 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2755 * Makefile.in: Update arch rules.
2756 * configure.srv: Explicitly mark arch/ files.
2758 2017-11-13 Andreas Schwab <schwab@suse.de>
2760 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2762 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2764 2017-11-06 Pedro Alves <palves@redhat.com>
2766 * config.in, configure: Regenerate.
2768 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2770 * target.c (struct thread_search): Remove.
2771 (thread_search_callback): Remove.
2772 (prepare_to_access_memory): Use for_each_thread instead of
2773 find_inferior. Inline code from thread_search_callback.
2775 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2777 * server.c (struct visit_actioned_threads_data): Remove.
2778 (visit_actioned_threads): Change prototype to take arguments
2780 (resume): Use find_thread instead of find_inferior.
2782 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2784 * server.c (queue_stop_reply_callback): Change prototype, return
2786 (find_status_pending_thread_callback): Remove.
2787 (handle_status): Replace find_inferior with find_thread and
2790 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2792 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2794 (aarch64_store_gregset): Likewise.
2795 (aarch64_fill_fpregset): Likewise.
2796 (aarch64_store_fpregset): Likewise.
2798 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2800 * gdbthread.h (find_thread, for_each_thread): New functions.
2801 * inferiors.c (thread_of_pid): Remove.
2802 (find_any_thread_of_pid): Use find_thread.
2803 * linux-low.c (num_lwps): Use for_each_thread.
2805 2017-10-17 Yao Qi <yao.qi@linaro.org>
2807 * Makefile.in: Remove one rule.
2808 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2810 2017-10-17 Yao Qi <yao.qi@linaro.org>
2812 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2813 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2815 2017-10-17 Yao Qi <yao.qi@linaro.org>
2817 * configure.srv: Rename arm.o with arch/arm.o.
2819 2017-10-17 Yao Qi <yao.qi@linaro.org>
2821 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2822 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2823 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2824 (arch-i386.o, arch-amd64.o): Remove rules.
2825 (arch/%.o): New rule.
2826 Update POSTCOMPILE and COMPILE.pre.
2827 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2828 * configure: Re-generated.
2829 * configure.srv: Replace arch-i386.o with arch/i386.o.
2830 Replace arch-amd64.o with arch/amd64.o.
2832 2017-10-16 Yao Qi <yao.qi@linaro.org>
2834 * configure: Regenerated.
2836 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2838 * inferiors.h: (struct inferior_list): Remove.
2839 (struct inferior_list_entry); Remove.
2840 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2841 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2842 get_first_inferior): Remove.
2843 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2844 find_inferior_id, find_inferior_in_random): Change signature.
2845 * inferiors.c (all_threads): Change type to
2846 std::list<thread_info *>.
2847 (get_thread): Remove macro.
2848 (find_inferior, find_inferior_id): Change signature, implement
2850 (find_inferior_in_random): Change signature, implement using
2851 find_thread_in_random.
2852 (for_each_inferior, for_each_inferior_with_data): Change
2853 signature, implement using for_each_thread.
2854 (add_inferior_to_list, remove_inferior): Remove.
2855 (add_thread, get_first_thread, thread_of_pid,
2856 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2857 (get_first_inferior, one_inferior_p, clear_inferior_list):
2859 (clear_inferiors, get_thread_process): Update.
2860 * gdbthread.h: Include <list>.
2861 (struct thread_info) <entry>: Remove field.
2863 (all_threads): Change type to std::list<thread_info *>.
2864 (get_first_inferior): Add doc.
2865 (find_thread, for_each_thread, find_thread_in_random): New
2867 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2868 * linux-arm-low.c (update_registers_callback): Update.
2869 * linux-low.c (second_thread_of_pid_p): Update.
2870 (kill_one_lwp_callback, linux_detach_lwp_callback,
2871 delete_lwp_callback, status_pending_p_callback, same_lwp,
2872 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2873 iterate_over_lwps, not_stopped_callback,
2874 resume_stopped_resumed_lwps, count_events_callback,
2875 select_singlestep_lwp_callback, select_event_lwp_callback,
2876 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2877 suspend_and_send_sigstop_callback, wait_for_sigstop,
2878 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2879 lwp_running, linux_set_resume_request, resume_status_pending_p,
2880 need_step_over_p, start_step_over, linux_resume_one_thread,
2881 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2882 reset_lwp_ptrace_options_callback): Update.
2883 * linux-mips-low.c (update_watch_registers_callback): Update.
2884 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2886 (free_register_cache_thread_one): Remove.
2887 (regcache_release): Update.
2888 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2889 handle_qxfer_threads_worker): Update.
2890 (handle_query): Update, use list iterator.
2891 (visit_actioned_threads, handle_pending_status,
2892 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2893 clear_pending_status_callback, set_pending_status_callback,
2894 find_status_pending_thread_callback, handle_status,
2895 process_serial_event): Update.
2896 * target.c (thread_search_callback): Update.
2897 * thread-db.c (thread_db_get_tls_address): Update.
2898 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2900 * win32-i386-low.c (update_debug_registers_callback): Update.
2901 * win32-low.c (delete_thread_info, child_delete_thread,
2902 continue_one_thread, suspend_one_thread,
2903 get_child_debug_event): Adjust.
2905 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2907 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2908 * inferiors.h: Include <list>.
2909 (struct process_info) <entry>: Remove field.
2911 (pid_of): Change macro to function.
2912 (ptid_of, lwpid_of): Remove macro.
2913 (all_processes): Change type to std::list<process_info *>.
2914 (ALL_PROCESSES): Remove macro.
2915 (for_each_process, find_process): New function.
2916 * inferiors.c (all_processes): Change type to
2917 std::list<process_info *>.
2918 (find_thread_process): Adjust.
2919 (add_process): Likewise.
2920 (remove_process): Likewise.
2921 (find_process_pid): Likewise.
2922 (get_first_process): Likewise.
2923 (started_inferior_callback): Remove.
2924 (have_started_inferiors_p): Adjust.
2925 (attached_inferior_callback): Remove.
2926 (have_attached_inferiors_p): Adjust.
2927 * linux-low.c (check_zombie_leaders): Likewise.
2928 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2929 (x86_linux_update_xmltarget): Adjust.
2930 * server.c (handle_query): Likewise.
2931 (gdb_reattached_process): Remove.
2932 (handle_status): Adjust.
2933 (kill_inferior_callback): Likewise.
2934 (detach_or_kill_inferior): Remove.
2935 (print_started_pid): Likewise.
2936 (print_attached_pid): Likewise.
2937 (detach_or_kill_for_exit): Update.
2938 (process_serial_event): Likewise.
2939 * linux-arm-low.c (arm_new_fork): Likewise.
2941 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2943 * dll.h: Include <list>.
2944 (struct dll_info): Add constructor.
2945 <entry>: Remove field.
2946 (all_dlls): Change type to std::list<dll_info>.
2947 * dll.c: Include <algorithm>.
2948 (get_dll): Remove macro.
2949 (all_dlls): Change type to std::list<dll_info *>.
2950 (free_one_dll): Remove.
2951 (match_dll): Likewise.
2952 (loaded_dll): Adjust.
2953 (unloaded_dll): Adjust to all_dlls type change, use
2954 std::find_if. Inline code from match_dll.
2955 (clear_dlls): Adjust to all_dlls type change.
2956 * server.c (emit_dll_description): Remove.
2957 (handle_qxfer_libraries): Adjust to all_dlls type change,
2958 integrate emit_dll_description's functionality.
2960 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2962 * linux-low.h (struct linux_target_ops) <delete_process>: New
2964 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2965 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2966 (struct linux_target_ops): Add delete_process callback.
2967 * linux-arm-low.c (arm_delete_process): New.
2968 (struct linux_target_ops): Add delete_process callback.
2969 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2970 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2971 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2972 * linux-mips-low.c (mips_linux_delete_process): New.
2973 (struct linux_target_ops): Add delete_process callback.
2974 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2975 * linux-s390-low.c (struct linux_target_ops): Likewise.
2976 * linux-sh-low.c (struct linux_target_ops): Likewise.
2977 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2978 * linux-tile-low.c (struct linux_target_ops): Likewise.
2979 * linux-x86-low.c (x86_linux_delete_process): New.
2980 (struct linux_target_ops): Add delete_process callback.
2981 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2983 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2985 * linux-aarch64-low.c (the_low_target): Add thread delete
2987 * linux-arm-low.c (arm_delete_thread): New function.
2988 (the_low_target): Add thread delete callback.
2989 * linux-bfin-low.c (the_low_target): Likewise.
2990 * linux-crisv32-low.c (the_low_target): Likewise.
2991 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2993 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2995 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2996 * linux-mips-low.c (mips_linux_delete_thread): New function.
2997 (the_low_target): Add thread delete callback.
2998 * linux-ppc-low.c (the_low_target): Likewise.
2999 * linux-s390-low.c (the_low_target): Likewise.
3000 * linux-sh-low.c (the_low_target): Likewise.
3001 * linux-tic6x-low.c (the_low_target): Likewise.
3002 * linux-tile-low.c (the_low_target): Likewise.
3003 * linux-x86-low.c (the_low_target): Likewise.
3004 * linux-xtensa-low.c (the_low_target): Likewise.
3006 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3008 * win32-low.c: Include "common-inferior.h".
3010 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3012 * inferiors.c (set_inferior_cwd): New function.
3013 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3014 (handle_query): Inform that QSetWorkingDir is supported.
3015 * win32-low.c (create_process): Pass the inferior's cwd to
3018 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3020 * inferiors.c (current_inferior_cwd): New global variable.
3021 (get_inferior_cwd): New function.
3022 * inferiors.h (struct process_info) <cwd>: New field.
3024 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3026 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3027 (OBS): Add gdb_tilde_expand.o.
3029 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3031 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3032 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3034 2017-09-29 Pedro Alves <palves@redhat.com>
3036 * ax.c (gdb_parse_agent_expr): Constify.
3037 * ax.h (gdb_parse_agent_expr): Constify.
3038 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3040 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3041 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3042 * remote-utils.h (read_ptid): Constify.
3043 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3044 (process_point_options, process_serial_event): Constify.
3045 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3046 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3047 (cmd_qtbuffer): Constify.
3049 2017-09-29 Pedro Alves <palves@redhat.com>
3051 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3054 2017-09-29 Pedro Alves <palves@redhat.com>
3056 * linux-low.c (handle_extended_wait): Pass parent thread instead
3057 of process to thread_db_notice_clone.
3058 * linux-low.h (thread_db_notice_clone): Replace parent process
3059 parameter with parent thread parameter.
3060 * thread-db.c (find_one_thread): Add comment.
3061 (thread_db_notice_clone): Replace parent process parameter with
3062 parent thread parameter. Temporarily switch to the parent thread.
3064 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3066 * gdbthread.h: Include "common-gdbthread.h".
3067 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3068 "if" when validating the ptid.
3069 * remote-utils.c: Include "gdbthread.h".
3070 (prepare_resume_reply): Use "switch_to_thread".
3071 * target.c (done_accessing_memory): Likewise.
3073 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3075 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3076 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3077 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3078 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3079 s390x-gs-linux64-ipa.o to ipa_obj.
3080 * linux-s390-low.c (HWCAP_S390_GS): New define.
3081 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3083 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3084 (s390_arch_setup): Check for guarded-storage support and choose
3086 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3087 init_registers_s390x_gs_linux64.
3088 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3090 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3091 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3093 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3095 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3097 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3099 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3100 (thread_db_thread_handle): Declare.
3101 * linux-low.c (linux_target_ops): Initialize thread_handle.
3102 * server.c (handle_qxfer_threads_worker): Add support for
3104 * target.h (struct target_ops): Add new function pointer,
3106 (target_thread_handle): Define.
3107 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3109 (thread_db_thread_handle): New function.
3111 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3113 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3114 * linux-low.h (thread_db_notice_clone): Declare.
3115 * thread-db.c (thread_db_notice_clone): New function.
3117 2017-09-21 Pedro Alves <palves@redhat.com>
3119 * server.c (gdb_read_memory, handle_status, process_serial_event)
3120 (handle_serial_event, handle_target_event): Adjust to
3121 set_desired_thread prototype change.
3122 * target.c (set_desired_thread): Remove 'use_general' parameter
3124 * target.h (set_desired_thread): Remove 'use_general' parameter.
3126 2017-09-20 Tom Tromey <tom@tromey.com>
3128 * target.c (target_terminal::terminal_state): Define.
3129 (target_terminal::init): Rename from target_terminal_init.
3130 (target_terminal::inferior): Rename from
3131 target_terminal_inferior.
3132 (target_terminal::ours): Rename from target_terminal_ours.
3133 (target_terminal::ours_for_output, target_terminal::info): New.
3135 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3137 * server.c (accumulate_file_name_length): Remove.
3138 (emit_dll_description): Adjust to std::string change.
3139 (handle_qxfer_libraries): Use std::string to hold document.
3141 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3143 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3144 return type of xml_escape_text.
3145 * server.c (emit_dll_description): Likewise.
3147 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3149 * server.c (captured_main): Accept argument for --selftest.
3150 Update run_tests call.
3151 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3152 when registering selftests.
3154 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3156 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3157 instead of "VEC" for "target_desc.reg_defs".
3158 (regcache_cpy): Likewise.
3159 (registers_to_string): Likewise.
3160 (registers_from_string): Likewise.
3161 (find_regno): Likewise.
3162 (supply_regblock): Likewise.
3163 (regcache_raw_read_unsigned): Likewise.
3164 * tdesc.c (init_target_desc): Likewise.
3165 (tdesc_create_reg): Likewise.
3166 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3167 (struct target_desc) <reg_defs>: Convert to "std::vector".
3168 (target_desc): Do not initialize "reg_defs".
3169 (~target_desc): Update code to use "std::vector" instead of "VEC"
3170 for "target_desc.reg_defs".
3171 (operator==): Likewise.
3173 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3175 * inferiors.h (thread_to_gdb_id): Remove.
3176 * inferiors.c (thread_to_gdb_id): Remove.
3177 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3178 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3179 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3181 * nto-low.c (nto_fetch_registers, nto_store_registers,
3182 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3184 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3186 * inferiors.h (gdb_id_to_thread_id): Remove.
3187 * inferiors.c (gdb_id_to_thread_id): Remove.
3188 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3189 removal. Move pid declaration closer to where it's used.
3191 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3193 * server.c (handle_detach): New function.
3194 (process_serial_event): Move code out, call handle_detach.
3196 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3198 * server.c (require_running): Rename to ...
3199 (require_running_or_return): ... this ...
3200 (require_running_or_break): ... and this.
3201 (handle_query, process_serial_event): Adjust.
3203 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3205 * linux-low.c (linux_set_resume_request): Remove unused
3208 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3210 * server.c (first_thread_of): Remove.
3211 (process_serial_event): Replace usage of first_thread_of with
3212 find_any_thread_of_pid.
3213 * tracepoint.c (same_process_p): Remove.
3214 (gdb_agent_about_to_close): Replace usage of same_process_p with
3215 find_any_thread_of_pid.
3216 * linux-x86-low.c (same_process_callback): Remove.
3217 (x86_arch_setup_process_callback): Replace usage of
3218 same_process_callback with find_any_thread_of_pid.
3219 * thread-db.c (any_thread_of): Remove.
3220 (switch_to_process): Replace usage of any_thread_of with
3221 find_any_thread_of_pid.
3222 * inferiors.c (thread_pid_matches_callback): Remove.
3223 (find_thread_process): Adjust to use find_any_thread_of_pid.
3225 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3227 * regcache.c (get_thread_regcache): Guard calls to "memset"
3230 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3232 * linux-low.c (handle_extended_wait): Use
3233 "allocate_target_description" instead of "XNEW".
3234 * linux-x86-low.c (initialize_low_arch): Likewise.
3236 2017-09-05 Yao Qi <yao.qi@linaro.org>
3238 * configure.srv (srv_i386_regobj): Remove.
3239 (srv_amd64_regobj): Remove.
3240 (srv_regobj): Set it to "" for x86 non-linux targets.
3241 * linux-x86-tdesc.c (i386_linux_read_description):
3242 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3243 (init_registers_i386): Remove the declaration.
3244 (tdesc_i386): Remove the declaration.
3245 (lynx_i386_arch_setup): Call i386_create_target_description.
3246 * nto-x86-low.c: Likewise.
3247 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3248 [!__x86_64__]: include arch/i386.h.
3249 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3251 2017-09-05 Yao Qi <yao.qi@linaro.org>
3253 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3254 i386/amd64-XXX-linux from it.
3256 2017-09-05 Yao Qi <yao.qi@linaro.org>
3258 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3260 (ipa_amd64_linux_regobj): Remove.
3261 (ipa_x32_linux_regobj): Remove.
3263 2017-09-05 Yao Qi <yao.qi@linaro.org>
3265 * Makefile.in (arch-amd64.o): New rule.
3266 * configure.srv: Append arch-amd64.o.
3267 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3268 (get_ipa_tdesc): Call amd64_linux_read_description.
3269 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3270 and init_registers_amd64_XXX.
3271 * linux-x86-low.c (x86_linux_read_description): Call
3272 amd64_linux_read_description.
3273 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3274 (initialize_low_arch): Don't call init_registers_x32_XXX and
3275 init_registers_amd64_XXX.
3276 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3277 and tdesc_amd64_XXX.
3278 [__x86_64__] (amd64_tdesc_test): New function.
3279 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3280 and init_registers_amd64_XXX.
3281 * linux-x86-tdesc.c: Include arch/amd64.h.
3282 (xcr0_to_tdesc_idx): New function.
3283 (i386_linux_read_description): New function.
3284 (amd64_get_ipa_tdesc_idx): New function.
3285 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3286 (amd64_get_ipa_tdesc): Declare.
3288 2017-09-05 Yao Qi <yao.qi@linaro.org>
3290 * configure.srv (srv_i386_linux_xmlfiles): Remove
3291 i386/i386-XXX-linux.xml from it.
3293 2017-09-05 Yao Qi <yao.qi@linaro.org>
3295 * configure.srv: Set srv_i386_linux_regobj empty if $development
3297 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3298 initialize_low_tdesc.
3299 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3300 with #if initialize_low_tdesc.
3301 * linux-x86-tdesc-selftest.c: New file.
3302 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3304 2017-09-05 Yao Qi <yao.qi@linaro.org>
3306 * Makefile.in (arch-i386.o): New rule.
3307 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3308 (x86_64-*-linux*): Likewise.
3309 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3310 include arch/i386.h.
3311 (i386_linux_read_description): Remove code and call
3312 i386_create_target_description.
3313 * tdesc.c (allocate_target_description): New function.
3314 * tdesc.h (set_tdesc_architecture): Remove declaration.
3315 (set_tdesc_osabi): Likewise.
3317 2017-09-05 Yao Qi <yao.qi@linaro.org>
3319 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3320 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3321 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3323 * server.c (get_features_xml): Call tdesc_get_features_xml.
3324 * tdesc.c (set_tdesc_architecture): New function.
3325 (set_tdesc_osabi): New function.
3326 (tdesc_get_features_xml): New function.
3327 (tdesc_create_feature): Add an argument.
3328 * tdesc.h (struct target_desc) <features>: New field.
3329 <arch, osabi>: New field.
3330 (~target_desc): xfree features, arch, and osabi.
3331 (target_desc::oerator==): Don't compare .xmltarget.
3332 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3333 (set_tdesc_osabi): Likewise.
3334 (tdesc_get_features_xml): Likewise.
3336 2017-09-05 Yao Qi <yao.qi@linaro.org>
3338 * linux-x86-tdesc.c: Include selftest.h.
3339 (i386_tdesc_test): New function.
3340 (initialize_low_tdesc): Call selftests::register_test.
3341 * tdesc.h: Include regdef.h.
3342 (target_desc): Override operator == and !=.
3344 2017-09-05 Yao Qi <yao.qi@linaro.org>
3346 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3347 (ipa_obj): Likewise.
3348 * linux-i386-ipa.c: Include common/x86-xstate.h
3349 (get_ipa_tdesc): Call i386_linux_read_description.
3350 (initialize_low_tracepoint): Don't call init_registers_XXX
3351 functions, call initialize_low_tdesc instead.
3352 * linux-x86-low.c (x86_linux_read_description): Call
3353 i386_linux_read_description.
3354 (initialize_low_arch): Don't call init_registers_i386_XXX
3355 functions, call initialize_low_tdesc.
3356 * linux-x86-tdesc.c: New file.
3357 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3358 (i386_get_ipa_tdesc_idx): Declare.
3359 (i386_get_ipa_tdesc): Declare.
3360 (initialize_low_tdesc): Declare.
3362 2017-09-05 Yao Qi <yao.qi@linaro.org>
3364 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3367 2017-09-05 Yao Qi <yao.qi@linaro.org>
3369 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3370 * regcache.c (get_thread_regcache): Use VEC_length.
3371 (init_register_cache): Likewise.
3372 (regcache_cpy): Likewise.
3373 (registers_to_string): Iterate reg_defs via VEC_iterate.
3374 (find_regno): Likewise.
3375 (find_register_by_number): Use VEC_index.
3376 (register_size): Call find_register_by_number.
3377 (register_data): Call find_register_by_number.
3378 (supply_regblock): Use VEC_length.
3379 (regcache_raw_read_unsigned): Likewise.
3380 * tdesc.c (init_target_desc): Iterate reg_defs via
3382 (default_description): Update initializer.
3383 (copy_target_description): Don't update field num_registers.
3384 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3385 <num_registers>: Remove.
3387 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3389 * Makefile.in (.SECONDARY): Define target.
3391 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3393 * linux-low.c (linux_wait_1): Adjust.
3394 * server.c (queue_stop_reply_callback): Adjust.
3396 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3398 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3399 QEnvironmentUnset and QEnvironmentReset packets.
3400 (handle_query): Inform remote that QEnvironmentHexEncoded,
3401 QEnvironmentUnset and QEnvironmentReset are supported.
3403 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3405 * inferiors.h (inferior_target_data): Rename to ...
3406 (thread_target_data): ... this.
3407 (inferior_regcache_data): Rename to ...
3408 (thread_regcache_data): ... this.
3409 (set_inferior_regcache_data): Rename to ...
3410 (set_thread_regcache_data): ... this.
3411 * inferiors.c (inferior_target_data): Rename to ...
3412 (thread_target_data): ... this.
3413 (inferior_regcache_data): Rename to ...
3414 (thread_regcache_data): ... this.
3415 (set_inferior_regcache_data): Rename to ...
3416 (set_thread_regcache_data): ... this.
3417 (free_one_thread): Update.
3418 * linux-low.h (get_thread_lwp): Update.
3419 * regcache.c (get_thread_regcache): Update.
3420 (regcache_invalidate_thread): Update.
3421 (free_register_cache_thread): Update.
3422 * win32-i386-low.c (update_debug_registers_callback): Update.
3423 (win32_get_current_dr): Update.
3424 * win32-low.c (thread_rec): Update.
3425 (delete_thread_info): Update.
3426 (continue_one_thread): Update.
3427 (suspend_one_thread): Update.
3429 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3431 * inferiors.c (set_inferior_target_data): Remove.
3432 * inferiors.h (set_inferior_target_data): Remove.
3434 2017-08-18 Yao Qi <yao.qi@linaro.org>
3436 * Makefile.in (OBS): Add selftest.o.
3437 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3438 * configure, config.in: Re-generated.
3439 * server.c: Include common/sefltest.h.
3440 (captured_main): Handle option --selftest.
3442 2017-08-09 Yao Qi <yao.qi@linaro.org>
3444 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3445 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3446 i386-avx-mpx.o and i386-mmx.o.
3447 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3448 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3449 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3450 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3451 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3452 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3453 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3454 i386/amd64-avx-mpx.xml.
3456 2017-08-09 Yao Qi <yao.qi@linaro.org>
3458 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3459 and x32-avx-avx512.o.
3460 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3461 i386/x32-avx-avx512.xml.
3463 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3465 * tracepoint.h (enum class fast_tpoint_collect_result): New
3467 (fast_tracepoint_collecting): Change return type to
3468 fast_tpoint_collect_result.
3469 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3470 * linux-low.h: Include tracepoint.h.
3471 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3472 fast_tpoint_collect_result.
3473 * linux-low.c (handle_tracepoints): Adjust.
3474 (linux_fast_tracepoint_collecting): Change return type to
3475 fast_tpoint_collect_result.
3476 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3477 linux_wait_1, stuck_in_jump_pad_callback,
3478 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3479 proceed_one_lwp): Adjust to type change.
3481 2017-07-10 Yao Qi <yao.qi@linaro.org>
3483 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3485 2017-06-29 Yao Qi <yao.qi@linaro.org>
3487 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3489 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3491 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3493 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3495 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3497 * linux-low.c (linux_create_inferior): Adjust code to access the
3498 environment information via 'gdb_environ' class.
3499 * lynx-low.c (lynx_create_inferior): Likewise.
3500 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3501 (get_environ): Return a pointer to 'our_environ'.
3502 (captured_main): Initialize 'our_environ'.
3503 * server.h (get_environ): Adjust prototype.
3504 * spu-low.c (spu_create_inferior): Adjust code to access the
3505 environment information via 'gdb_environ' class.
3507 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3509 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3510 usage of "register" keyword.
3512 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3514 * configure: Re-generate.
3516 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3518 * configure: Re-generate.
3520 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3522 * Makefile.in (COMPILE.pre): Add "-x c++".
3524 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3526 * fork-child.c: Conditionally include <signal.h>.
3528 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3530 * server.c (handle_general_set): Handle new packet
3531 "QStartupWithShell".
3532 (handle_query): Add "QStartupWithShell" to the list of supported
3534 (gdbserver_usage): Add help text explaining the
3535 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3537 (captured_main): Recognize and act upon the presence of the new
3540 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3541 Pedro Alves <palves@redhat.com>
3543 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3544 * configure: Regenerate.
3545 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3547 (i[34567]86-*-lynxos*): Likewise.
3548 (spu*-*-*): Likewise.
3549 * fork-child.c: New file.
3550 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3552 (linux_ptrace_fun): New function.
3553 (linux_create_inferior): Adjust function prototype to reflect
3554 change on "target.h". Adjust function code to use
3556 (linux_request_interrupt): Delete "signal_pid".
3557 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3558 (lynx_ptrace_fun): New function.
3559 (lynx_create_inferior): Adjust function prototype to reflect
3560 change on "target.h". Adjust function code to use
3562 * nto-low.c (nto_create_inferior): Adjust function prototype and
3563 code to reflect change on "target.h". Update comments.
3564 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3565 "common-terminal.h" and "environ.h".
3566 (terminal_fd): Moved to fork-child.c.
3567 (old_foreground_pgrp): Likewise.
3568 (restore_old_foreground_pgrp): Likewise.
3569 (last_status): Make it global.
3570 (last_ptid): Likewise.
3571 (our_environ): New variable.
3572 (startup_with_shell): Likewise.
3573 (program_name): Likewise.
3574 (program_argv): Rename to...
3575 (program_args): ...this.
3576 (wrapper_argv): New variable.
3577 (start_inferior): Delete function.
3578 (get_exec_wrapper): New function.
3579 (get_exec_file): Likewise.
3580 (get_environ): Likewise.
3581 (prefork_hook): Likewise.
3582 (post_fork_inferior): Likewise.
3583 (postfork_hook): Likewise.
3584 (postfork_child_hook): Likewise.
3585 (handle_v_run): Update code to deal with arguments coming from the
3586 remote host. Update calls from "start_inferior" to
3588 (captured_main): Likewise. Initialize environment variable. Call
3590 * server.h (post_fork_inferior): New prototype.
3591 (get_environ): Likewise.
3592 (last_status): Declare.
3593 (last_ptid): Likewise.
3594 (signal_pid): Likewise.
3595 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3596 (spu_ptrace_fun): New function.
3597 (spu_create_inferior): Adjust function prototype to reflect change
3598 on "target.h". Adjust function code to use "fork_inferior".
3599 * target.c (target_terminal_init): New function.
3600 (target_terminal_inferior): Likewise.
3601 (target_terminal_ours): Likewise.
3602 * target.h: Include <vector>.
3603 (struct target_ops) <create_inferior>: Update prototype.
3604 (create_inferior): Update macro.
3605 * utils.c (gdb_flush_out_err): New function.
3606 * win32-low.c (win32_create_inferior): Adjust function prototype
3607 and code to reflect change on "target.h".
3609 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3611 * inferiors.c (switch_to_thread): New function.
3613 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3615 * Makefile.in (SFILE): Add "common/job-control.c".
3616 (OBS): Add "job-control.o".
3618 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3620 * Makefile: Remove "@host_makefile_frag@".
3622 2017-05-05 Pedro Alves <palves@redhat.com>
3624 * configure: Regenerate.
3626 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3628 * configure: Regenerate.
3630 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3632 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3633 software_single_step change of return type to
3634 std::vector<CORE_ADDR>.
3635 * linux-low.c (install_software_single_step_breakpoints):
3637 * linux-low.h (install_software_single_step_breakpoints):
3640 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3642 * remote-utils.c: Include "gdb_termios.h" instead of
3644 * terminal.h: Delete file.
3646 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3648 * server.c: Include <vector>.
3649 <program_argv, wrapper_argv>: Convert to std::vector.
3650 (start_inferior): Rewrite function to use C++.
3651 (handle_v_run): Likewise. Update code that calculates the argv
3652 based on the vRun packet; use C++.
3653 (captured_main): Likewise.
3655 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3657 * server.c (handle_v_cont): Initialize thread_resume::thread
3660 2017-04-05 Pedro Alves <palves@redhat.com>
3662 * configure: Regenerate.
3664 2017-04-05 Pedro Alves <palves@redhat.com>
3666 * gdbreplay.c (sync_error): Constify.
3667 * linux-x86-low.c (push_opcode): Constify.
3669 2017-04-05 Pedro Alves <palves@redhat.com>
3671 * win32-low.c (get_child_debug_event)
3672 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3673 Report TARGET_WAITKIND_SPURIOUS instead.
3675 2017-04-05 Pedro Alves <palves@redhat.com>
3677 * remote-utils.c (remote_prepare, remote_open): Constify.
3678 * remote-utils.h (remote_prepare, remote_open): Constify.
3679 * server.c (captured_main): Constify 'port' handling.
3681 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3683 * Makefile.in (clean): Clear .deps.
3685 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3687 * .gitignore: Remove generated files, replace with wildcard.
3688 * (clean): Replace removal of generated files with wildcard.
3689 (version.c): Replace with...
3690 (version-generated.c): ...this.
3691 (xml-builtin.c): Replace with...
3692 (xml-builtin-generated.c): ...this.
3693 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3694 (%.c: *regformats*): Replace with...
3695 (%-generated.c: *regformats*): ...this.
3697 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3699 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3700 (xtensa_fill_gregset): Call collect_register_by_name for
3702 (xtensa_store_gregset): Call supply_register_by_name for
3705 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3707 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3708 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3709 (xtensa_store_gregset): Call supply_register for all registers in
3710 a0_regnum..a0_regnum + C0_NREGS range.
3712 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3714 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3715 (ax-ipa.o: ax.c): Remove.
3716 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3717 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3718 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3719 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3720 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3722 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3724 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3725 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3726 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3727 (errors-ipa.o: ../common/errors.c): Remove.
3728 (format-ipa.o: ../common/format.c): Remove.
3729 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3731 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3733 * Makefile.in (%-ipa.o: %.c): New rule.
3734 (tracepoint-ipa.o: tracepoint.c): Remove.
3735 (utils-ipa.o: utils.c): Remove.
3736 (remote-utils-ipa.o: remote-utils.c): Remove.
3737 (regcache-ipa.o: regcache.c): Remove.
3738 (i386-linux-ipa.o: i386-linux.c): Remove.
3739 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3740 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3741 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3742 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3743 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3744 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3745 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3746 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3747 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3748 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3749 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3750 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3751 (aarch64-ipa.o: aarch64.c): Remove.
3752 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3753 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3754 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3755 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3756 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3757 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3758 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3759 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3760 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3761 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3762 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3763 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3764 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3765 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3766 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3767 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3768 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3769 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3770 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3771 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3772 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3773 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3774 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3775 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3776 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3777 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3778 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3779 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3780 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3781 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3782 (tdesc-ipa.o: tdesc.c): Remove.
3783 (x32-linux-ipa.o: x32-linux.c): Remove.
3784 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3785 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3787 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3789 * Makefile.in (%.o: ../arch/%.c): New rule.
3790 (arm.o: ../arch/arm.c): Remove.
3791 (arm-linux.o: ../arch/arm-linux.c): Remove.
3792 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3793 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3795 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3797 * Makefile.in (%.o: ../nat/%.c): New rule.
3798 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3799 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3800 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3801 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3802 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3803 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3804 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3805 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3806 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3807 (linux-personality.o: ../nat/linux-personality.c): Remove.
3808 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3809 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3810 (x86-linux.o: ../nat/x86-linux.c): Remove.
3811 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3812 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3814 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3816 * Makefile.in (%.o: ../common/%.c): New rule.
3817 (signals.o: ../common/signals.c): Remove.
3818 (print-utils.o: ../common/print-utils.c): Remove.
3819 (rsp-low.o: ../common/rsp-low.c): Remove.
3820 (common-utils.o: ../common/common-utils.c): Remove.
3821 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3822 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3823 (vec.o: ../common/vec.c): Remove.
3824 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3825 (xml-utils.o: ../common/xml-utils.c): Remove.
3826 (ptid.o: ../common/ptid.c): Remove.
3827 (buffer.o: ../common/buffer.c): Remove.
3828 (format.o: ../common/format.c): Remove.
3829 (filestuff.o: ../common/filestuff.c): Remove.
3830 (agent.o: ../common/agent.c): Remove.
3831 (errors.o: ../common/errors.c): Remove.
3832 (environ.o: ../common/environ.c): Remove.
3833 (common-debug.o: ../common/common-debug.c): Remove.
3834 (cleanups.o: ../common/cleanups.c): Remove.
3835 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3836 (fileio.o: ../common/fileio.c): Remove.
3837 (common-regcache.o: ../common/common-regcache.c): Remove.
3838 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3839 (new-op.o: ../common/new-op.c): Remove.
3840 (btrace-common.o: ../common/btrace-common.c): Remove.
3842 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3844 * Makefile.in (%.o: ../target/%.c): New rule.
3845 (waitstatus.o: ../target/waitstatus.c): Remove.
3847 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3850 (%.c: ../regformats/%.dat,
3851 (%.c: ../regformats/arm/%.dat,
3852 (%.c: ../regformats/i386/%.dat,
3853 (%.c: ../regformats/rs6000/%.dat): New rules.
3854 (aarch64.c): Remove.
3855 (reg-arm.c): Remove.
3856 (arm-with-iwmmxt.c): Remove.
3857 (arm-with-vfpv2.c): Remove.
3858 (arm-with-vfpv3.c): Remove.
3859 (arm-with-neon.c): Remove.
3860 (reg-bfin.c): Remove.
3861 (reg-cris.c): Remove.
3862 (reg-crisv32.c): Remove.
3864 (i386-linux.c): Remove.
3865 (i386-avx.c): Remove.
3866 (i386-avx-linux.c): Remove.
3867 (i386-avx-avx512.c): Remove.
3868 (i386-avx-avx512-linux.c): Remove.
3869 (i386-mpx.c): Remove.
3870 (i386-mpx-linux.c): Remove.
3871 (i386-avx-mpx-avx512-pku.c): Remove.
3872 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3873 (i386-avx-mpx.c): Remove.
3874 (i386-avx-mpx-linux.c): Remove.
3875 (i386-mmx.c): Remove.
3876 (i386-mmx-linux.c): Remove.
3877 (reg-ia64.c): Remove.
3878 (reg-m32r.c): Remove.
3879 (reg-m68k.c): Remove.
3881 (mips-linux.c): Remove.
3882 (mips-dsp-linux.c): Remove.
3883 (mips64-linux.c): Remove.
3884 (mips64-dsp-linux.c): Remove.
3885 (nios2-linux.c): Remove.
3886 (powerpc-32.c): Remove.
3887 (powerpc-32l.c): Remove.
3888 (powerpc-altivec32l.c): Remove.
3889 (powerpc-cell32l.c): Remove.
3890 (powerpc-vsx32l.c): Remove.
3891 (powerpc-isa205-32l.c): Remove.
3892 (powerpc-isa205-altivec32l.c): Remove.
3893 (powerpc-isa205-vsx32l.c): Remove.
3894 (powerpc-e500l.c): Remove.
3895 (powerpc-64l.c): Remove.
3896 (powerpc-altivec64l.c): Remove.
3897 (powerpc-cell64l.c): Remove.
3898 (powerpc-vsx64l.c): Remove.
3899 (powerpc-isa205-64l.c): Remove.
3900 (powerpc-isa205-altivec64l.c): Remove.
3901 (powerpc-isa205-vsx64l.c): Remove.
3902 (s390-linux32.c): Remove.
3903 (s390-linux32v1.c): Remove.
3904 (s390-linux32v2.c): Remove.
3905 (s390-linux64.c): Remove.
3906 (s390-linux64v1.c): Remove.
3907 (s390-linux64v2.c): Remove.
3908 (s390-te-linux64.c): Remove.
3909 (s390-vx-linux64.c): Remove.
3910 (s390-tevx-linux64.c): Remove.
3911 (s390x-linux64.c): Remove.
3912 (s390x-linux64v1.c): Remove.
3913 (s390x-linux64v2.c): Remove.
3914 (s390x-te-linux64.c): Remove.
3915 (s390x-vx-linux64.c): Remove.
3916 (s390x-tevx-linux64.c): Remove.
3917 (tic6x-c64xp-linux.c): Remove.
3918 (tic6x-c64x-linux.c): Remove.
3919 (tic6x-c62x-linux.c): Remove.
3921 (reg-sparc64.c): Remove.
3922 (reg-spu.c): Remove.
3924 (amd64-linux.c): Remove.
3925 (amd64-avx.c): Remove.
3926 (amd64-avx-linux.c): Remove.
3927 (amd64-avx-avx512.c): Remove.
3928 (amd64-avx-avx512-linux.c): Remove.
3929 (amd64-mpx.c): Remove.
3930 (amd64-mpx-linux.c): Remove.
3931 (amd64-avx-mpx-avx512-pku.c): Remove.
3932 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3933 (amd64-avx-mpx.c): Remove.
3934 (amd64-avx-mpx-linux.c): Remove.
3936 (x32-linux.c): Remove.
3937 (x32-avx.c): Remove.
3938 (x32-avx-linux.c): Remove.
3939 (x32-avx-avx512.c): Remove.
3940 (x32-avx-avx512-linux.c): Remove.
3941 (reg-xtensa.c): Remove.
3942 (reg-tilegx.c): Remove.
3943 (reg-tilegx32.c): Remove.
3945 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3947 * Makefile.in (SFILES): Add "common/environ.c".
3948 (OBJS): Add "common/environ.h".
3950 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3952 * configure.ac: Check if the fs_base and gs_base members of
3953 `struct user_regs_struct' exist.
3954 * config.in: Regenerated.
3955 * configure: Likewise.
3957 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3959 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3961 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3962 (get_next_pcs_syscall_next_pc): Likewise.
3964 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3966 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3967 * nto-x86-low.c: Likewise.
3969 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3971 * Makefile.in: Include disable-implicit-rules.mk.
3973 2016-11-23 Pedro Alves <palves@redhat.com>
3975 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3976 (debug_vprintf): Use std::chrono::steady_clock instead of
3977 gettimeofday. Use '.' instead of ':'.
3978 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3979 (get_timestamp): Use std::chrono::steady_clock instead of
3982 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3984 * Makefile.in: Fix whitespace formatting.
3986 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3988 * Makefile.in (SFILES, OBS): Flatten list and order
3991 2016-11-23 Pedro Alves <palves@redhat.com>
3993 * event-loop.c (handle_file_event): Use warning.
3994 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3995 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3998 2016-11-23 Pedro Alves <palves@redhat.com>
4000 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4002 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4003 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4004 debug_printf and debug_flush for debug output.
4005 * server.c (handle_general_set): Likewise.
4006 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4009 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4011 * Makefile.in (.c.o): Replace rule with ...
4012 (%.o: %.c): ... this one.
4014 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4016 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4017 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4019 * configure.ac: Remove checks for the make program.
4020 * configure: Re-generate.
4022 2016-10-28 Pedro Alves <palves@redhat.com>
4024 * Makefile.in (CXX_DIALECT): Get from configure.
4025 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4026 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4027 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4028 * config.in: Regenerate.
4029 * configure: Regenerate.
4031 2016-10-27 Yao Qi <yao.qi@linaro.org>
4033 * linux-low.c (linux_supports_range_stepping): Return true if
4034 can_software_single_step return true.
4036 2016-10-27 Yao Qi <yao.qi@linaro.org>
4038 * inferiors.c (find_inferior_in_random): New function.
4039 * inferiors.h (find_inferior_in_random): Declare.
4040 * linux-low.c (linux_wait_for_event_filtered): Call
4041 find_inferior_in_random instead of find_inferior.
4043 2016-10-27 Yao Qi <yao.qi@linaro.org>
4045 * linux-low.c (linux_wait_1): If single-step breakpoints are
4046 inserted, remove them.
4048 2016-10-26 Pedro Alves <palves@redhat.com>
4050 * linux-low.c (handle_extended_wait): Link parent/child fork
4052 (linux_wait_1): Unlink them.
4053 (linux_set_resume_request): Ignore resume requests for
4054 already-resumed and unhandled fork child threads.
4055 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4056 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4058 (handle_v_requests) <vCont>: Don't call require_running.
4059 * server.h (in_queued_stop_replies): New declaration.
4061 2016-10-24 Yao Qi <yao.qi@linaro.org>
4064 * linux-aarch64-low.c (append_insns): Cast the return value to
4067 2016-10-10 Yao Qi <yao.qi@linaro.org>
4069 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4071 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4073 * target.c (target_supports_multi_process): New function, moved
4075 * target.h (target_supports_multi_process): ... here. Remove
4078 2016-10-05 Tom Tromey <tom@tromey.com>
4081 * tracepoint.c (handle_tracepoint_bkpts): Check
4082 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4084 2016-10-05 Yao Qi <yao.qi@linaro.org>
4086 * configure.srv: Update the path of arm-*.xml files.
4088 2016-10-05 Terry Guo <terry.guo@arm.com>
4089 Yao Qi <yao.qi@linaro.org>
4091 * Makefile.in: Adjust the path of rules.
4092 * configure.srv: Update the path of xml files.
4093 * regformats/arm-with-iwmmxt.dat: Regenerated.
4094 * regformats/arm-with-neon.dat: Likewise.
4095 * regformats/arm-with-vfpv2.dat: Likewise.
4096 * regformats/arm-with-vfpv3.dat Likewise.
4098 2016-09-30 Yao Qi <yao.qi@linaro.org>
4101 * target.c (target_stop_and_wait): Don't call
4102 target_continue_no_signal, use resume_stop instead.
4104 2016-09-26 Yao Qi <yao.qi@linaro.org>
4106 * linux-low.c (linux_wait_1): Call debug_exit.
4108 2016-09-23 Pedro Alves <palves@redhat.com>
4110 * Makefile.in (SFILES): Add common/new-op.c.
4111 (OBS): Add common/new-op.o.
4112 (new-op.o): New rule.
4114 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4116 * .gitinore: Ignore more files.
4118 2016-09-21 Yao Qi <yao.qi@linaro.org>
4120 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4123 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4125 * server.c (start_inferior): Call target_mourn_inferior instead of
4126 mourn_inferior; pass ptid_t argument to it.
4128 (handle_target_event): Likewise.
4129 * target.c (target_mourn_inferior): New function.
4130 * target.h (mourn_inferior): Delete macro.
4132 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4134 * linux-low.c (lwp_is_stepping): New function.
4136 2016-09-06 Carl Love <cel@us.ibm.com>
4138 * server.c (start_inferior): Fixed comment, requested comment change
4139 didn't get updated correctly. Removed reference to ptrace () call as
4140 it is only true on Linux systems.
4142 2016-09-06 Carl Love <cel@us.ibm.com>
4144 * server.c (start_inferior): Do not call
4145 function target_post_create_inferior () if the
4146 inferior process has already exited.
4148 2016-09-05 Pedro Alves <palves@redhat.com>
4150 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4151 (COMPILE.pre, CC_LD): Use CXX directly.
4152 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4153 * acinclude.m4: Don't include build-with-cxx.m4.
4154 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4155 * configure: Regenerate.
4157 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4160 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4161 call writing data to own_buf.
4163 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4165 * target.c (mywait): Call target_wait instead of
4167 (target_wait): New function.
4169 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4171 * server.c (start_inferior): New variable 'ptid'. Replace calls
4172 to the_target->resume by target_continue{,_no_signal}, depending
4174 * target.c (target_stop_and_wait): Call target_continue_no_signal
4175 instead of the_target->resume.
4176 (target_continue): New function.
4178 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4180 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4182 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4185 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4187 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4188 * linux-arm-low.c (ps_get_thread_area): Likewise.
4189 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4190 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4191 * linux-mips-low.c (ps_get_thread_area): Likewise.
4192 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4193 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4194 * linux-x86-low.c (ps_get_thread_area): Likewise.
4195 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4197 2016-08-19 Pedro Alves <palves@redhat.com>
4199 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4201 2016-08-19 Pedro Alves <palves@redhat.com>
4203 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4204 comment. Use memcpy instead of casting through unsigned long.
4206 2016-08-19 Pedro Alves <palves@redhat.com>
4208 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4209 allocating around 0x80000000.
4211 2016-08-19 Pedro Alves <palves@redhat.com>
4214 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4215 (x32-avx512-linux-ipa.o): New rules.
4216 * configure.ac (x86_64-*-linux*): New x32 check.
4217 * configure.srv (ipa_x32_linux_regobj): New.
4218 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4219 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4221 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4223 * configure: Regenerate.
4225 2016-08-09 Pedro Alves <palves@redhat.com>
4228 * Makefile.in (OBS): Add signals-state-save-restore.o.
4229 (signals-state-save-restore.o): New rule.
4230 * config.in: Regenerate.
4231 * configure: Regenerate.
4232 * linux-low.c: Include "signals-state-save-restore.h".
4233 (linux_create_inferior): Call
4234 restore_original_signals_state.
4235 * server.c: Include "dispositions-save-restore.h".
4236 (captured_main): Call save_original_signals_state.
4238 2016-08-05 Pedro Alves <palves@redhat.com>
4240 * configure: Regenerate.
4242 2016-08-04 Yao Qi <yao.qi@linaro.org>
4244 * linux-low.c (regsets_fetch_inferior_registers): Check
4245 errno is ESRCH or not.
4247 2016-08-02 Yao Qi <yao.qi@linaro.org>
4249 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4250 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4251 (thread_db_load_search): Update.
4252 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4253 td_ta_set_event and td_ta_event_getmsg.
4255 2016-07-26 Pedro Alves <palves@redhat.com>
4258 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4259 of unsigned long for 64-bit registers and use uint32_t instead of
4260 unsigned int for 32-bit registers.
4262 2016-07-26 Pedro Alves <palves@redhat.com>
4264 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4267 2016-07-21 Tom Tromey <tom@tromey.com>
4269 * configure: Rebuild.
4271 2016-07-21 Yao Qi <yao.qi@linaro.org>
4273 * mem-break.c (find_gdb_breakpoint): Cast bp to
4274 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4276 2016-07-21 Yao Qi <yao.qi@linaro.org>
4278 * server.c (handle_v_requests): Support s and S actions
4279 if target_supports_software_single_step return true.
4281 2016-07-21 Yao Qi <yao.qi@linaro.org>
4283 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4284 is resume_step, call maybe_hw_step.
4285 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4287 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4289 (proceed_one_lwp): If resume request is resume_step, install
4290 reinsert breakpoints and call maybe_hw_step.
4292 2016-07-21 Yao Qi <yao.qi@linaro.org>
4294 * linux-low.c (proceed_one_lwp): Declare.
4295 (linux_resume_one_thread): Remove local variable 'step'.
4296 Lift code enqueue signal. Call proceed_one_lwp instead of
4297 linux_resume_one_lwp.
4299 2016-07-21 Yao Qi <yao.qi@linaro.org>
4301 * linux-low.c (linux_resume_one_thread): Call
4302 enqueue_pending_signal.
4304 2016-07-21 Yao Qi <yao.qi@linaro.org>
4306 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4307 * inferiors.c (do_restore_current_thread_cleanup): New function.
4308 (make_cleanup_restore_current_thread): Likewise.
4309 * linux-low.c (install_software_single_step_breakpoints): Call
4310 make_cleanup_restore_current_thread. Switch current_thread to
4313 2016-07-21 Yao Qi <yao.qi@linaro.org>
4315 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4316 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4317 (clone_one_breakpoint): Likewise.
4318 (delete_reinsert_breakpoints): Change parameter to thread.
4320 (has_reinsert_breakpoints): Likewise.
4321 (uninsert_reinsert_breakpoints): Likewise.
4322 (reinsert_reinsert_breakpoints): Likewise.
4323 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4324 (delete_reinsert_breakpoints): Likewise.
4325 (reinsert_reinsert_breakpoints): Likewise.
4326 (uninsert_reinsert_breakpoints): Likewise.
4327 (has_reinsert_breakpoints): Likewise.
4329 2016-07-21 Yao Qi <yao.qi@linaro.org>
4331 * inferiors.c (get_thread_process): Make parameter const.
4332 * inferiors.h (get_thread_process): Update declaration.
4333 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4334 Add new parameters child_thread and parent_thread. Callers
4336 * mem-break.h (clone_all_breakpoints): Update declaration.
4338 2016-07-21 Yao Qi <yao.qi@linaro.org>
4340 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4341 <command_list, handler>: Remove.
4342 (struct gdb_breakpoint): New.
4343 (struct other_breakpoint): New.
4344 (struct reinsert_breakpoint): New.
4345 (is_gdb_breakpoint): New function.
4346 (any_persistent_commands): Update command_list if
4347 is_gdb_breakpoint returns true.
4348 (set_breakpoint): Create breakpoints according to their types.
4349 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4350 (set_gdb_breakpoint_1): Likewise.
4351 (set_gdb_breakpoint): Likewise.
4352 (clear_breakpoint_conditions): Change parameter type to
4353 'struct gdb_breakpoint *'.
4354 (clear_breakpoint_commands): Likewise.
4355 (clear_breakpoint_conditions_and_commands): Likewise.
4356 (add_condition_to_breakpoint): Likewise.
4357 (add_breakpoint_condition): Likewise.
4358 (add_commands_to_breakpoint): Likewise.
4359 (check_breakpoints): Check other_breakpoint.
4360 (clone_one_breakpoint): Clone breakpopint according to its type.
4361 * mem-break.h (struct gdb_breakpoint): Declare.
4362 (set_gdb_breakpoint): Update declaration.
4363 (clear_breakpoint_conditions_and_commands): Likewise.
4364 (add_breakpoint_condition): Likewise.
4365 (add_breakpoint_commands): Likewise.
4366 * server.c (process_point_options): Change parameter type to
4367 'struct gdb_breakpoint *'.
4369 2016-07-21 Yao Qi <yao.qi@linaro.org>
4371 * mem-break.c (set_breakpoint_at): Rename it to ...
4372 (set_breakpoint_type_at): ... it.
4373 (set_breakpoint_at): Call set_breakpoint_type_at.
4374 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4375 * mem-break.h (set_breakpoint_at): Update comments.
4377 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4379 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4381 (nios2_store_gregset): Likewise.
4383 2016-07-01 Pedro Alves <palves@redhat.com>
4384 Antoine Tremblay <antoine.tremblay@ericsson.com>
4386 * linux-low.c: Change interface to take the target lwp_info
4387 pointer directly and return void. Handle detaching from a zombie
4389 (linux_detach_lwp_callback): New function.
4390 (linux_detach): Detach from the leader thread after detaching from
4393 2016-06-28 Yao Qi <yao.qi@linaro.org>
4395 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4396 for variable new_offset.
4397 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4398 (aarch64_ftrace_insn_reloc_cb): Likewise.
4399 (aarch64_ftrace_insn_reloc_tb): Likewise.
4400 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4401 PRIx64 instead of PRIx32.
4403 2016-06-28 Yao Qi <yao.qi@linaro.org>
4405 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4406 (the_low_target): Install arm_get_syscall_trapinfo.
4408 2016-06-28 Yao Qi <yao.qi@linaro.org>
4410 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4412 (the_low_target): Install aarch64_get_syscall_trapinfo.
4414 2016-06-28 Yao Qi <yao.qi@linaro.org>
4416 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4418 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4419 Remove parameter sysno.
4420 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4423 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4425 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4426 (s390_emit_ne_goto): Likewise.
4427 (s390_emit_lt_goto): Likewise.
4428 (s390_emit_le_goto): Likewise.
4429 (s390_emit_gt_goto): Likewise.
4430 (s390_emit_ge_goto): Likewise.
4431 (s390x_emit_eq_goto): Likewise.
4432 (s390x_emit_ne_goto): Likewise.
4433 (s390x_emit_lt_goto): Likewise.
4434 (s390x_emit_le_goto): Likewise.
4435 (s390x_emit_gt_goto): Likewise.
4436 (s390x_emit_ge_goto): Likewise.
4437 (s390_emit_ops_impl): Mark variable static.
4438 (s390x_emit_ops): Likewise.
4440 2016-06-17 Yao Qi <yao.qi@linaro.org>
4442 * linux-low.c (handle_extended_wait): Call
4443 uninsert_reinsert_breakpoints for the parent process. Remove
4444 reinsert breakpoints from the child process. Reinsert them to
4445 the parent process when vfork is done.
4446 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4447 (reinsert_reinsert_breakpoints): New function.
4448 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4449 (reinsert_reinsert_breakpoints): Declare.
4451 2016-06-17 Yao Qi <yao.qi@linaro.org>
4453 * linux-low.c (handle_extended_wait): If the parent is doing
4454 step-over, remove the reinsert breakpoints from the forked child.
4456 2016-06-17 Yao Qi <yao.qi@linaro.org>
4458 * linux-low.c (unsuspend_all_lwps): Declare.
4459 (linux_low_filter_event): If thread exited, call finish_step_over.
4460 If step-over is finished, unsuspend other threads.
4462 2016-06-17 Yao Qi <yao.qi@linaro.org>
4464 * linux-low.c (linux_resume_one_lwp_throw): Assert
4465 has_reinsert_breakpoints returns false.
4466 * mem-break.c (delete_disabled_breakpoints): Assert
4467 bp type isn't reinsert_breakpoint.
4469 2016-06-17 Yao Qi <yao.qi@linaro.org>
4471 * linux-low.c (maybe_hw_step): New function.
4472 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4473 (finish_step_over): Switch current_thread to lwp temporarily,
4474 and assert has_reinsert_breakpoints returns true.
4475 (proceed_one_lwp): Call maybe_hw_step.
4476 * mem-break.c (has_reinsert_breakpoints): New function.
4477 * mem-break.h (has_reinsert_breakpoints): Declare.
4479 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4481 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4483 2016-05-17 Yao Qi <yao.qi@linaro.org>
4485 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4486 instead of find_inferior.
4488 2016-05-05 Yao Qi <yao.qi@linaro.org>
4490 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4491 Initialize res to zero.
4493 2016-05-05 Yao Qi <yao.qi@linaro.org>
4495 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4498 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4500 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4501 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4502 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4504 2016-04-28 Par Olsson <par.olsson@windriver.com>
4505 Simon Marchi <simon.marchi@ericsson.com>
4507 * tracepoint.c (write_inferior_int8): New function.
4508 (cmd_qtenable_disable): Write enable flag using
4509 write_inferior_int8.
4511 2016-04-25 Yao Qi <yao.qi@linaro.org>
4513 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4514 (need_step_over_p): Return zero if the LWP has pending signals
4515 can be delivered on software single step target.
4517 2016-04-25 Yao Qi <yao.qi@linaro.org>
4519 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4520 return instead of error.
4522 2016-04-22 Yao Qi <yao.qi@linaro.org>
4524 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4527 2016-04-22 Yao Qi <yao.qi@linaro.org>
4529 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4530 signal when stepping over breakpoint with software single
4533 2016-04-21 Pedro Alves <palves@redhat.com>
4535 * linux-s390-low.c (s390_collect_ptrace_register)
4536 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4538 (s390_check_regset): Use void * instead of gdb_byte *.
4540 2016-04-20 Pedro Alves <palves@redhat.com>
4542 * configure: Renegerate.
4544 2016-04-20 Yao Qi <yao.qi@linaro.org>
4546 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4547 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4549 (arm_store_gregset): Likewise.
4551 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4553 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4554 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4555 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4556 (amd64-avx-mpx-linux.c): New rules.
4557 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4558 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4559 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4560 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4561 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4562 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4563 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4564 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4565 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4566 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4567 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4568 * linux-x86-low.c (x86_linux_read_description): Add case for
4569 X86_XSTATE_AVX_MPX_MASK.
4570 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4571 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4572 init_registers_i386_avx_mpx_linux.
4573 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4574 (initialize_low_tracepoint): Call
4575 init_registers_i386_avx_mpx_linux.
4576 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4577 (initialize_low_tracepoint): Call
4578 init_registers_amd64_avx_mpx_linux.
4579 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4580 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4581 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4584 2016-04-18 Pedro Alves <palves@redhat.com>
4586 * configure: Regenerate.
4588 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4590 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4591 (aarch64_emit_sub): Likewise.
4593 2016-04-12 Pedro Alves <palves@redhat.com>
4595 * utils.c (prepare_to_throw_exception): Delete.
4597 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4599 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4601 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4603 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4605 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4607 * linux-aarch64-ipa.c: Add <elf.h> include.
4608 * linux-ppc-ipa.c: Add <elf.h> include.
4609 * linux-s390-ipa.c: Add <elf.h> include.
4611 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4613 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4614 (get_raw_reg_ptr): Likewise.
4615 (get_trace_state_variable_value_ptr): Likewise.
4616 (set_trace_state_variable_value_ptr): Likewise.
4617 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4620 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4621 Marcin Kościelnicki <koriakin@0x04.net>
4624 * linux-ppc-low.c (emit_insns): New function.
4625 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4626 (ppc_emit_prologue): New function.
4627 (ppc_emit_epilogue): New function.
4628 (ppc_emit_add): New function.
4629 (ppc_emit_sub): New function.
4630 (ppc_emit_mul): New function.
4631 (ppc_emit_lsh): New function.
4632 (ppc_emit_rsh_signed): New function.
4633 (ppc_emit_rsh_unsigned): New function.
4634 (ppc_emit_ext): New function.
4635 (ppc_emit_zero_ext): New function.
4636 (ppc_emit_log_not): New function.
4637 (ppc_emit_bit_and): New function.
4638 (ppc_emit_bit_or): New function.
4639 (ppc_emit_bit_xor): New function.
4640 (ppc_emit_bit_not): New function.
4641 (ppc_emit_equal): New function.
4642 (ppc_emit_less_signed): New function.
4643 (ppc_emit_less_unsigned): New function.
4644 (ppc_emit_ref): New function.
4645 (ppc_emit_const): New function.
4646 (ppc_emit_reg): New function.
4647 (ppc_emit_pop): New function.
4648 (ppc_emit_stack_flush): New function.
4649 (ppc_emit_swap): New function.
4650 (ppc_emit_stack_adjust): New function.
4651 (ppc_emit_call): New function.
4652 (ppc_emit_int_call_1): New function.
4653 (ppc_emit_void_call_2): New function.
4654 (ppc_emit_if_goto): New function.
4655 (ppc_emit_goto): New function.
4656 (ppc_emit_eq_goto): New function.
4657 (ppc_emit_ne_goto): New function.
4658 (ppc_emit_lt_goto): New function.
4659 (ppc_emit_le_goto): New function.
4660 (ppc_emit_gt_goto): New function.
4661 (ppc_emit_ge_goto): New function.
4662 (ppc_write_goto_address): New function.
4663 (ppc_emit_ops_impl): New static variable.
4664 (ppc64v1_emit_prologue): New function.
4665 (ppc64v2_emit_prologue): New function.
4666 (ppc64_emit_epilogue): New function.
4667 (ppc64_emit_add): New function.
4668 (ppc64_emit_sub): New function.
4669 (ppc64_emit_mul): New function.
4670 (ppc64_emit_lsh): New function.
4671 (ppc64_emit_rsh_signed): New function.
4672 (ppc64_emit_rsh_unsigned): New function.
4673 (ppc64_emit_ext): New function.
4674 (ppc64_emit_zero_ext): New function.
4675 (ppc64_emit_log_not): New function.
4676 (ppc64_emit_bit_and): New function.
4677 (ppc64_emit_bit_or): New function.
4678 (ppc64_emit_bit_xor): New function.
4679 (ppc64_emit_bit_not): New function.
4680 (ppc64_emit_equal): New function.
4681 (ppc64_emit_less_signed): New function.
4682 (ppc64_emit_less_unsigned): New function.
4683 (ppc64_emit_ref): New function.
4684 (ppc64_emit_const): New function.
4685 (ppc64v1_emit_reg): New function.
4686 (ppc64v2_emit_reg): New function.
4687 (ppc64_emit_pop): New function.
4688 (ppc64_emit_stack_flush): New function.
4689 (ppc64_emit_swap): New function.
4690 (ppc64v1_emit_call): New function.
4691 (ppc64v2_emit_call): New function.
4692 (ppc64v1_emit_int_call_1): New function.
4693 (ppc64v2_emit_int_call_1): New function.
4694 (ppc64v1_emit_void_call_2): New function.
4695 (ppc64v2_emit_void_call_2): New function.
4696 (ppc64_emit_if_goto): New function.
4697 (ppc64_emit_eq_goto): New function.
4698 (ppc64_emit_ne_goto): New function.
4699 (ppc64_emit_lt_goto): New function.
4700 (ppc64_emit_le_goto): New function.
4701 (ppc64_emit_gt_goto): New function.
4702 (ppc64_emit_ge_goto): New function.
4703 (ppc64v1_emit_ops_impl): New static variable.
4704 (ppc64v2_emit_ops_impl): New static variable.
4705 (ppc_emit_ops): New function.
4706 (linux_low_target): Wire in ppc_emit_ops.
4708 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4709 Marcin Kościelnicki <koriakin@0x04.net>
4712 * Makefile.in: Add powerpc-*-ipa.o
4713 * configure.srv: Add ipa_obj for powerpc*-linux.
4714 * linux-ppc-ipa.c: New file.
4715 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4717 (PPC_FIELD): New macro.
4718 (PPC_SEXT): New macro.
4719 (PPC_OP6): New macro.
4720 (PPC_BO): New macro.
4721 (PPC_LI): New macro.
4722 (PPC_BD): New macro.
4723 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4724 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4725 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4726 (ppc_get_thread_area): New function.
4727 (is_elfv2_inferior): New function.
4728 (gen_ds_form): New function.
4729 (GEN_STD): New macro.
4730 (GEN_STDU): New macro.
4731 (GEN_LD): New macro.
4732 (GEN_LDU): New macro.
4733 (gen_d_form): New function.
4734 (GEN_ADDI): New macro.
4735 (GEN_ADDIS): New macro.
4736 (GEN_LI): New macro.
4737 (GEN_LIS): New macro.
4738 (GEN_ORI): New macro.
4739 (GEN_ORIS): New macro.
4740 (GEN_LWZ): New macro.
4741 (GEN_STW): New macro.
4742 (GEN_STWU): New macro.
4743 (gen_xfx_form): New function.
4744 (GEN_MFSPR): New macro.
4745 (GEN_MTSPR): New macro.
4746 (GEN_MFCR): New macro.
4747 (GEN_MTCR): New macro.
4748 (GEN_SYNC): New macro.
4749 (GEN_LWSYNC): New macro.
4750 (gen_x_form): New function.
4751 (GEN_OR): New macro.
4752 (GEN_MR): New macro.
4753 (GEN_LWARX): New macro.
4754 (GEN_STWCX): New macro.
4755 (GEN_CMPW): New macro.
4756 (gen_md_form): New function.
4757 (GEN_RLDICL): New macro.
4758 (GEN_RLDICR): New macro.
4759 (gen_i_form): New function.
4761 (GEN_BL): New macro.
4762 (gen_b_form): New function.
4763 (GEN_BNE): New macro.
4764 (GEN_LOAD): New macro.
4765 (GEN_STORE): New macro.
4766 (gen_limm): New function.
4767 (gen_atomic_xchg): New function.
4768 (gen_call): New function.
4769 (ppc_relocate_instruction): New function.
4770 (ppc_install_fast_tracepoint_jump_pad): New function.
4771 (ppc_get_min_fast_tracepoint_insn_len): New function.
4772 (ppc_get_ipa_tdesc_idx): New function.
4773 (the_low_target): Wire in the new functions.
4774 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4776 * linux-ppc-tdesc.h: New file.
4778 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4780 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4781 (alloc_jump_pad_buffer): New function.
4782 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4783 (alloc_jump_pad_buffer): New function.
4784 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4785 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4786 (alloc_jump_pad_buffer): New function.
4787 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4788 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4789 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4790 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4792 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4794 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4795 * linux-amd64-ipa.c: Likewise.
4796 * linux-i386-ipa.c: Likewise.
4797 * linux-s390-ipa.c: Likewise.
4798 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4799 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4800 set_trace_state_variable_value_ptr.
4801 (struct ipa_sym_addresses): Likewise.
4802 (symbol_list): Likewise.
4803 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4804 accessing gdb_collect directly.
4805 (gdb_collect_ptr_type): New typedef.
4806 (get_raw_reg_ptr_type): New typedef.
4807 (get_trace_state_variable_value_ptr_type): New typedef.
4808 (set_trace_state_variable_value_ptr_type): New typedef.
4809 (gdb_collect_ptr): New global.
4810 (get_raw_reg_ptr): New global.
4811 (get_trace_state_variable_value_ptr): New global.
4812 (set_trace_state_variable_value_ptr): New global.
4813 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4814 accessing get_raw_reg directly.
4815 (get_get_tsv_func_addr): Likewise for
4816 get_trace_state_variable_value_ptr.
4817 (get_set_tsv_func_addr): Likewise for
4818 set_trace_state_variable_value_ptr.
4819 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4821 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4823 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4825 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4827 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4829 (relocate_instruction): Remove own_buf.
4830 * server.c (own_buf): Make global.
4831 (handle_v_requests): Make global.
4832 * server.h (own_buf): New declaration.
4833 (handle_v_requests): New prototype.
4835 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4838 * linux-s390-low.c (add_insns): New function.
4839 (s390_emit_prologue): New function.
4840 (s390_emit_epilogue): New function.
4841 (s390_emit_add): New function.
4842 (s390_emit_sub): New function.
4843 (s390_emit_mul): New function.
4844 (s390_emit_lsh): New function.
4845 (s390_emit_rsh_signed): New function.
4846 (s390_emit_rsh_unsigned): New function.
4847 (s390_emit_ext): New function.
4848 (s390_emit_log_not): New function.
4849 (s390_emit_bit_and): New function.
4850 (s390_emit_bit_or): New function.
4851 (s390_emit_bit_xor): New function.
4852 (s390_emit_bit_not): New function.
4853 (s390_emit_equal): New function.
4854 (s390_emit_less_signed): New function.
4855 (s390_emit_less_unsigned): New function.
4856 (s390_emit_ref): New function.
4857 (s390_emit_if_goto): New function.
4858 (s390_emit_goto): New function.
4859 (s390_write_goto_address): New function.
4860 (s390_emit_litpool): New function.
4861 (s390_emit_const): New function.
4862 (s390_emit_call): New function.
4863 (s390_emit_reg): New function.
4864 (s390_emit_pop): New function.
4865 (s390_emit_stack_flush): New function.
4866 (s390_emit_zero_ext): New function.
4867 (s390_emit_swap): New function.
4868 (s390_emit_stack_adjust): New function.
4869 (s390_emit_set_r2): New function.
4870 (s390_emit_int_call_1): New function.
4871 (s390_emit_void_call_2): New function.
4872 (s390_emit_eq_goto): New function.
4873 (s390_emit_ne_goto): New function.
4874 (s390_emit_lt_goto): New function.
4875 (s390_emit_le_goto): New function.
4876 (s390_emit_gt_goto): New function.
4877 (s390_emit_ge_goto): New function.
4878 (s390x_emit_prologue): New function.
4879 (s390x_emit_epilogue): New function.
4880 (s390x_emit_add): New function.
4881 (s390x_emit_sub): New function.
4882 (s390x_emit_mul): New function.
4883 (s390x_emit_lsh): New function.
4884 (s390x_emit_rsh_signed): New function.
4885 (s390x_emit_rsh_unsigned): New function.
4886 (s390x_emit_ext): New function.
4887 (s390x_emit_log_not): New function.
4888 (s390x_emit_bit_and): New function.
4889 (s390x_emit_bit_or): New function.
4890 (s390x_emit_bit_xor): New function.
4891 (s390x_emit_bit_not): New function.
4892 (s390x_emit_equal): New function.
4893 (s390x_emit_less_signed): New function.
4894 (s390x_emit_less_unsigned): New function.
4895 (s390x_emit_ref): New function.
4896 (s390x_emit_if_goto): New function.
4897 (s390x_emit_const): New function.
4898 (s390x_emit_call): New function.
4899 (s390x_emit_reg): New function.
4900 (s390x_emit_pop): New function.
4901 (s390x_emit_stack_flush): New function.
4902 (s390x_emit_zero_ext): New function.
4903 (s390x_emit_swap): New function.
4904 (s390x_emit_stack_adjust): New function.
4905 (s390x_emit_int_call_1): New function.
4906 (s390x_emit_void_call_2): New function.
4907 (s390x_emit_eq_goto): New function.
4908 (s390x_emit_ne_goto): New function.
4909 (s390x_emit_lt_goto): New function.
4910 (s390x_emit_le_goto): New function.
4911 (s390x_emit_gt_goto): New function.
4912 (s390x_emit_ge_goto): New function.
4913 (s390_emit_ops): New function.
4914 (struct linux_target_ops): Fill in emit_ops hook.
4916 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4919 * Makefile.in: Add s390 IPA files.
4920 * configure.srv: Build IPA for s390.
4921 * linux-s390-ipa.c: New file.
4922 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4923 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4924 (tdesc_s390_linux32): Likewise.
4925 (init_registers_s390_linux32v1): Likewise.
4926 (tdesc_s390_linux32v1): Likewise.
4927 (init_registers_s390_linux32v2): Likewise.
4928 (tdesc_s390_linux32v2): Likewise.
4929 (init_registers_s390_linux64): Likewise.
4930 (tdesc_s390_linux64): Likewise.
4931 (init_registers_s390_linux64v1): Likewise.
4932 (tdesc_s390_linux64v1): Likewise.
4933 (init_registers_s390_linux64v2): Likewise.
4934 (tdesc_s390_linux64v2): Likewise.
4935 (init_registers_s390_te_linux64): Likewise.
4936 (tdesc_s390_te_linux64): Likewise.
4937 (init_registers_s390_vx_linux64): Likewise.
4938 (tdesc_s390_vx_linux64): Likewise.
4939 (init_registers_s390_tevx_linux64): Likewise.
4940 (tdesc_s390_tevx_linux64): Likewise.
4941 (init_registers_s390x_linux64): Likewise.
4942 (tdesc_s390x_linux64): Likewise.
4943 (init_registers_s390x_linux64v1): Likewise.
4944 (tdesc_s390x_linux64v1): Likewise.
4945 (init_registers_s390x_linux64v2): Likewise.
4946 (tdesc_s390x_linux64v2): Likewise.
4947 (init_registers_s390x_te_linux64): Likewise.
4948 (tdesc_s390x_te_linux64): Likewise.
4949 (init_registers_s390x_vx_linux64): Likewise.
4950 (tdesc_s390x_vx_linux64): Likewise.
4951 (init_registers_s390x_tevx_linux64): Likewise.
4952 (tdesc_s390x_tevx_linux64): Likewise.
4953 (have_hwcap_s390_vx): New static variable.
4954 (s390_arch_setup): Fill have_hwcap_s390_vx.
4955 (s390_get_thread_area): New function.
4956 (s390_ft_entry_gpr_esa): New const.
4957 (s390_ft_entry_gpr_zarch): New const.
4958 (s390_ft_entry_misc): New const.
4959 (s390_ft_entry_fr): New const.
4960 (s390_ft_entry_vr): New const.
4961 (s390_ft_main_31): New const.
4962 (s390_ft_main_64): New const.
4963 (s390_ft_exit_fr): New const.
4964 (s390_ft_exit_vr): New const.
4965 (s390_ft_exit_misc): New const.
4966 (s390_ft_exit_gpr_esa): New const.
4967 (s390_ft_exit_gpr_zarch): New const.
4968 (append_insns): New function.
4969 (s390_relocate_instruction): New function.
4970 (s390_install_fast_tracepoint_jump_pad): New function.
4971 (s390_get_min_fast_tracepoint_insn_len): New function.
4972 (s390_get_ipa_tdesc_idx): New function.
4973 (struct linux_target_ops): Wire in the above functions.
4974 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4975 * linux-s390-tdesc.h: New file.
4977 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4979 * linux-s390-low.c (s390_supports_tracepoints): New function.
4980 (struct linux_target_ops): Fill supports_tracepoints hook.
4982 2016-03-18 Yao Qi <yao.qi@linaro.org>
4984 * linux-low.c (lwp_signal_can_be_delivered): New function.
4985 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4987 2016-03-18 Yao Qi <yao.qi@linaro.org>
4989 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4990 0 if signal is enqueued. Remove 'signal' from one debugging
4991 message. Move one debugging message to some lines below.
4992 Remove code setting 'signal' to 0.
4994 2016-03-18 Yao Qi <yao.qi@linaro.org>
4996 * linux-low.c (linux_low_filter_event): Remove redundant
4997 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4999 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5001 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5002 (struct linux_target_ops): Wire in the above.
5004 2016-03-03 Yao Qi <yao.qi@linaro.org>
5006 * linux-low.c: Update comments to start_step_over.
5008 2016-03-03 Yao Qi <yao.qi@linaro.org>
5011 * linux-low.c (handle_extended_wait): Set child suspended
5012 if event_lwp->bp_reinsert isn't zero.
5014 2016-03-02 Yao Qi <yao.qi@linaro.org>
5016 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5017 enqueue_pending_signal.
5019 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5021 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5024 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5026 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5027 (s390_regmap_3264) [!__s390x__]: New global.
5028 (s390_collect_ptrace_register): Skip map entries containing -1.
5029 (s390_supply_ptrace_register): Ditto.
5030 (s390_fill_gprs_high): New function.
5031 (s390_store_gprs_high): New function.
5032 (s390_regsets): Add NT_S390_HIGH_GPRS.
5033 (s390_get_hwcap): Enable on 31-bit.
5034 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5035 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5036 Detect NT_S390_HIGH_GPRS.
5037 (s390_usrregs_info_3264): Enable on 31-bit.
5038 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5039 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5041 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5044 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5045 * configure.srv: Ditto.
5046 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5047 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5048 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5049 (init_registers_amd64_linux): Remove prototype.
5050 (tdesc_amd64_linux): Remove declaration.
5051 (get_ipa_tdesc): New function.
5052 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5053 initialize remaining tdescs.
5054 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5055 (init_registers_i386_linux): Remove prototype.
5056 (tdesc_i386_linux): Remove declaration.
5057 (get_ipa_tdesc): New function.
5058 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5059 initialize remaining tdescs.
5060 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5061 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5062 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5063 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5064 (x86_get_ipa_tdesc_idx): New function.
5065 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5066 * linux-x86-tdesc.h: New file.
5067 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5068 (target_get_ipa_tdesc_idx): New macro.
5069 * tracepoint.c (ipa_tdesc_idx): New macro.
5070 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5071 (symbol_list): Add ipa_tdesc_idx.
5072 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5073 (ipa_tdesc): Remove.
5074 (ipa_tdesc_idx): New variable.
5075 (get_context_regcache): Use get_ipa_tdesc.
5076 (gdb_collect): Ditto.
5078 * tracepoint.h (get_ipa_tdesc): New prototype.
5079 (ipa_tdesc): Remove.
5081 2016-02-24 Pedro Alves <palves@redhat.com>
5083 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5084 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5085 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5086 Factor out common code between the USE_SIGTRAP_SIGINFO and
5087 !USE_SIGTRAP_SIGINFO blocks.
5088 (linux_low_filter_event): Call save_stop_reason instead of
5089 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5091 (linux_wait_1): Update comments.
5093 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5095 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5096 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5097 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5098 ppc_insert_point, ppc_remove_point.
5100 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5102 * linux-s390-low.c (s390_supports_z_point_type): New function.
5103 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5105 2016-02-16 Yao Qi <yao.qi@linaro.org>
5107 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5108 PC. Get pc from regcache_read_pc.
5110 2016-02-12 Yao Qi <yao.qi@linaro.org>
5112 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5113 or linux_get_pc_32bit.
5114 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5116 2016-02-12 Yao Qi <yao.qi@linaro.org>
5118 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5119 arm_linux_get_next_pcs_fixup.
5121 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5123 * tracepoint.c (x_tracepoint_action_download): Change
5124 write_inferior_data_ptr to write_inferior_data_pointer.
5125 (cmd_qtstart): Likewise.
5126 (write_inferior_data_ptr): Remove.
5127 (download_agent_expr): Change write_inferior_data_ptr to
5128 write_inferior_data_pointer.
5129 (download_tracepoint_1): Likewise.
5130 (download_tracepoint): Likewise.
5131 (download_trace_state_variables): Likewise.
5133 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5134 Marcin Kościelnicki <koriakin@0x04.net>
5136 * tracepoint.c (struct tracepoint_action_ops): Remove.
5137 (struct tracepoint_action): Remove ops.
5138 (m_tracepoint_action_download, r_tracepoint_action_download)
5139 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5140 size and offset accordingly.
5141 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5142 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5143 (tracepoint_action_send, tracepoint_action_download): New functions.
5144 Helpers for trace action handlers.
5145 (add_tracepoint_action): Remove setup actions ops.
5146 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5148 2016-02-10 Yao Qi <yao.qi@linaro.org>
5150 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5152 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5154 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5156 * configure: Regenerate.
5158 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5160 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5161 void * to gdb_byte *.
5162 * linux-low.c (siginfo_fixup): Likewise.
5163 (linux_xfer_siginfo): Likewise.
5164 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5166 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5168 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5170 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5172 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5174 * linux-x86-low.c [__x86_64__]: Include
5175 "nat/amd64-linux-siginfo.h".
5176 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5177 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5178 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5179 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5180 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5181 (cpt_si_fd, si_timerid, si_overrun): Move from
5182 nat/amd64-linux-siginfo.c.
5183 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5185 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5187 * server.c (skip_to_semicolon): Remove.
5188 (process_point_options): Use strchrnul instead of
5191 2016-01-26 Yao Qi <yao.qi@linaro.org>
5193 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5194 * linux-low.c (install_software_single_step_breakpoints): Don't
5195 call regcache_read_pc.
5196 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5199 2016-01-26 Yao Qi <yao.qi@linaro.org>
5201 * linux-low.c (install_software_single_step_breakpoints): Call
5202 regcache_read_pc instead of get_pc.
5204 2016-01-26 Yao Qi <yao.qi@linaro.org>
5206 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5207 (unblock_async_io): Rename to ...
5208 (block_unblock_async_io): ... it. New function.
5209 (enable_async_io): Don't install SIGIO handler. Unblock it
5211 (disable_async_io): Don't ignore SIGIO. Block it instead.
5212 (initialize_async_io): Install SIGIO handler. Don't call
5215 2016-01-26 Yao Qi <yao.qi@linaro.org>
5217 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5218 first character is '\003', call *the_target->request_interrupt.
5220 2016-01-25 Yao Qi <yao.qi@linaro.org>
5222 * remote-utils.c (new_thread_notify): Remove.
5223 (dead_thread_notify): Likewise.
5224 * remote-utils.h (new_thread_notify): Remove declaration.
5225 (dead_thread_notify): Likewise.
5227 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5229 * gdb.trace/pending.exp: Fix expected message on continue.
5231 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5233 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5234 it works properly on big-endian machines where sizeof (CORE_ADDR)
5237 2016-01-21 Pedro Alves <palves@redhat.com>
5239 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5240 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5241 * configure: Regenerate.
5243 2016-01-21 Yao Qi <yao.qi@linaro.org>
5245 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5246 is_thumb and set it according to CPSR saved on the stack.
5247 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5248 arm_sigreturn_next_pc.
5250 2016-01-18 Yao Qi <yao.qi@linaro.org>
5252 * linux-low.c (linux_set_pc_64bit): New function.
5253 (linux_get_pc_64bit): New function.
5254 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5256 * linux-sparc-low.c (debug_threads): Remove declaration.
5257 (sparc_get_pc): Remove.
5258 (the_low_target): Use linux_get_pc_64bit instead of
5260 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5261 (the_low_target): Use linux_get_pc_64bit and
5264 2016-01-18 Yao Qi <yao.qi@linaro.org>
5266 * linux-arm-low.c (debug_threads): Remove declaration.
5267 (arm_get_pc, arm_set_pc): Remove.
5268 (the_low_target): Use linux_get_pc_32bit and
5270 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5271 (the_low_target): Use linux_get_pc_32bit and
5273 * linux-cris-low.c (debug_threads): Remove declaration.
5274 (cris_get_pc, cris_set_pc,): Remove.
5275 (the_low_target): Use linux_get_pc_32bit and
5277 * linux-crisv32-low.c (debug_threads): Remove declaration.
5278 (cris_get_pc, cris_set_pc): Remove.
5279 (the_low_target): Use linux_get_pc_32bit and
5281 * linux-low.c: Include inttypes.h.
5282 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5283 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5284 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5285 (the_low_target): Use linux_get_pc_32bit and
5287 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5288 (the_low_target): Use linux_get_pc_32bit and
5290 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5291 (the_low_target): Use linux_get_pc_32bit and
5293 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5294 (the_low_target): Use linux_get_pc_32bit and
5296 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5297 (the_low_target): Use linux_get_pc_32bit and
5300 2016-01-18 Gary Benson <gbenson@redhat.com>
5302 * configure.ac (AC_FUNC_FORK): New check.
5303 * config.in: Regenerate.
5304 * configure: Likewise.
5306 2016-01-14 Yao Qi <yao.qi@linaro.org>
5308 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5309 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5310 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5311 arm_get_next_pcs_ctor.
5313 2016-01-12 Josh Stone <jistone@redhat.com>
5314 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5316 * inferiors.h: Include "gdb_vecs.h".
5317 (struct process_info): Add syscalls_to_catch.
5318 * inferiors.c (remove_process): Free syscalls_to_catch.
5319 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5320 syscall_return stops.
5321 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5322 * server.c (handle_general_set): Handle QCatchSyscalls.
5323 (handle_query): Report support for QCatchSyscalls.
5324 * target.h (struct target_ops): Add supports_catch_syscall.
5325 (target_supports_catch_syscall): New macro.
5326 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5327 (struct lwp_info): Add syscall_state.
5328 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5329 Maintain syscall_state and syscalls_to_catch across exec.
5330 (get_syscall_trapinfo): New function, proxy to the_low_target.
5331 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5332 (linux_low_filter_event): Toggle syscall_state entry/return for
5333 syscall traps, and set it ignored for all others.
5334 (gdb_catching_syscalls_p): New function.
5335 (gdb_catch_this_syscall_p): New function.
5336 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5337 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5338 (linux_supports_catch_syscall): New function.
5339 (linux_target_ops): Install it.
5340 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5341 (the_low_target): Install it.
5343 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5345 * acinclude.m4: Include new ../warning.m4 file.
5346 * configure: Regenerated.
5347 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5349 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5351 * ax.c (is_goto_target): Mark static.
5352 * linux-low.c (register_addr): Likewise.
5353 (linux_fetch_registers, linux_store_registers): Likewise.
5354 * mem-break.c (any_persistent_commands): Fix old prototype.
5355 (add_commands_to_breakpoint): Mark static.
5356 * regcache.c (find_register_by_name): Delete unused func.
5357 * remote-utils.c (hex_or_minus_one): Mark static.
5358 * server.c (monitor_show_help): Mark static.
5359 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5360 handle_v_requests): Likewise.
5362 2016-01-12 Pedro Alves <palves@redhat.com>
5364 Remove use of the registered trademark symbol throughout.
5366 2016-01-08 Yao Qi <yao.qi@linaro.org>
5368 * remote-utils.c (getpkt): If c is '\003', call target hook
5371 2016-01-06 Yao Qi <yao.qi@linaro.org>
5373 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5374 linux-aarch32-low.c.
5375 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5376 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5377 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5378 (thumb2_breakpoint): Declare.
5379 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5380 linux-aarch32-low.h.
5381 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5382 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5383 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5385 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5387 * gdbreplay.c (gdbreplay_version): Change copyright year in
5389 * server.c (gdbserver_version): Likewise.
5391 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5393 * server.c (crc32_table): Delete.
5394 (crc32): Use libiberty's xcrc32 function.
5396 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5398 * lynx-low.c (lynx_delete_thread_callback): New function.
5399 (lynx_mourn): Properly delete our process and all of its
5400 threads. Remove call to clear_inferiors.
5402 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5404 * target.c (thread_search_callback): Add check that
5405 the thread_stopped target callback is not NULL before
5408 2015-12-21 Yao Qi <yao.qi@linaro.org>
5410 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5413 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5415 * server.c (handle_query): Call target_supports_software_single_step.
5417 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5419 * linux-low.c (single_step): New function.
5420 (linux_resume_one_lwp_throw): Call single_step.
5421 (start_step_over): Likewise.
5423 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5425 * Makefile.in (SFILES): Append arch/arm-linux.c,
5426 arch/arm-get-next-pcs.c.
5427 (arm-linux.o): New rule.
5428 (arm-get-next-pcs.o): New rule.
5429 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5431 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5432 to linux-aarch32-low.c.
5433 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5434 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5435 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5436 (thumb2_breakpoint_len): Likewise.
5437 (arm_is_thumb_mode): Make non-static.
5438 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5439 from linux-aarch32-low.c.
5440 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5441 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5442 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5443 (thumb2_breakpoint_len): Likewise.
5444 (arm_is_thumb_mode): New declaration.
5445 * linux-arm-low.c: Include arch/arm-linux.h
5446 aarch/arm-get-next-pcs.h, sys/syscall.h.
5447 (get_next_pcs_ops): New struct.
5448 (get_next_pcs_addr_bits_remove): New function.
5449 (get_next_pcs_is_thumb): New function.
5450 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5451 (arm_sigreturn_next_pc): Likewise.
5452 (get_next_pcs_syscall_next_pc): Likewise.
5453 (arm_gdbserver_get_next_pcs): Likewise.
5454 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5456 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5457 * server.h: Include gdb_vecs.h.
5459 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5461 * Makefile.in (SFILES): Append common/common-regcache.c.
5462 (OBS): Append common-regcache.o.
5463 (common-regcache.o): New rule.
5464 * regcache.c (init_register_cache): Initialize cache to
5466 (regcache_raw_read_unsigned): New function.
5467 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5468 register_status enum.
5470 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5472 * linux-aarch64-low.c (the_low_targets): Rename
5473 breakpoint_reinsert_addr to get_next_pcs.
5474 * linux-arm-low.c (the_low_targets): Likewise.
5475 * linux-bfin-low.c (the_low_targets): Likewise.
5476 * linux-cris-low.c (the_low_targets): Likewise.
5477 * linux-crisv32-low.c (the_low_targets): Likewise.
5478 * linux-low.c (can_software_single_step): Likewise.
5479 (install_software_single_step_breakpoints): New function.
5480 (start_step_over): Use install_software_single_step_breakpoints.
5481 * linux-low.h: New CORE_ADDR vector.
5482 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5484 * linux-mips-low.c (the_low_targets): Likewise.
5485 * linux-nios2-low.c (the_low_targets): Likewise.
5486 * linux-sparc-low.c (the_low_targets): Likewise.
5488 2015-12-17 Pedro Alves <palves@redhat.com>
5490 * linux-low.c (linux_kill_one_lwp): Remove references to
5492 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5494 (linux_init_signals): Delete.
5495 (initialize_low): Adjust.
5496 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5498 2015-12-16 Pedro Alves <palves@redhat.com>
5500 * configure.ac (compiler warning flags): When testing a
5501 -Wno-foo option, check whether -Wfoo works instead.
5502 * configure: Regenerate.
5504 2015-12-11 Don Breazeal <donb@codesourcery.com>
5506 * server.c (process_serial_event): Don't exit from gdbserver
5507 in remote mode if there are still active inferiors.
5509 2015-12-11 Yao Qi <yao.qi@linaro.org>
5511 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5512 arm_breakpoint_at if the process is 32-bit.
5514 2015-12-11 Yao Qi <yao.qi@linaro.org>
5516 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5519 2015-12-07 Yao Qi <yao.qi@linaro.org>
5521 * configure.srv: Append arm.o to srv_tgtobj for
5522 aarch64*-*-linux* target.
5523 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5524 from linux-arm-low.c.
5525 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5526 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5527 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5528 (thumb2_breakpoint_len): Likewise.
5529 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5530 (arm_breakpoint_kinds): Likewise.
5531 (arm_breakpoint_kind_from_pc): Likewise.
5532 (arm_sw_breakpoint_from_kind): Likewise.
5533 (arm_breakpoint_kind_from_current_state): Likewise.
5534 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5535 (arm_sw_breakpoint_from_kind): Declare.
5536 (arm_breakpoint_kind_from_current_state): Declare.
5537 (arm_breakpoint_at): Declare.
5538 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5539 arm_sw_breakpoint_from_kind if process is 32-bit.
5540 (aarch64_breakpoint_kind_from_pc): New function.
5541 (aarch64_breakpoint_kind_from_current_state): New function.
5542 (the_low_target): Initialize fields breakpoint_kind_from_pc
5543 and breakpoint_kind_from_current_state.
5544 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5545 linux-aarch32-low.c.
5546 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5547 (arm_breakpoint, arm_breakpoint_len): Likewise.
5548 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5549 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5550 (arm_is_thumb_mode): Likewise.
5551 (arm_breakpoint_at): Likewise.
5552 (arm_breakpoint_kind_from_pc): Likewise.
5553 (arm_sw_breakpoint_from_kind): Likewise.
5554 (arm_breakpoint_kind_from_current_state): Likewise.
5557 2015-08-04 Yao Qi <yao.qi@linaro.org>
5559 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5560 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5561 * server.c (extended_protocol): Remove "static".
5562 * server.h (extended_protocol): Declare it.
5564 2015-12-04 Josh Stone <jistone@redhat.com>
5566 * target.h (struct target_ops) <arch_setup>: Rename to ...
5567 (struct target_ops) <post_create_inferior>: ... this.
5568 (target_arch_setup): Rename to ...
5569 (target_post_create_inferior): ... this, calling post_create_inferior.
5570 * server.c (start_inferior): Update target_arch_setup calls to
5571 target_post_create_inferior.
5572 * linux-low.c (linux_low_ptrace_options): Forward declare.
5573 (linux_arch_setup): Update its comment for general use.
5574 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5575 (struct linux_target_ops): Use linux_post_create_inferior.
5576 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5577 to post_create_inferior.
5578 * nto-low.c (struct nto_target_ops): Likewise.
5579 * spu-low.c (struct spu_target_ops): Likewise.
5580 * win32-low.c (struct win32_target_ops): Likewise.
5582 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5584 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5586 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5588 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5589 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5590 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5591 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5592 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5593 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5594 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5595 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5596 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5597 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5598 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5599 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5601 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5603 * linux-low.c (linux_look_up_symbols): Don't call
5604 linux_supports_traceclone.
5605 * linux-low.h (thread_db_init): Remove use_events argument.
5606 * thread-db.c (thread_db_use_event): Remove global variable.
5607 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5608 (struct thread_db) <td_create_bp>: Remove field.
5609 (thread_db_create_event): Remove function.
5610 (thread_db_enable_reporting): Likewise.
5611 (find_one_thread): Don't check for thread_db_use_events.
5612 (attach_thread): Likewise.
5613 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5614 (try_thread_db_load_1): Don't check for thread_db_use_events.
5615 (thread_db_init): Remove use_events argument and thread events
5617 (remove_thread_event_breakpoints): Remove function.
5618 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5620 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5622 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5624 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5625 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5626 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5627 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5628 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5630 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5632 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5633 * linux-low.c (can_hardware_single_step): Use
5634 supports_hardware_single_step.
5635 (can_software_single_step): New function.
5636 (start_step_over): Call can_software_single_step.
5637 (linux_supports_hardware_single_step): New function.
5638 (struct target_ops) <supports_software_single_step>: Initialize.
5639 * linux-low.h (struct linux_target_ops)
5640 <supports_hardware_single_step>: Initialize.
5641 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5643 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5644 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5645 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5646 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5647 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5648 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5649 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5650 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5652 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5653 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5655 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5656 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5657 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5660 * target.h (struct target_ops): <supports_software_single_step>:
5662 (target_supports_software_single_step): New macro.
5664 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5666 * linux-low.c (linux_wait_1): Fix pc advance condition.
5667 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5668 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5670 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5672 * linux-arm-low.c (arm_is_thumb_mode): New function.
5673 (arm_breakpoint_at): Use arm_is_thumb_mode.
5674 (arm_breakpoint_kind_from_current_state): New function.
5675 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5677 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5678 (linux_breakpoint_kind_from_current_state): New function.
5679 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5680 * linux-low.h (struct linux_target_ops)
5681 <breakpoint_kind_from_current_state>: New field.
5682 * target.h (struct target_ops): Likewise.
5683 (target_breakpoint_kind_from_current_state): New macro.
5685 2015-11-30 Pedro Alves <palves@redhat.com>
5687 * linux-low.c (linux_resume): Wake up the event loop before
5690 2015-11-30 Pedro Alves <palves@redhat.com>
5692 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5694 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5696 * target.c (struct thread_search): New structure.
5697 (thread_search_callback): New function.
5698 (prev_general_thread): New global.
5699 (prepare_to_access_memory, done_accessing_memory): New functions.
5700 * target.h (prepare_to_access_memory, done_accessing_memory):
5701 Replace macros with function declarations.
5703 2015-11-30 Pedro Alves <palves@redhat.com>
5706 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5707 report TARGET_WAITKIND_NO_RESUMED.
5708 * remote-utils.c (prepare_resume_reply): Handle
5709 TARGET_WAITKIND_NO_RESUMED.
5710 * server.c (report_no_resumed): New global.
5711 (handle_query) <qSupported>: Handle "no-resumed+". Report
5712 "no-resumed+" support.
5713 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5714 return error if the client doesn't support no-resumed events.
5715 (push_stop_notification): New function.
5716 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5717 events if the client supports them.
5719 2015-11-30 Pedro Alves <palves@redhat.com>
5721 * linux-low.c (thread_still_has_status_pending_p): Don't check
5723 (lwp_resumed): New function.
5724 (status_pending_p_callback): Return early if the LWP is not
5725 supposed to be resumed.
5727 2015-11-30 Pedro Alves <palves@redhat.com>
5729 * linux-low.c (handle_extended_wait): Assert that the LWP's
5730 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5731 thread create events, leave the new child's status pending.
5732 (linux_low_filter_event): If GDB wants to hear about thread exit
5733 events, leave the LWP marked dead and don't delete it.
5734 (linux_wait_for_event_filtered): Don't check for thread exit.
5735 (filter_exit_event): New function.
5736 (linux_wait_1): Use it, when returning an exit event.
5737 (linux_resume_one_lwp_throw): Assert that the LWP's
5738 waitstatus is TARGET_WAITKIND_IGNORE.
5739 * remote-utils.c (prepare_resume_reply): Handle
5740 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5741 * server.c (report_thread_events): New global.
5742 (handle_general_set): Handle QThreadEvents.
5743 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5744 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5745 TARGET_WAITKIND_THREAD_EXITED.
5746 * server.h (report_thread_events): Declare.
5748 2015-11-30 Pedro Alves <palves@redhat.com>
5750 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5751 the thread's last_resume_kind was resume_stop.
5753 2015-11-30 Pedro Alves <palves@redhat.com>
5755 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5758 2015-11-30 Pedro Alves <palves@redhat.com>
5760 * server.c (handle_v_requests): Handle vCtrlC.
5762 2015-11-30 Pedro Alves <palves@redhat.com>
5764 * gdbthread.h (find_any_thread_of_pid): Declare.
5765 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5767 * server.c (handle_query): If current_thread is NULL, look for
5768 another thread of the selected process.
5770 2015-11-26 Daniel Colascione <dancol@dancol.org>
5771 Simon Marchi <simon.marchi@ericsson.com>
5773 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5774 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5776 * target.h (struct target_ops) <thread_name>: New field.
5777 (target_thread_name): New macro.
5779 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5781 * regcache.h (regcache_invalidate_pid): Add declaration.
5782 * regcache.c (regcache_invalidate_pid): New function, extracted
5783 from regcache_invalidate.
5784 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5785 Add trivial documentation comment.
5786 * lynx-low.c: Use regcache_invalidate_pid instead of
5787 regcache_invalidate.
5789 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5791 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5792 and Elf64_auxv_t if the target is Android.
5794 2015-11-22 Doug Evans <xdje42@gmail.com>
5796 * target.h: #include <sys/types.h>.
5798 2015-11-19 Pedro Alves <palves@redhat.com>
5800 * linux-low.c (linux_process_qsupported): Change prototype.
5802 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5804 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5805 and adjust to loop over all features.
5806 * server.c (handle_query) <qSupported>: Adjust to call
5807 target_process_qsupported once, passing it a vector of unprocessed
5809 * target.h (struct target_ops) <process_qsupported>: Change
5811 (target_process_qsupported): Adjust.
5813 2015-11-19 Pedro Alves <palves@redhat.com>
5815 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5817 * configure: Regenerate.
5819 2015-11-19 Pedro Alves <palves@redhat.com>
5821 * configure: Regenerate.
5823 2015-11-19 Yao Qi <yao.qi@linaro.org>
5825 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5828 2015-11-19 Yao Qi <yao.qi@linaro.org>
5830 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5831 (struct aarch64_operand): Move enum out.
5833 2015-11-19 Yao Qi <yao.qi@linaro.org>
5835 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5836 struct user_fpsimd_state *.
5837 (aarch64_store_fpregset): Likewise.
5839 2015-11-19 Yao Qi <yao.qi@linaro.org>
5841 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5842 struct user_pt_regs *.
5843 (aarch64_store_gregset): Likewise.
5845 2015-11-18 Pedro Alves <palves@redhat.com>
5847 * Makefile.in (all_object_files): Add $IPA_OBJS.
5849 2015-11-17 Pedro Alves <palves@redhat.com>
5851 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5852 GDB_SIGNAL_0 and gdb_signal_to_string.
5854 2015-11-17 Pedro Alves <palves@redhat.com>
5856 * win32-low.c (handle_output_debug_string): Remove parameter.
5857 (win32_kill): Remove our_status local and adjust call to
5858 handle_output_debug_string.
5859 (get_child_debug_event): Adjust call to
5860 handle_output_debug_string.
5862 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5864 * linux-mips-low.c (mips_fill_gregset): Add cast.
5865 (mips_store_gregset): Likewise.
5866 (mips_fill_fpregset): Likewise.
5867 (mips_store_fpregset): Likewise.
5869 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5871 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5874 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5876 * linux-mips-low.c (mips_linux_new_thread): Change type of
5877 watch_type to enum target_hw_bp_type.
5879 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5881 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5882 Change return type to arm_hwbp_type.
5884 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5886 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5887 (arm_store_gregset): Likewise.
5888 * linux-arm-low.c (arm_get_hwcap): Likewise.
5889 (arm_read_description): Likewise.
5891 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5893 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5895 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5897 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5898 (ppc_fill_vsxregset): Likewise.
5899 (ppc_store_vsxregset): Likewise.
5900 (ppc_fill_vrregset): Likewise.
5901 (ppc_store_vrregset): Likewise.
5902 (ppc_fill_evrregset): Likewise.
5903 (ppc_store_evrregset): Likewise.
5905 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5907 * linux-ppc-low.c (ppc_usrregs_info): Remove
5908 forward-declaration.
5909 (ppc_arch_setup): Move lower in file.
5911 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5913 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5914 (ps_pdwrite): Likewise.
5916 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5918 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5919 to after assert checks.
5921 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5923 * proc-service.c (ps_pdread): Add/adjust casts.
5924 (ps_pdwrite): Add/adjust casts.
5926 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5928 * server.c (handle_search_memory_1): Cast return value of
5931 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5933 * server.c (write_qxfer_response): Change type of data to
5936 2015-10-29 Pedro Alves <palves@redhat.com>
5938 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5940 2015-10-29 Pedro Alves <palves@redhat.com>
5942 * tracepoint.c (clear_installed_tracepoints): Add casts.
5944 2015-10-29 Pedro Alves <palves@redhat.com>
5946 * server.c (handle_v_cont, process_serial_event): Add enum
5947 gdb_signal casts to signal parsing code.
5949 2015-10-29 Pedro Alves <palves@redhat.com>
5951 * linux-low.h (NULL_REGSET): Define.
5952 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5953 * linux-arm-low.c (arm_regsets): Likewise.
5954 * linux-crisv32-low.c (cris_regsets): Likewise.
5955 * linux-m68k-low.c (m68k_regsets): Likewise.
5956 * linux-mips-low.c (mips_regsets): Likewise.
5957 * linux-nios2-low.c (nios2_regsets): Likewise.
5958 * linux-ppc-low.c (ppc_regsets): Likewise.
5959 * linux-s390-low.c (s390_regsets): Likewise.
5960 * linux-sh-low.c (sh_regsets): Likewise.
5961 * linux-sparc-low.c (sparc_regsets): Likewise.
5962 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5963 * linux-tile-low.c (tile_regsets): Likewise.
5964 * linux-x86-low.c (x86_regsets): Likewise.
5965 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5967 2015-10-29 Pedro Alves <palves@redhat.com>
5969 * linux-low.h (NULL_REGSET): Define.
5970 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5971 * linux-arm-low.c (arm_regsets): Likewise.
5972 * linux-crisv32-low.c (cris_regsets): Likewise.
5973 * linux-m68k-low.c (m68k_regsets): Likewise.
5974 * linux-mips-low.c (mips_regsets): Likewise.
5975 * linux-nios2-low.c (nios2_regsets): Likewise.
5976 * linux-ppc-low.c (ppc_regsets): Likewise.
5977 * linux-s390-low.c (s390_regsets): Likewise.
5978 * linux-sh-low.c (sh_regsets): Likewise.
5979 * linux-sparc-low.c (sparc_regsets): Likewise.
5980 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5981 * linux-tile-low.c (tile_regsets): Likewise.
5982 * linux-x86-low.c (x86_regsets): Likewise.
5983 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5985 2015-10-26 Doug Evans <dje@google.com>
5987 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5989 2015-10-26 Doug Evans <dje@google.com>
5991 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5993 2015-10-26 Doug Evans <dje@google.com>
5995 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5997 (attach_thread, find_new_threads_callback): Ditto.
5999 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6001 * mem-break.h (set_breakpoint_data): Remove.
6003 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6005 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6006 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6007 (initialize_low): Remove set_breakpoint_data call.
6008 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6009 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6010 (initialize_low): Remove set_breakpoint_data call.
6011 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6012 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6013 (initialize_low): Remove set_breakpoint_data call.
6015 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6017 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6018 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6019 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6020 * target.h (target_breakpoint_kind_from_pc): New macro.
6022 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6024 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6025 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6026 the default breakpoint kind.
6028 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6030 * linux-arm-low.c (arm_supports_z_point_type): Add software
6033 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6035 * linux-arm-low.c: Refactor breakpoint definitions.
6036 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6037 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6039 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6041 * Makefile.in: Add arm.c/o.
6042 * configure.srv: Likewise.
6043 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6044 (arm_breakpoint_kind_from_pc): New function.
6045 (arm_sw_breakpoint_from_kind): Return proper kind.
6046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6048 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6050 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6052 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6053 (struct raw_breakpoint) <size>: Remove.
6054 (struct raw_breakpoint) <kind>: Add.
6055 (bp_size): New function.
6056 (bp_opcode): Likewise.
6057 (find_raw_breakpoint_at): Adjust for kind.
6058 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6059 (remove_memory_breakpoint): Adjust for kind call bp_size.
6060 (set_raw_breakpoint_at): Adjust for kind.
6061 (set_breakpoint): Likewise.
6062 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6063 (delete_raw_breakpoint): Adjust for kind.
6064 (delete_breakpoint): Likewise.
6065 (find_gdb_breakpoint): Likewise.
6066 (set_gdb_breakpoint_1): Likewise.
6067 (set_gdb_breakpoint): Likewise.
6068 (delete_gdb_breakpoint_1): Likewise.
6069 (delete_gdb_breakpoint): Likewise.
6070 (uninsert_raw_breakpoint): Likewise.
6071 (reinsert_raw_breakpoint): Likewise.
6072 (set_breakpoint_data): Remove.
6073 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6074 (check_mem_read): Adjust for kind call bp_size.
6075 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6076 (clone_one_breakpoint): Adjust for kind.
6077 * mem-break.h (set_gdb_breakpoint): Likewise.
6078 (delete_gdb_breakpoint): Likewise.
6079 * server.c (process_serial_event): Likewise.
6081 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6083 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6084 (struct linux_target_ops) <breakpoint>: Remove.
6085 (struct linux_target_ops) <breakpoint_len>: Remove.
6086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6088 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6089 (arm_sw_breakpoint_from_kind): New function.
6090 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6091 (struct linux_target_ops) <breakpoint>: Remove.
6092 (struct linux_target_ops) <breakpoint_len>: Remove.
6093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6095 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6096 (struct linux_target_ops) <breakpoint>: Remove.
6097 (struct linux_target_ops) <breakpoint_len>: Remove.
6098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6100 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6101 (struct linux_target_ops) <breakpoint>: Remove.
6102 (struct linux_target_ops) <breakpoint_len>: Remove.
6103 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6104 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6105 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6106 and sw_breakpoint_from_kind to increment the pc.
6107 (linux_breakpoint_kind_from_pc): New function.
6108 (linux_sw_breakpoint_from_kind): New function.
6109 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6110 (initialize_low): Call breakpoint_kind_from_pc and
6111 sw_breakpoint_from_kind to replace breakpoint_data/len.
6112 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6115 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6116 (struct linux_target_ops) <breakpoint>: Remove.
6117 (struct linux_target_ops) <breakpoint_len>: Remove.
6118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6120 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6121 (struct linux_target_ops) <breakpoint>: Remove.
6122 (struct linux_target_ops) <breakpoint_len>: Remove.
6123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6125 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6126 (struct linux_target_ops) <breakpoint>: Remove.
6127 (struct linux_target_ops) <breakpoint_len>: Remove.
6128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6130 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6131 (struct linux_target_ops) <breakpoint>: Remove.
6132 (struct linux_target_ops) <breakpoint_len>: Remove.
6133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6135 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6136 (struct linux_target_ops) <breakpoint>: Remove.
6137 (struct linux_target_ops) <breakpoint_len>: Remove.
6138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6140 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6141 (struct linux_target_ops) <breakpoint>: Remove.
6142 (struct linux_target_ops) <breakpoint_len>: Remove.
6143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6145 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6146 (struct linux_target_ops) <breakpoint>: Remove.
6147 (struct linux_target_ops) <breakpoint_len>: Remove.
6148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6150 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6151 (struct linux_target_ops) <breakpoint>: Remove.
6152 (struct linux_target_ops) <breakpoint_len>: Remove.
6153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6155 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6156 (struct linux_target_ops) <breakpoint>: Remove.
6157 (struct linux_target_ops) <breakpoint_len>: Remove.
6158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6160 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6161 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6162 (struct linux_target_ops) <breakpoint>: Remove.
6163 (struct linux_target_ops) <breakpoint_len>: Remove.
6164 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6166 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6167 (struct linux_target_ops) <breakpoint>: Remove.
6168 (struct linux_target_ops) <breakpoint_len>: Remove.
6169 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6172 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6174 * linux-cris-low.c (cris_get_pc): Remove void arg.
6176 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6178 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6181 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6183 * inferiors.c (thread_pid_matches_callback): New function.
6184 (find_thread_process): New function.
6185 (remove_thread): Reset current_thread.
6186 (remove_process): Assert threads have been removed first.
6188 2015-10-15 Yao Qi <yao.qi@linaro.org>
6190 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6192 (aarch64_remove_point): Likewise.
6193 * regcache.c (regcache_register_size): New function.
6195 2015-10-12 Yao Qi <yao.qi@linaro.org>
6197 * linux-aarch64-low.c: Update all callers as emit_load_store
6198 is renamed to aarch64_emit_load_store.
6200 2015-10-12 Yao Qi <yao.qi@linaro.org>
6202 * linux-aarch64-low.c: Update all callers of function renaming
6203 from emit_insn to aarch64_emit_insn.
6205 2015-10-12 Yao Qi <yao.qi@linaro.org>
6207 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6208 arch/aarch64-insn.h.
6209 (struct aarch64_memory_operand): Likewise.
6211 (emit_insn): Move to arch/aarch64-insn.c.
6212 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6213 (emit_load_store): Move to arch/aarch64-insn.c.
6214 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6215 (can_encode_int32): Remove.
6217 2015-10-12 Yao Qi <yao.qi@linaro.org>
6219 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6220 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6221 (aarch64_relocate_instruction): Likewise.
6222 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6223 (struct aarch64_insn_visitor): Likewise.
6225 2015-10-12 Yao Qi <yao.qi@linaro.org>
6227 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6228 (struct aarch64_insn_visitor): New.
6229 (struct aarch64_insn_relocation_data): New.
6230 (aarch64_ftrace_insn_reloc_b): New function.
6231 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6232 (aarch64_ftrace_insn_reloc_cb): Likewise.
6233 (aarch64_ftrace_insn_reloc_tb): Likewise.
6234 (aarch64_ftrace_insn_reloc_adr): Likewise.
6235 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6236 (aarch64_ftrace_insn_reloc_others): Likewise.
6238 (aarch64_relocate_instruction): Use visitor.
6240 2015-10-12 Yao Qi <yao.qi@linaro.org>
6242 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6243 int. Add argument buf.
6244 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6245 aarch64_relocate_instruction.
6247 2015-10-12 Yao Qi <yao.qi@linaro.org>
6249 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6250 argument insn. Remove local variable insn. Don't call
6252 (aarch64_install_fast_tracepoint_jump_pad): Call
6255 2015-09-30 Yao Qi <yao.qi@linaro.org>
6257 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6258 (emit_load_store_pair): Likewise.
6260 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6262 * dll.c (match_dll): Add cast(s).
6263 (unloaded_dll): Likewise.
6264 * linux-low.c (second_thread_of_pid_p): Likewise.
6265 (delete_lwp_callback): Likewise.
6266 (count_events_callback): Likewise.
6267 (select_event_lwp_callback): Likewise.
6268 (linux_set_resume_request): Likewise.
6269 * server.c (accumulate_file_name_length): Likewise.
6270 (emit_dll_description): Likewise.
6271 (handle_qxfer_threads_worker): Likewise.
6272 (visit_actioned_threads): Likewise.
6273 * thread-db.c (any_thread_of): Likewise.
6274 * tracepoint.c (same_process_p): Likewise.
6275 (match_blocktype): Likewise.
6276 (build_traceframe_info_xml): Likewise.
6278 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6280 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6282 (gdb_unparse_agent_expr): Likewise.
6283 * hostio.c (require_data): Likewise.
6284 (handle_pread): Likewise.
6285 * linux-low.c (disable_regset): Likewise.
6286 (fetch_register): Likewise.
6287 (store_register): Likewise.
6288 (get_dynamic): Likewise.
6289 (linux_qxfer_libraries_svr4): Likewise.
6290 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6291 (set_fast_tracepoint_jump): Likewise.
6292 (uninsert_fast_tracepoint_jumps_at): Likewise.
6293 (reinsert_fast_tracepoint_jumps_at): Likewise.
6294 (validate_inserted_breakpoint): Likewise.
6295 (clone_agent_expr): Likewise.
6296 * regcache.c (init_register_cache): Likewise.
6297 * remote-utils.c (putpkt_binary_1): Likewise.
6298 (decode_M_packet): Likewise.
6299 (decode_X_packet): Likewise.
6300 (look_up_one_symbol): Likewise.
6301 (relocate_instruction): Likewise.
6302 (monitor_output): Likewise.
6303 * server.c (handle_search_memory): Likewise.
6304 (handle_qxfer_exec_file): Likewise.
6305 (handle_qxfer_libraries): Likewise.
6306 (handle_qxfer): Likewise.
6307 (handle_query): Likewise.
6308 (handle_v_cont): Likewise.
6309 (handle_v_run): Likewise.
6310 (captured_main): Likewise.
6311 * target.c (write_inferior_memory): Likewise.
6312 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6313 * tracepoint.c (init_trace_buffer): Likewise.
6314 (add_tracepoint_action): Likewise.
6315 (add_traceframe): Likewise.
6316 (add_traceframe_block): Likewise.
6317 (cmd_qtdpsrc): Likewise.
6318 (cmd_qtdv): Likewise.
6319 (cmd_qtstatus): Likewise.
6320 (response_source): Likewise.
6321 (response_tsv): Likewise.
6322 (cmd_qtnotes): Likewise.
6323 (gdb_collect): Likewise.
6324 (initialize_tracepoint): Likewise.
6326 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6328 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6329 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6330 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6332 (enum aarch64_condition_codes): New enum.
6333 (w0): New static global.
6336 (struct aarch64_memory_operand) <type>: New
6337 MEMORY_OPERAND_POSTINDEX type.
6338 (postindex_memory_operand): New helper function.
6339 (emit_ret): New function.
6340 (emit_load_store_pair): New function, factored out of emit_stp
6341 with support for MEMORY_OPERAND_POSTINDEX.
6342 (emit_stp): Rewrite using emit_load_store_pair.
6343 (emit_ldp): New function.
6344 (emit_load_store): Likewise.
6345 (emit_ldr): Mention post-index instruction in comment.
6346 (emit_ldrh): New function.
6347 (emit_ldrb): New function.
6348 (emit_ldrsw): Mention post-index instruction in comment.
6349 (emit_str): Likewise.
6350 (emit_subs): New function.
6351 (emit_cmp): Likewise.
6352 (emit_and): Likewise.
6353 (emit_orr): Likewise.
6354 (emit_orn): Likewise.
6355 (emit_eor): Likewise.
6356 (emit_mvn): Likewise.
6357 (emit_lslv): Likewise.
6358 (emit_lsrv): Likewise.
6359 (emit_asrv): Likewise.
6360 (emit_mul): Likewise.
6361 (emit_sbfm): Likewise.
6362 (emit_sbfx): Likewise.
6363 (emit_ubfm): Likewise.
6364 (emit_ubfx): Likewise.
6365 (emit_csinc): Likewise.
6366 (emit_cset): Likewise.
6367 (emit_nop): Likewise.
6368 (emit_ops_insns): New helper function.
6369 (emit_pop): Likewise.
6370 (emit_push): Likewise.
6371 (aarch64_emit_prologue): New function.
6372 (aarch64_emit_epilogue): Likewise.
6373 (aarch64_emit_add): Likewise.
6374 (aarch64_emit_sub): Likewise.
6375 (aarch64_emit_mul): Likewise.
6376 (aarch64_emit_lsh): Likewise.
6377 (aarch64_emit_rsh_signed): Likewise.
6378 (aarch64_emit_rsh_unsigned): Likewise.
6379 (aarch64_emit_ext): Likewise.
6380 (aarch64_emit_log_not): Likewise.
6381 (aarch64_emit_bit_and): Likewise.
6382 (aarch64_emit_bit_or): Likewise.
6383 (aarch64_emit_bit_xor): Likewise.
6384 (aarch64_emit_bit_not): Likewise.
6385 (aarch64_emit_equal): Likewise.
6386 (aarch64_emit_less_signed): Likewise.
6387 (aarch64_emit_less_unsigned): Likewise.
6388 (aarch64_emit_ref): Likewise.
6389 (aarch64_emit_if_goto): Likewise.
6390 (aarch64_emit_goto): Likewise.
6391 (aarch64_write_goto_address): Likewise.
6392 (aarch64_emit_const): Likewise.
6393 (aarch64_emit_call): Likewise.
6394 (aarch64_emit_reg): Likewise.
6395 (aarch64_emit_pop): Likewise.
6396 (aarch64_emit_stack_flush): Likewise.
6397 (aarch64_emit_zero_ext): Likewise.
6398 (aarch64_emit_swap): Likewise.
6399 (aarch64_emit_stack_adjust): Likewise.
6400 (aarch64_emit_int_call_1): Likewise.
6401 (aarch64_emit_void_call_2): Likewise.
6402 (aarch64_emit_eq_goto): Likewise.
6403 (aarch64_emit_ne_goto): Likewise.
6404 (aarch64_emit_lt_goto): Likewise.
6405 (aarch64_emit_le_goto): Likewise.
6406 (aarch64_emit_gt_goto): Likewise.
6407 (aarch64_emit_ge_got): Likewise.
6408 (aarch64_emit_ops_impl): New static global variable.
6409 (aarch64_emit_ops): New target function, return
6410 &aarch64_emit_ops_impl.
6411 (struct linux_target_ops): Install it.
6413 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6415 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6416 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6418 * linux-aarch64-ipa.c: New file.
6419 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6421 (aarch64_get_thread_area): New target method.
6422 (extract_signed_bitfield): New helper function.
6423 (aarch64_decode_ldr_literal): New function.
6424 (enum aarch64_opcodes): New enum.
6425 (struct aarch64_register): New struct.
6426 (struct aarch64_operand): New struct.
6427 (x0): New static global.
6436 (aarch64_register): New helper function.
6437 (register_operand): Likewise.
6438 (immediate_operand): Likewise.
6439 (struct aarch64_memory_operand): New struct.
6440 (offset_memory_operand): New helper function.
6441 (preindex_memory_operand): Likewise.
6442 (enum aarch64_system_control_registers): New enum.
6443 (ENCODE): New macro.
6444 (emit_insn): New helper function.
6445 (emit_b): New function.
6446 (emit_bcond): Likewise.
6447 (emit_cb): Likewise.
6448 (emit_tb): Likewise.
6449 (emit_blr): Likewise.
6450 (emit_stp): Likewise.
6451 (emit_ldp_q_offset): Likewise.
6452 (emit_stp_q_offset): Likewise.
6453 (emit_load_store): Likewise.
6454 (emit_ldr): Likewise.
6455 (emit_ldrsw): Likewise.
6456 (emit_str): Likewise.
6457 (emit_ldaxr): Likewise.
6458 (emit_stxr): Likewise.
6459 (emit_stlr): Likewise.
6460 (emit_data_processing_reg): Likewise.
6461 (emit_data_processing): Likewise.
6462 (emit_add): Likewise.
6463 (emit_sub): Likewise.
6464 (emit_mov): Likewise.
6465 (emit_movk): Likewise.
6466 (emit_mov_addr): Likewise.
6467 (emit_mrs): Likewise.
6468 (emit_msr): Likewise.
6469 (emit_sevl): Likewise.
6470 (emit_wfe): Likewise.
6471 (append_insns): Likewise.
6472 (can_encode_int32_in): New helper function.
6473 (aarch64_relocate_instruction): New function.
6474 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6475 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6476 (struct linux_target_ops): Install aarch64_get_thread_area,
6477 aarch64_install_fast_tracepoint_jump_pad and
6478 aarch64_get_min_fast_tracepoint_insn_len.
6480 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6482 * Makefile.in (aarch64-insn.o): New rule.
6483 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6485 2015-09-21 Yao Qi <yao.qi@linaro.org>
6487 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6489 2015-09-21 Yao Qi <yao.qi@linaro.org>
6491 * tracepoint.c (max_jump_pad_size): Remove.
6493 2015-09-18 Yao Qi <yao.qi@linaro.org>
6495 * linux-aarch64-low.c: Don't include sys/uio.h.
6496 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6498 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6500 * tracepoint.c (eval_result_type): Change prototype.
6501 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6503 2015-09-15 Pedro Alves <palves@redhat.com>
6505 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6506 Check whether to report exec events instead of checking whether
6507 multiprocess is enabled.
6509 2015-09-15 Pedro Alves <palves@redhat.com>
6512 * remote-utils.c (prepare_resume_reply): Merge
6513 TARGET_WAITKIND_VFORK_DONE switch case with the
6514 TARGET_WAITKIND_FORKED case.
6516 2015-09-15 Yao Qi <yao.qi@linaro.org>
6518 * server.c (handle_query): Check string comparison using
6519 "else if" instead of "if".
6521 2015-09-15 Yao Qi <yao.qi@linaro.org>
6523 * server.c (vCont_supported): New global variable.
6524 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6525 matches. Append ";vContSupported+" to own_buf.
6526 (handle_v_requests): Append ";s;S" to own_buf if target supports
6527 hardware single step or vCont_supported is false.
6528 (capture_main): Set vCont_supported to zero.
6530 2015-09-15 Yao Qi <yao.qi@linaro.org>
6532 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6534 (linux_supports_hardware_single_step): ... New function.
6535 (linux_target_ops): Update.
6536 * lynx-low.c (lynx_target_ops): Set field
6537 supports_hardware_single_step to target_can_do_hardware_single_step.
6538 * nto-low.c (nto_target_ops): Likewise.
6539 * spu-low.c (spu_target_ops): Likewise.
6540 * win32-low.c (win32_target_ops): Likewise.
6541 * target.c (target_can_do_hardware_single_step): New function.
6542 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6543 Remove. <supports_hardware_single_step>: New field.
6544 (target_supports_conditional_breakpoints): Remove.
6545 (target_supports_hardware_single_step): New macro.
6546 (target_can_do_hardware_single_step): Declare.
6547 * server.c (handle_query): Use target_supports_hardware_single_step
6548 instead of target_supports_conditional_breakpoints.
6550 2015-09-15 Yao Qi <yao.qi@linaro.org>
6552 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6554 (struct linux_target_ops the_low_target): Install
6555 aarch64_linux_siginfo_fixup.
6557 2015-09-11 Don Breazeal <donb@codesourcery.com>
6558 Luis Machado <lgustavo@codesourcery.com>
6560 * linux-low.c (linux_mourn): Static declaration.
6561 (linux_arch_setup): Move in front of
6562 handle_extended_wait.
6563 (linux_arch_setup_thread): New function.
6564 (handle_extended_wait): Handle exec events. Call
6565 linux_arch_setup_thread. Make event_lwp argument a
6566 pointer-to-a-pointer.
6567 (check_zombie_leaders): Do not check stopped threads.
6568 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6569 (linux_low_filter_event): Add lwp and thread for exec'ing
6570 non-leader thread if leader thread has been deleted.
6571 Refactor code into linux_arch_setup_thread and call it.
6572 Pass child lwp pointer by reference to handle_extended_wait.
6573 (linux_wait_for_event_filtered): Update comment.
6574 (linux_wait_1): Prevent clobbering exec event status.
6575 (linux_supports_exec_events): New function.
6576 (linux_target_ops) <supports_exec_events>: Initialize new member.
6577 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6579 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6580 * server.c (report_exec_events): New global variable.
6581 (handle_query): Handle qSupported query for exec-events feature.
6582 (captured_main): Initialize report_exec_events.
6583 * server.h (report_exec_events): Declare new global variable.
6584 * target.h (struct target_ops) <supports_exec_events>: New
6586 (target_supports_exec_events): New macro.
6587 * win32-low.c (win32_target_ops) <supports_exec_events>:
6588 Initialize new member.
6590 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6592 * linux-low.c (linux_low_enable_btrace): Remove.
6593 (linux_target_ops): Replace linux_low_enable_btrace with
6594 linux_enable_btrace.
6596 2015-09-03 Yao Qi <yao.qi@linaro.org>
6598 * linux-aarch64-low.c (aarch64_insert_point): Call
6599 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6602 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6604 * linux-low.c (check_stopped_by_breakpoint): Use
6605 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6607 2015-08-27 Pedro Alves <palves@redhat.com>
6609 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6611 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6613 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6614 the XNEW-family equivalent.
6615 (compile_bytecodes): Likewise.
6616 * dll.c (loaded_dll): Likewise.
6617 * event-loop.c (append_callback_event): Likewise.
6618 (create_file_handler): Likewise.
6619 (create_file_event): Likewise.
6620 * hostio.c (handle_open): Likewise.
6621 * inferiors.c (add_thread): Likewise.
6622 (add_process): Likewise.
6623 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6624 * linux-arm-low.c (arm_new_process): Likewise.
6625 (arm_new_thread): Likewise.
6626 * linux-low.c (add_to_pid_list): Likewise.
6627 (linux_add_process): Likewise.
6628 (handle_extended_wait): Likewise.
6629 (add_lwp): Likewise.
6630 (enqueue_one_deferred_signal): Likewise.
6631 (enqueue_pending_signal): Likewise.
6632 (linux_resume_one_lwp_throw): Likewise.
6633 (linux_resume_one_thread): Likewise.
6634 (linux_read_memory): Likewise.
6635 (linux_write_memory): Likewise.
6636 * linux-mips-low.c (mips_linux_new_process): Likewise.
6637 (mips_linux_new_thread): Likewise.
6638 (mips_add_watchpoint): Likewise.
6639 * linux-x86-low.c (initialize_low_arch): Likewise.
6640 * lynx-low.c (lynx_add_process): Likewise.
6641 * mem-break.c (set_raw_breakpoint_at): Likewise.
6642 (set_breakpoint): Likewise.
6643 (add_condition_to_breakpoint): Likewise.
6644 (add_commands_to_breakpoint): Likewise.
6645 (clone_agent_expr): Likewise.
6646 (clone_one_breakpoint): Likewise.
6647 * regcache.c (new_register_cache): Likewise.
6648 * remote-utils.c (look_up_one_symbol): Likewise.
6649 * server.c (queue_stop_reply): Likewise.
6650 (start_inferior): Likewise.
6651 (queue_stop_reply_callback): Likewise.
6652 (handle_target_event): Likewise.
6653 * spu-low.c (fetch_ppc_memory): Likewise.
6654 (store_ppc_memory): Likewise.
6655 * target.c (set_target_ops): Likewise.
6656 * thread-db.c (thread_db_load_search): Likewise.
6657 (try_thread_db_load_1): Likewise.
6658 * tracepoint.c (add_tracepoint): Likewise.
6659 (add_tracepoint_action): Likewise.
6660 (create_trace_state_variable): Likewise.
6661 (cmd_qtdpsrc): Likewise.
6662 (cmd_qtro): Likewise.
6663 (add_while_stepping_state): Likewise.
6664 * win32-low.c (child_add_thread): Likewise.
6665 (get_image_name): Likewise.
6667 2015-08-25 Yao Qi <yao.qi@linaro.org>
6669 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6671 2015-08-25 Yao Qi <yao.qi@linaro.org>
6673 * Makefile.in (aarch64-linux.o): New rule.
6674 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6676 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6677 (aarch64_init_debug_reg_state): Make it extern.
6678 (aarch64_linux_prepare_to_resume): Remove.
6680 2015-08-25 Yao Qi <yao.qi@linaro.org>
6682 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6683 lwp_arch_private_info and ptid_of_lwp.
6685 2015-08-25 Yao Qi <yao.qi@linaro.org>
6687 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6688 Find proc_info by find_process_pid. All callers updated.
6690 2015-08-25 Yao Qi <yao.qi@linaro.org>
6692 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6694 (debug_reg_change_callback): Remove.
6695 (aarch64_notify_debug_reg_change): Remove.
6697 2015-08-25 Yao Qi <yao.qi@linaro.org>
6699 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6700 Call current_lwp_ptid.
6702 2015-08-25 Yao Qi <yao.qi@linaro.org>
6704 * linux-aarch64-low.c (debug_reg_change_callback): Use
6707 2015-08-25 Yao Qi <yao.qi@linaro.org>
6709 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6711 2015-08-25 Yao Qi <yao.qi@linaro.org>
6713 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6715 2015-08-25 Yao Qi <yao.qi@linaro.org>
6717 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6720 2015-08-25 Yao Qi <yao.qi@linaro.org>
6722 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6724 (debug_reg_change_callback): Remove argument entry and add argument
6725 lwp. Remove local variable thread. Don't print thread id in the
6726 debugging output. Don't check whether pid of thread equals to pid.
6727 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6728 iterate_over_lwps instead find_inferior.
6730 2015-08-24 Pedro Alves <palves@redhat.com>
6732 * inferiors.c (get_first_process): New function.
6733 * inferiors.h (get_first_process): New declaration.
6734 * remote-utils.c (read_ptid): Default to the first process in the
6735 list, instead of to the current thread's process.
6737 2015-08-24 Pedro Alves <palves@redhat.com>
6739 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6740 * event-loop.c: Likewise.
6741 * remote-utils.c: Likewise.
6742 * tracepoint.c: Likewise.
6744 2015-08-24 Pedro Alves <palves@redhat.com>
6746 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6749 2015-08-21 Pedro Alves <palves@redhat.com>
6751 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6752 instead of literal 1.
6754 2015-08-21 Pedro Alves <palves@redhat.com>
6756 * tdesc.c (default_description): Explicitly zero-initialize.
6758 2015-08-21 Pedro Alves <palves@redhat.com>
6761 * inferiors.c (remove_thread): Discard any pending stop reply for
6763 * server.c (remove_all_on_match_pid): Rename to ...
6764 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6766 (discard_queued_stop_replies): Change parameter to a ptid. Now
6768 (handle_v_kill, kill_inferior_callback, captured_main)
6769 (process_serial_event): Adjust.
6770 * server.h (discard_queued_stop_replies): Declare.
6772 2015-08-21 Pedro Alves <palves@redhat.com>
6774 * linux-low.c (wait_for_sigstop): Always switch to no thread
6775 selected if the previously current thread dies.
6776 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6777 process instead of the current thread's.
6778 * remote-utils.c (input_interrupt): Don't check if there's no
6780 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6781 current thread to the general thread fails, error out.
6782 (handle_qxfer_auxv, handle_qxfer_libraries)
6783 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6784 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6785 (handle_query): Check if there's a thread selected instead of
6786 checking whether there's any thread in the thread list.
6787 (handle_qxfer_threads, handle_qxfer_btrace)
6788 (handle_qxfer_btrace_conf): Don't error out early if there's no
6789 thread in the thread list.
6790 (handle_v_cont, myresume): Don't set the current thread to the
6792 (process_serial_event) <Hg handling>: Also set thread_id if the
6793 previous general thread is still alive.
6794 (process_serial_event) <g/G handling>: If setting the current
6795 thread to the general thread fails, error out.
6796 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6797 thread's lwp instead of the current thread's.
6798 * target.c (set_desired_thread): If the desired thread was not
6799 found, leave the current thread pointing to NULL. Return an int
6800 (boolean) indicating success.
6801 * target.h (set_desired_thread): Change return type to int.
6803 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6805 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6806 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6808 (ps_get_thread_area): New function.
6810 2015-08-19 Gary Benson <gbenson@redhat.com>
6812 * hostio.c (handle_pread): Do not attempt to read more data
6813 than hostio_reply_with_data can fit in a packet.
6815 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6817 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6819 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6821 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6823 2015-08-06 Pedro Alves <palves@redhat.com>
6825 * tracepoint.c (expr_eval_result): Now an int.
6827 2015-08-06 Pedro Alves <palves@redhat.com>
6829 * gdbthread.h (struct regcache): Forward declare.
6830 (struct thread_info) <regcache_data>: Now a struct regcache
6832 * inferiors.c (inferior_regcache_data)
6833 (set_inferior_regcache_data): Now work with struct regcache
6835 * inferiors.h (struct regcache): Forward declare.
6836 (inferior_regcache_data, set_inferior_regcache_data): Now work
6837 with struct regcache pointers.
6838 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6839 (free_register_cache_thread): Remove struct regcache pointer
6842 2015-08-06 Pedro Alves <palves@redhat.com>
6844 * server.c (captured_main): On error, print the exception message
6845 to stderr, and if run_once is set, throw a quit.
6847 2015-08-06 Pedro Alves <palves@redhat.com>
6849 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6852 2015-08-06 Pedro Alves <palves@redhat.com>
6854 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6855 reading beyond the passed in buffer length.
6857 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6859 * tracepoint.c (symbol_list) <required>: Remove.
6861 2015-08-06 Pedro Alves <palves@redhat.com>
6863 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6864 count if stopping and suspending threads.
6865 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6866 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6867 (linux_detach): Complete an ongoing step-over.
6868 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6870 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6871 (linux_wait_1): If passing a signal to the inferior after
6872 finishing a step-over, unsuspend and re-resume all lwps. If we
6873 see a single-step event but the thread should be continuing, don't
6874 pass the trap to gdb.
6875 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6876 internal_error instead of gdb_assert.
6877 (enqueue_pending_signal): New function.
6878 (check_ptrace_stopped_lwp_gone): Add debug output.
6879 (start_step_over): Use internal_error instead of gdb_assert.
6880 (complete_ongoing_step_over): New function.
6881 (linux_resume_one_thread): Don't resume a suspended thread.
6882 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6885 2015-08-06 Pedro Alves <palves@redhat.com>
6887 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6888 (linux_thread_alive): Use lwp_is_marked_dead.
6889 (extended_event_reported): Delete.
6890 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6891 instead of extended_event_reported.
6892 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6894 (lwp_is_marked_dead): New function.
6895 (lwp_running): Use lwp_is_marked_dead.
6896 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6899 2015-08-06 Pedro Alves <palves@redhat.com>
6901 * linux-low.c (linux_wait_1): Move fork event output out of the
6902 !report_to_gdb check. Pass event_child->waitstatus to
6903 target_waitstatus_to_string instead of ourstatus.
6905 2015-08-04 Yao Qi <yao.qi@linaro.org>
6907 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6908 if current_thread is 32 bit.
6910 2015-08-04 Yao Qi <yao.qi@linaro.org>
6912 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6913 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6914 * server.c (extended_protocol): Remove "static".
6915 * server.h (extended_protocol): Declare it.
6917 2015-08-04 Yao Qi <yao.qi@linaro.org>
6919 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6920 both aarch64 and aarch32.
6921 (aarch64_set_pc): Likewise.
6923 2015-08-04 Yao Qi <yao.qi@linaro.org>
6925 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6926 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6927 arm-with-neon.xml to srv_xmlfiles.
6928 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6929 (is_64bit_tdesc): New function.
6930 (aarch64_linux_read_description): New function.
6931 (aarch64_arch_setup): Call aarch64_linux_read_description.
6932 (regs_info): Rename to regs_info_aarch64.
6933 (aarch64_regs_info): Return right regs_info.
6934 (initialize_low_arch): Call initialize_low_arch_aarch32.
6936 2015-08-04 Yao Qi <yao.qi@linaro.org>
6938 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6939 * linux-aarch32-low.c: New file.
6940 * linux-aarch32-low.h: New file.
6941 * linux-arm-low.c (arm_fill_gregset): Move it to
6942 linux-aarch32-low.c.
6943 (arm_store_gregset): Likewise.
6944 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6945 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6946 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6947 (regs_info): Rename to regs_info_arm.
6948 (arm_regs_info): Return regs_info_aarch32 if
6949 have_ptrace_getregset is 1 and target description is
6950 arm_with_neon or arm_with_vfpv3.
6951 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6952 Call initialize_low_arch_aarch32 instead.
6954 2015-08-04 Yao Qi <yao.qi@linaro.org>
6956 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6957 * linux-low.c: ... here.
6958 * linux-low.h (have_ptrace_getregset): Declare it.
6960 2015-08-04 Pedro Alves <palves@redhat.com>
6962 * thread-db.c (struct thread_db): Use new typedefs.
6963 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6965 (disable_thread_event_reporting): Cast result of dlsym to
6966 destination function pointer type.
6967 (thread_db_mourn): Use td_ta_delete_ftype.
6969 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6971 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6973 (CDX_BREAKPOINT): Define for R2.
6974 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6975 (the_low_target): Add comments.
6977 2015-07-30 Yao Qi <yao.qi@linaro.org>
6979 * linux-arm-low.c (arm_hwcap): Remove it.
6980 (arm_read_description): New local variable arm_hwcap. Don't
6981 set arm_hwcap to zero.
6983 2015-07-30 Yao Qi <yao.qi@linaro.org>
6985 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6986 Use regcache->tdesc instead.
6987 (arm_store_wmmxregset): Likewise.
6988 (arm_fill_vfpregset): Likewise.
6989 (arm_store_vfpregset): Likewise.
6991 2015-07-30 Yao Qi <yao.qi@linaro.org>
6993 * linux-arm-low.c: Include arch/arm.h.
6994 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6995 (arm_store_gregset): Likewise.
6997 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6999 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7000 ptrace's 4th parameter.
7002 2015-07-27 Yao Qi <yao.qi@linaro.org>
7004 * configure.srv (case aarch64*-*-linux*): Don't set
7007 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7009 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7011 * linux-arm-low.c: Likewise.
7012 * linux-cris-low.c: Likewise.
7013 * linux-crisv32-low.c: Likewise.
7014 * linux-low.c: Likewise.
7015 * linux-m68k-low.c: Likewise.
7016 * linux-mips-low.c: Likewise.
7017 * linux-nios2-low.c: Likewise.
7018 * linux-s390-low.c: Likewise.
7019 * linux-sparc-low.c: Likewise.
7020 * linux-tic6x-low.c: Likewise.
7021 * linux-tile-low.c: Likewise.
7022 * linux-x86-low.c: Likewise.
7024 2015-07-24 Pedro Alves <palves@redhat.com>
7026 * config.in: Regenerate.
7027 * configure: Regenerate.
7029 2015-07-24 Pedro Alves <palves@redhat.com>
7031 * acinclude.m4: Include ../ptrace.m4.
7032 * configure.ac: Call GDB_AC_PTRACE.
7033 * config.in, configure: Regenerate.
7035 2015-07-24 Yao Qi <yao.qi@linaro.org>
7037 * linux-low.c (linux_create_inferior): Remove setting to
7038 proc->priv->new_inferior.
7039 (linux_attach): Likewise.
7040 (linux_low_filter_event): Likewise.
7041 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7043 2015-07-24 Yao Qi <yao.qi@linaro.org>
7045 * linux-low.c (linux_arch_setup): New function.
7046 (linux_low_filter_event): If proc->tdesc is NULL and
7047 proc->attached is true, call the_low_target.arch_setup.
7048 Otherwise, keep status pending, and return.
7049 (linux_resume_one_lwp_throw): Don't call get_pc if
7050 thread->while_stepping isn't NULL. Don't call
7051 get_thread_regcache if proc->tdesc is NULL.
7052 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7053 (linux_target_ops): Install arch_setup.
7054 * server.c (start_inferior): Call the_target->arch_setup.
7055 * target.h (struct target_ops) <arch_setup>: New field.
7056 (target_arch_setup): New marco.
7057 * lynx-low.c (lynx_target_ops): Update.
7058 * nto-low.c (nto_target_ops): Update.
7059 * spu-low.c (spu_target_ops): Update.
7060 * win32-low.c (win32_target_ops): Update.
7062 2015-07-24 Yao Qi <yao.qi@linaro.org>
7064 * linux-low.c (linux_add_process): Don't set
7065 proc->priv->new_inferior.
7066 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7067 (linux_attach): Likewise.
7069 2015-07-24 Yao Qi <yao.qi@linaro.org>
7071 * server.c (start_inferior): Code refactor.
7073 2015-07-24 Yao Qi <yao.qi@linaro.org>
7075 * server.c (process_serial_event): Set general_thread.
7077 2015-07-21 Yao Qi <yao.qi@linaro.org>
7079 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7080 aarch64_linux_get_debug_reg_capacity.
7082 2015-07-17 Yao Qi <yao.qi@linaro.org>
7084 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7085 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7086 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7087 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7088 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7089 (AARCH64_HWP_ALIGNMENT): Likewise.
7090 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7091 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7092 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7093 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7094 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7095 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7096 (struct aarch64_debug_reg_state): Likewise.
7097 (struct arch_lwp_info): Likewise.
7098 (aarch64_align_watchpoint): Likewise.
7099 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7100 (aarch64_watchpoint_length): Likewise.
7101 (aarch64_point_encode_ctrl_reg): Likewise
7102 (aarch64_point_is_aligned): Likewise.
7103 (aarch64_align_watchpoint): Likewise.
7104 (aarch64_linux_set_debug_regs):
7105 (aarch64_dr_state_insert_one_point): Likewise.
7106 (aarch64_dr_state_remove_one_point): Likewise.
7107 (aarch64_handle_breakpoint): Likewise.
7108 (aarch64_handle_aligned_watchpoint): Likewise.
7109 (aarch64_handle_unaligned_watchpoint): Likewise.
7110 (aarch64_handle_watchpoint): Likewise.
7112 2015-07-17 Yao Qi <yao.qi@linaro.org>
7114 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7115 and don't aarch64_get_debug_reg_state. All callers update.
7116 (aarch64_handle_aligned_watchpoint): Likewise.
7117 (aarch64_handle_unaligned_watchpoint): Likewise.
7118 (aarch64_handle_watchpoint): Likewise.
7119 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7120 (aarch64_remove_point): Likewise.
7122 2015-07-17 Yao Qi <yao.qi@linaro.org>
7124 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7126 (aarch64_handle_unaligned_watchpoint): Likewise.
7128 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7130 Revert the previous 3 commits:
7131 Move gdb_regex* to common/
7132 Move linux_find_memory_regions_full & co.
7133 gdbserver build-id attribute generator
7135 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7136 Jan Kratochvil <jan.kratochvil@redhat.com>
7138 gdbserver build-id attribute generator.
7139 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7140 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7141 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7143 (get_dynamic): Use find_pdhr to traverse program headers.
7144 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7145 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7146 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7147 (get_hex_build_id): New.
7148 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7149 to reply XML document.
7151 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7152 Jan Kratochvil <jan.kratochvil@redhat.com>
7154 * target.c: Include target/target-utils.h and fcntl.h.
7155 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7156 (target_fileio_read_stralloc): New functions.
7158 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7160 * Makefile.in (OBS): Add gdb_regex.o.
7162 * config.in: Rebuilt.
7163 * configure: Rebuilt.
7165 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7166 Jan Kratochvil <jan.kratochvil@redhat.com>
7168 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7169 * Makefile.in (OBS): Add target-utils.o.
7170 (linux-maps.o, target-utils.o): New.
7171 * configure.srv (srv_linux_obj): Add linux-maps.o.
7173 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7175 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7177 (the_low_target): Install it.
7179 2015-07-14 Pedro Alves <palves@redhat.com>
7181 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7182 Instead, ignore ECHILD, and throw an error for other errnos.
7184 2015-07-10 Pedro Alves <palves@redhat.com>
7186 * event-loop.c (struct callback_event) <data>: Change type to
7187 gdb_client_data instance instead of gdb_client_data pointer.
7188 (append_callback_event): Adjust.
7190 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7192 * linux-aarch64-low.c: Add comments for each linux_target_ops
7193 method. Remove comments already covered in target_ops and
7194 linux_target_ops definitions.
7195 (the_low_target): Add comments for each unimplemented method.
7197 2015-07-09 Yao Qi <yao.qi@linaro.org>
7199 * linux-aarch64-low.c (aarch64_regmap): Remove.
7200 (aarch64_usrregs_info): Remove.
7201 (regs_info): Set field usrregs to NULL.
7203 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7205 * linux-low.c: Include "rsp-low.h"
7206 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7207 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7208 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7209 (handle_btrace_enable_pt): New.
7210 (handle_btrace_general_set): Support "pt".
7211 (handle_btrace_conf_general_set): Support "pt:size".
7213 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7215 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7218 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7220 * linux-aarch64-low.c: Remove comment about endianness.
7221 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7222 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7225 2015-06-24 Gary Benson <gbenson@redhat.com>
7227 * linux-i386-ipa.c (stdint.h): Do not include.
7228 * lynx-i386-low.c (stdint.h): Likewise.
7229 * lynx-ppc-low.c (stdint.h): Likewise.
7230 * mem-break.c (stdint.h): Likewise.
7231 * thread-db.c (stdint.h): Likewise.
7232 * tracepoint.c (stdint.h): Likewise.
7233 * win32-low.c (stdint.h): Likewise.
7235 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7237 * server.c (write_qxfer_response): Update call to
7238 remote_escape_output.
7240 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7241 Jan Kratochvil <jan.kratochvil@redhat.com>
7243 Merge multiple hex conversions.
7244 * gdbreplay.c (tohex): Rename to 'fromhex'.
7245 (logchar): Use fromhex.
7247 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7249 * server.c (handle_qxfer_libraries): Set `version' attribute for
7252 2015-06-10 Gary Benson <gbenson@redhat.com>
7254 * target.h (struct target_ops) <multifs_open>: New field.
7255 <multifs_unlink>: Likewise.
7256 <multifs_readlink>: Likewise.
7257 * linux-low.c (nat/linux-namespaces.h): New include.
7258 (linux_target_ops): Initialize the_target->multifs_open,
7259 the_target->multifs_unlink and the_target->multifs_readlink.
7260 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7261 * hostio.c (hostio_fs_pid): New static variable.
7262 (hostio_handle_new_gdb_connection): New function.
7263 (handle_setfs): Likewise.
7264 (handle_open): Use the_target->multifs_open as appropriate.
7265 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7266 (handle_readlink): Use the_target->multifs_readlink as
7268 (handle_vFile): Handle vFile:setfs packets.
7269 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7270 after target_handle_new_gdb_connection.
7272 2015-06-10 Gary Benson <gbenson@redhat.com>
7274 * configure.ac (AC_CHECK_FUNCS): Add setns.
7275 * config.in: Regenerate.
7276 * configure: Likewise.
7277 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7278 (linux-namespaces.o): New rule.
7279 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7281 2015-06-09 Gary Benson <gbenson@redhat.com>
7283 * hostio.c (handle_open): Process mode argument with
7284 fileio_to_host_mode.
7286 2015-06-01 Yao Qi <yao.qi@linaro.org>
7288 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7289 * linux-x86-low.c: Likewise.
7291 2015-05-28 Don Breazeal <donb@codesourcery.com>
7293 * linux-low.c (handle_extended_wait): Initialize
7294 thread_info.last_resume_kind for new fork children.
7296 2015-05-15 Pedro Alves <palves@redhat.com>
7298 * target.h (target_handle_new_gdb_connection): Rewrite using if
7299 wrapped in do/while.
7301 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7303 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7304 * configure, config.in: Regenerate.
7305 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7308 2015-05-12 Don Breazeal <donb@codesourcery.com>
7310 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7311 PTRACE_EVENT_VFORK_DONE.
7312 (linux_low_ptrace_options, extended_event_reported): Add vfork
7314 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7315 and "vforkdone" for RSP 'T' Stop Reply Packet.
7316 * server.h (report_vfork_events): Declare
7319 2015-05-12 Don Breazeal <donb@codesourcery.com>
7321 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7322 (the_low_target) <new_fork>: Initialize new member.
7323 * linux-arm-low.c (arm_new_fork): New function.
7324 (the_low_target) <new_fork>: Initialize new member.
7325 * linux-low.c (handle_extended_wait): Call new target function
7327 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7328 * linux-mips-low.c (mips_add_watchpoint): New function
7329 extracted from mips_insert_point.
7330 (the_low_target) <new_fork>: Initialize new member.
7331 (mips_linux_new_fork): New function.
7332 (mips_insert_point): Call mips_add_watchpoint.
7333 * linux-x86-low.c (x86_linux_new_fork): New function.
7334 (the_low_target) <new_fork>: Initialize new member.
7336 2015-05-12 Don Breazeal <donb@codesourcery.com>
7338 * linux-low.c (handle_extended_wait): Implement return value,
7339 rename argument 'event_child' to 'event_lwp', handle
7340 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7341 (linux_low_ptrace_options): New function.
7342 (linux_low_filter_event): Call linux_low_ptrace_options,
7343 use different argument fo linux_enable_event_reporting,
7344 use return value from handle_extended_wait.
7345 (extended_event_reported): New function.
7346 (linux_wait_1): Call extended_event_reported and set
7347 status to report fork events.
7348 (linux_write_memory): Add pid to debug message.
7349 (reset_lwp_ptrace_options_callback): New function.
7350 (linux_handle_new_gdb_connection): New function.
7351 (linux_target_ops): Initialize new structure member.
7352 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7353 * lynx-low.c: Initialize new structure member.
7354 * remote-utils.c (prepare_resume_reply): Implement stop reason
7355 "fork" for "T" stop message.
7356 * server.c (handle_query): Call handle_new_gdb_connection.
7357 * server.h (report_fork_events): Declare global flag.
7358 * target.h (struct target_ops) <handle_new_gdb_connection>:
7360 (target_handle_new_gdb_connection): New macro.
7361 * win32-low.c: Initialize new structure member.
7363 2015-05-12 Don Breazeal <donb@codesourcery.com>
7365 * mem-break.c (APPEND_TO_LIST): Define macro.
7366 (clone_agent_expr): New function.
7367 (clone_one_breakpoint): New function.
7368 (clone_all_breakpoints): New function.
7369 * mem-break.h: Declare new functions.
7371 2015-05-12 Don Breazeal <donb@codesourcery.com>
7373 * linux-low.c (linux_supports_fork_events): New function.
7374 (linux_supports_vfork_events): New function.
7375 (linux_target_ops): Initialize new structure members.
7376 (initialize_low): Call linux_check_ptrace_features.
7377 * lynx-low.c (lynx_target_ops): Initialize new structure
7379 * server.c (report_fork_events, report_vfork_events):
7381 (handle_query): Add new features to qSupported packet and
7383 (captured_main): Initialize new global variables.
7384 * target.h (struct target_ops) <supports_fork_events>:
7386 <supports_vfork_events>: New member.
7387 (target_supports_fork_events): New macro.
7388 (target_supports_vfork_events): New macro.
7389 * win32-low.c (win32_target_ops): Initialize new structure
7392 2015-05-12 Gary Benson <gbenson@redhat.com>
7394 * server.c (handle_qxfer_exec_file): Use current process
7397 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7399 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7400 Remove HAVE_PTRACE_GETREGS conditionals.
7401 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7402 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7404 2015-05-08 Yao Qi <yao.qi@linaro.org>
7406 * linux-low.c (linux_supports_conditional_breakpoints): New
7408 (linux_target_ops): Install new target method.
7409 * lynx-low.c (lynx_target_ops): Install NULL hook for
7410 supports_conditional_breakpoints.
7411 * nto-low.c (nto_target_ops): Likewise.
7412 * spu-low.c (spu_target_ops): Likewise.
7413 * win32-low.c (win32_target_ops): Likewise.
7414 * server.c (handle_query): Check
7415 target_supports_conditional_breakpoints.
7416 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7418 (target_supports_conditional_breakpoints): New macro.
7420 2015-05-06 Pedro Alves <palves@redhat.com>
7423 * server.c (start_inferior): If the process exits, mourn it.
7425 2015-04-21 Gary Benson <gbenson@redhat.com>
7427 * hostio.c (fileio_open_flags_to_host): Factored out to
7428 fileio_to_host_openflags in common/fileio.c. Single use
7431 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7433 * linux-xtensa-low.c (xtensa_fill_gregset)
7434 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7437 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7439 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7440 (regs_info): Replace usrregs pointer with NULL.
7442 2015-04-17 Gary Benson <gbenson@redhat.com>
7444 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7445 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7446 * server.c (handle_qxfer_exec_file): New function.
7447 (qxfer_packets): Add exec-file entry.
7448 (handle_query): Report qXfer:exec-file:read as supported packet.
7450 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7452 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7454 2015-04-09 Gary Benson <gbenson@redhat.com>
7456 * hostio-errno.c (errno_to_fileio_error): Remove function.
7457 Update caller to use remote_fileio_to_fio_error.
7459 2015-04-09 Yao Qi <yao.qi@linaro.org>
7461 * linux-low.c (linux_insert_point): Call
7462 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7463 (linux_remove_point): Call remove_memory_breakpoint if type is
7465 * linux-x86-low.c (x86_insert_point): Don't call
7466 insert_memory_breakpoint.
7467 (x86_remove_point): Don't call remove_memory_breakpoint.
7469 2015-04-01 Pedro Alves <palves@redhat.com>
7470 Cleber Rosa <crosa@redhat.com>
7472 * server.c (gdbserver_usage): Reorganize and extend the usage
7475 2015-03-24 Pedro Alves <palves@redhat.com>
7477 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7478 output. Also dump TRAP_TRACE.
7479 (linux_low_filter_event): In debug output, distinguish a
7480 resume_stop SIGSTOP from a delayed SIGSTOP.
7482 2015-03-24 Gary Benson <gbenson@redhat.com>
7484 * linux-x86-low.c (x86_linux_new_thread): Moved to
7486 (x86_linux_prepare_to_resume): Likewise.
7488 2015-03-24 Gary Benson <gbenson@redhat.com>
7490 * Makefile.in (x86-linux-dregs.o): New rule.
7491 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7492 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7493 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7494 (x86_linux_dr_get): Likewise.
7495 (x86_linux_dr_set): Likewise.
7496 (update_debug_registers_callback): Likewise.
7497 (x86_linux_dr_set_addr): Likewise.
7498 (x86_linux_dr_get_addr): Likewise.
7499 (x86_linux_dr_set_control): Likewise.
7500 (x86_linux_dr_get_control): Likewise.
7501 (x86_linux_dr_get_status): Likewise.
7502 (x86_linux_update_debug_registers): Likewise.
7504 2015-03-24 Gary Benson <gbenson@redhat.com>
7506 * linux-x86-low.c (x86_linux_update_debug_registers):
7507 New function, factored out from...
7508 (x86_linux_prepare_to_resume): ...this.
7510 2015-03-24 Gary Benson <gbenson@redhat.com>
7512 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7513 (x86_linux_dr_set): Likewise.
7514 (update_debug_registers_callback): Likewise.
7515 (x86_linux_dr_set_addr): Likewise.
7516 (x86_linux_dr_get_addr): Likewise.
7517 (x86_linux_dr_set_control): Likewise.
7518 (x86_linux_dr_get_control): Likewise.
7519 (x86_linux_dr_get_status): Likewise.
7520 (x86_linux_prepare_to_resume): Likewise.
7522 2015-03-24 Gary Benson <gbenson@redhat.com>
7524 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7525 Use perror_with_name. Pass string through gettext.
7526 (x86_linux_dr_set): Likewise.
7528 2015-03-24 Gary Benson <gbenson@redhat.com>
7530 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7531 (x86_linux_dr_set_addr): ...this.
7532 (x86_dr_low_get_addr): Rename to...
7533 (x86_linux_dr_get_addr): ...this.
7534 (x86_dr_low_set_control): Rename to...
7535 (x86_linux_dr_set_control): ...this.
7536 (x86_dr_low_get_control): Rename to...
7537 (x86_linux_dr_get_control): ...this.
7538 (x86_dr_low_get_status): Rename to...
7539 (x86_linux_dr_get_status): ...this.
7540 (x86_dr_low): Update with new function names.
7542 2015-03-24 Gary Benson <gbenson@redhat.com>
7544 * Makefile.in (x86-linux.o): New rule.
7545 * configure.srv: Add x86-linux.o to relevant targets.
7546 * linux-low.c (lwp_set_arch_private_info): New function.
7547 (lwp_arch_private_info): Likewise.
7548 * linux-x86-low.c: Include nat/x86-linux.h.
7549 (arch_lwp_info): Removed structure.
7550 (update_debug_registers_callback):
7551 Use lwp_set_debug_registers_changed.
7552 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7553 and lwp_set_debug_registers_changed.
7554 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7556 2015-03-24 Gary Benson <gbenson@redhat.com>
7558 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7559 * linux-arm-low.c (arm_new_thread): Likewise.
7560 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7561 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7562 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7563 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7565 2015-03-24 Gary Benson <gbenson@redhat.com>
7567 * linux-low.c (ptid_of_lwp): New function.
7568 (lwp_is_stopped): Likewise.
7569 (lwp_stop_reason): Likewise.
7570 * linux-x86-low.c (update_debug_registers_callback):
7572 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7575 2015-03-24 Gary Benson <gbenson@redhat.com>
7577 * linux-low.h (linux_stop_lwp): Remove declaration.
7579 2015-03-24 Gary Benson <gbenson@redhat.com>
7581 * linux-low.h: Include nat/linux-nat.h.
7582 * linux-low.c (iterate_over_lwps_args): New structure.
7583 (iterate_over_lwps_filter): New function.
7584 (iterate_over_lwps): Likewise.
7585 * linux-x86-low.c (update_debug_registers_callback):
7586 Update signature to what iterate_over_lwps expects.
7587 Remove PID check that iterate_over_lwps now performs.
7588 (x86_dr_low_set_addr): Use iterate_over_lwps.
7589 (x86_dr_low_set_control): Likewise.
7591 2015-03-24 Gary Benson <gbenson@redhat.com>
7593 * linux-x86-low.c (x86_debug_reg_state): New function.
7594 (x86_linux_prepare_to_resume): Use the above.
7596 2015-03-24 Gary Benson <gbenson@redhat.com>
7598 * linux-low.c (current_lwp_ptid): New function.
7599 * linux-x86-low.c: Include nat/linux-nat.h.
7600 (x86_dr_low_get_addr): Use current_lwp_ptid.
7601 (x86_dr_low_get_control): Likewise.
7602 (x86_dr_low_get_status): Likewise.
7604 2015-03-20 Pedro Alves <palves@redhat.com>
7606 * tracepoint.c (cmd_qtstatus): Make "str" const.
7608 2015-03-20 Pedro Alves <palves@redhat.com>
7610 * server.c (handle_general_set): Make "req_str" const.
7612 2015-03-19 Pedro Alves <palves@redhat.com>
7614 * linux-low.c (linux_resume_one_lwp): Rename to ...
7615 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7616 instead call perror_with_name.
7617 (check_ptrace_stopped_lwp_gone): New function.
7618 (linux_resume_one_lwp): Reimplement as wrapper around
7619 linux_resume_one_lwp_throw that swallows errors if the LWP is
7622 2015-03-19 Pedro Alves <palves@redhat.com>
7624 * linux-low.c (count_events_callback, select_event_lwp_callback):
7625 No longer check whether the thread has resume_stop as last resume
7628 2015-03-19 Pedro Alves <palves@redhat.com>
7630 * linux-low.c (count_events_callback, select_event_lwp_callback):
7631 Use the lwp's status_pending_p field, not the thread's.
7633 2015-03-19 Pedro Alves <palves@redhat.com>
7635 * linux-low.c (select_event_lwp_callback): Update comments to
7636 no longer mention SIGTRAP.
7638 2015-03-18 Gary Benson <gbenson@redhat.com>
7640 * server.c (handle_query): Do not report vFile:fstat as supported.
7642 2015-03-11 Gary Benson <gbenson@redhat.com>
7644 * hostio.c (sys/types.h): New include.
7645 (sys/stat.h): Likewise.
7646 (common-remote-fileio.h): Likewise.
7647 (handle_fstat): New function.
7648 (handle_vFile): Handle vFile:fstat packets.
7650 2015-03-11 Gary Benson <gbenson@redhat.com>
7652 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7653 struct stat.st_blocks and struct stat.st_blksize.
7654 * configure: Regenerate.
7655 * config.in: Likewise.
7656 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7657 (OBS): Add common-remote-fileio.o.
7658 (common-remote-fileio.o): New rule.
7660 2015-03-09 Pedro Alves <palves@redhat.com>
7662 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7663 'struct sockaddr' pointer in 'accept' call.
7665 2015-03-09 Pedro Alves <palves@redhat.com>
7668 2015-03-07 Pedro Alves <palves@redhat.com>
7669 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7670 or <winsock2.h> here. Instead include "gdb_socket.h".
7671 (remote_open): Use union gdb_sockaddr_u.
7672 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7673 or <winsock2.h> here. Instead include "gdb_socket.h".
7674 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7675 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7677 (init_named_socket, gdb_agent_helper_thread): Use union
7680 2015-03-07 Pedro Alves <palves@redhat.com>
7682 * configure.ac (build_warnings): Move
7683 -Wdeclaration-after-statement to the C-specific set.
7684 * configure: Regenerate.
7686 2015-03-07 Pedro Alves <palves@redhat.com>
7688 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7689 or <winsock2.h> here. Instead include "gdb_socket.h".
7690 (remote_open): Use union gdb_sockaddr_u.
7691 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7692 or <winsock2.h> here. Instead include "gdb_socket.h".
7693 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7694 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7696 (init_named_socket, gdb_agent_helper_thread): Use union
7699 2015-03-07 Pedro Alves <palves@redhat.com>
7701 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7704 2015-03-06 Yao Qi <yao.qi@linaro.org>
7706 * linux-aarch64-low.c (aarch64_insert_point): Use
7707 show_debug_regs as a boolean.
7708 (aarch64_remove_point): Likewise.
7710 2015-03-05 Pedro Alves <palves@redhat.com>
7712 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7713 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7714 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7715 * nto-low.c (nto_target_ops): Likewise.
7716 * spu-low.c (spu_target_ops): Likewise.
7717 * win32-low.c (win32_target_ops): Likewise.
7719 2015-03-04 Pedro Alves <palves@redhat.com>
7721 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7722 Decide whether a breakpoint triggered based on the SIGTRAP's
7724 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7725 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7726 (linux_low_filter_event): Check for breakpoints before checking
7728 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7730 (linux_stopped_by_sw_breakpoint)
7731 (linux_supports_stopped_by_sw_breakpoint)
7732 (linux_stopped_by_hw_breakpoint)
7733 (linux_supports_stopped_by_hw_breakpoint): New functions.
7734 (linux_target_ops): Install new target methods.
7736 2015-03-04 Pedro Alves <palves@redhat.com>
7738 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7739 * server.c (swbreak_feature, hwbreak_feature): New globals.
7740 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7741 (captured_main): Clear swbreak_feature and hwbreak_feature.
7742 * server.h (swbreak_feature, hwbreak_feature): Declare.
7743 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7744 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7745 supports_stopped_by_hw_breakpoint>: New fields.
7746 (target_supports_stopped_by_sw_breakpoint)
7747 (target_stopped_by_sw_breakpoint)
7748 (target_supports_stopped_by_hw_breakpoint)
7749 (target_stopped_by_hw_breakpoint): Declare.
7751 2015-03-04 Pedro Alves <palves@redhat.com>
7753 enum lwp_stop_reason -> enum target_stop_reason
7754 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7755 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7756 (linux_wait_1, stuck_in_jump_pad_callback)
7757 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7758 (linux_stopped_by_watchpoint):
7759 * linux-low.h (enum lwp_stop_reason): Delete.
7760 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7761 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7763 2015-03-04 Yao Qi <yao.qi@linaro.org>
7765 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7767 2015-03-03 Gary Benson <gbenson@redhat.com>
7769 * hostio.c (handle_vFile): Fix prefix lengths.
7771 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7773 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7776 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7778 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7779 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7780 (clean): Add "rm -f" for above C files.
7781 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7782 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7783 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7784 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7785 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7786 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7787 (init_registers_s390x_vx_linux64)
7788 (init_registers_s390x_tevx_linux64)
7789 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7790 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7792 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7793 (s390_store_vxrs_high): New functions.
7794 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7796 (s390_arch_setup): Add logic for selecting one of the new target
7797 descriptions. Activate the new vector regsets if applicable.
7798 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7799 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7800 and init_registers_s390x_tevx_linux64.
7802 2015-03-01 Pedro Alves <palves@redhat.com>
7804 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7807 2015-02-27 Pedro Alves <palves@redhat.com>
7809 * linux-x86-low.c (u_debugreg_offset): New function.
7810 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7812 2015-02-27 Pedro Alves <palves@redhat.com>
7814 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7815 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7816 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7817 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7818 (ps_lsetfpregs, ps_getpid)
7819 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7820 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7821 (ps_lsetxregs, ps_plog): Declare.
7823 2015-02-27 Pedro Alves <palves@redhat.com>
7825 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7826 IP_AGENT_EXPORT_FUNC.
7827 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7828 IP_AGENT_EXPORT_FUNC.
7829 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7830 (IP_AGENT_EXPORT): Delete.
7831 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7832 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7833 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7834 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7835 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7836 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7837 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7838 (traceframe_read_count, traceframe_write_count)
7839 (traceframes_created, trace_state_variables, get_raw_reg)
7840 (get_trace_state_variable_value, set_trace_state_variable_value)
7841 (ust_loaded, helper_thread_id, cmd_buf): Use
7842 IPA_SYM_EXPORTED_NAME.
7843 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7844 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7845 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7846 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7847 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7848 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7849 EXTERN_C_PUSH/EXTERN_C_POP.
7850 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7851 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7852 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7853 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7854 (traceframe_write_count, traceframe_read_count)
7855 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7856 (about_to_request_buffer_space, get_trace_state_variable_value)
7857 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7858 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7859 EXTERN_C_PUSH/EXTERN_C_POP.
7860 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7861 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7862 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7863 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7864 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7865 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7866 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7867 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7869 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7870 (IP_AGENT_EXPORT_VAR_DECL): Define.
7872 (gdb_agent_get_raw_reg): Declare.
7874 2015-02-27 Tom Tromey <tromey@redhat.com>
7875 Pedro Alves <palves@redhat.com>
7877 Rename symbols whose names are reserved C++ keywords throughout.
7879 2015-02-27 Pedro Alves <palves@redhat.com>
7881 * Makefile.in (COMPILER): New, get it from autoconf.
7882 (CXX): Get from autoconf instead.
7883 (COMPILE.pre): Use COMPILER.
7884 (CC-LD): Rename to ...
7885 (CC_LD): ... this. Use COMPILER.
7886 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7887 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7888 * acinclude.m4: Include build-with-cxx.m4.
7889 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7890 Disable -Werror by default if building in C++ mode.
7891 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7892 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7893 the C++ compiler. Save/restore CXXFLAGS too.
7894 * configure: Regenerate.
7896 2015-02-27 Pedro Alves <palves@redhat.com>
7898 * acinclude.m4: Include libiberty.m4.
7899 * configure.ac: Call libiberty_INIT.
7900 * config.in, configure: Regenerate.
7902 2015-02-26 Pedro Alves <palves@redhat.com>
7904 * linux-low.c (linux_wait_1): When incrementing the PC past a
7905 program breakpoint always use the_low_target.breakpoint_len as
7906 increment, rather than the maximum between that and
7907 the_low_target.decr_pc_after_break.
7909 2015-02-23 Pedro Alves <palves@redhat.com>
7911 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7912 thread was doing a step-over; always adjust the PC if
7913 we stepped over a permanent breakpoint.
7914 (linux_wait_1): If we stepped over breakpoint that was on top of a
7915 permanent breakpoint, manually advance the PC past it.
7917 2015-02-23 Pedro Alves <palves@redhat.com>
7919 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7921 (x86_fill_gregset, x86_store_gregset): Use it when handling
7924 2015-02-20 Pedro Alves <palves@redhat.com>
7926 * thread-db.c: Include "nat/linux-procfs.h".
7927 (thread_db_init): Skip listing new threads if the kernel supports
7928 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7930 2015-02-20 Pedro Alves <palves@redhat.com>
7932 * linux-low.c (status_pending_p_callback): Use ptid_match.
7934 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7936 PR breakpoints/16812
7937 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7938 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7939 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7941 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7943 PR breakpoints/15956
7944 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7946 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7948 * linux-low.c (linux_low_btrace_conf): Print size.
7949 * server.c (handle_btrace_conf_general_set): New.
7950 (hanle_general_set): Call handle_btrace_conf_general_set.
7951 (handle_query): Report Qbtrace-conf:bts:size as supported.
7953 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7955 * linux-low.c (linux_low_enable_btrace): Update parameters.
7956 (linux_low_btrace_conf): New.
7957 (linux_target_ops)<to_btrace_conf>: Initialize.
7958 * server.c (current_btrace_conf): New.
7959 (handle_btrace_enable): Rename to ...
7960 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7961 to target_enable_btrace. Update comment. Update users.
7962 (handle_qxfer_btrace_conf): New.
7963 (qxfer_packets): Add btrace-conf entry.
7964 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7965 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7966 (target_ops)<read_btrace_conf>: New.
7967 (target_enable_btrace): Update parameters.
7968 (target_read_btrace_conf): New.
7970 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7972 * server.c (handle_btrace_general_set): Remove call to
7973 target_supports_btrace.
7974 (supported_btrace_packets): New.
7975 (handle_query): Call supported_btrace_packets.
7976 * target.h: include btrace-common.h.
7977 (btrace_target_info): Removed.
7978 (supports_btrace, target_supports_btrace): Update parameters.
7980 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7982 * Makefile.in (SFILES): Add common/btrace-common.c.
7983 (OBS): Add common/btrace-common.o.
7984 (btrace-common.o): Add build rules.
7985 * linux-low: Include btrace-common.h.
7986 (linux_low_read_btrace): Use struct btrace_data. Call
7987 btrace_data_init and btrace_data_fini.
7989 2015-02-06 Pedro Alves <palves@redhat.com>
7991 * thread-db.c (find_new_threads_callback): Add debug output.
7993 2015-02-04 Pedro Alves <palves@redhat.com>
7995 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7996 (resume_stopped_resumed_lwps): New function.
7997 (linux_wait_for_event_filtered): Use it.
7999 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8001 * Makefile.in (SFILES): Add linux-personality.c.
8002 (linux-personality.o): New rule.
8003 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8004 list of objects to be built.
8005 * linux-low.c: Include nat/linux-personality.h.
8006 (linux_create_inferior): Remove code to disable address space
8007 randomization (moved to ../nat/linux-personality.c). Create
8008 cleanup to disable address space randomization.
8010 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8012 * Makefile.in (posix-strerror.o): New rule.
8013 (mingw-strerror.o): Likewise.
8014 * configure: Regenerated.
8015 * configure.ac: Source file ../common/common.host. Initialize new
8016 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8018 2015-01-14 Yao Qi <yao@codesourcery.com>
8020 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8021 (ppc-linux.o): New rule.
8022 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8023 * configure.ac: AC_CHECK_FUNCS(getauxval).
8024 * config.in: Re-generated.
8025 * configure: Re-generated.
8026 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8027 ppc64_64bit_inferior_p
8029 2015-01-14 Yao Qi <yao@codesourcery.com>
8031 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8032 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8033 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8034 (PT_ORIG_R3, PT_TRAP): Likewise.
8035 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8036 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8037 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8039 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8041 * i387-fp.c (i387_cache_to_xsave): In look over
8042 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8043 zmmh_low_space field by use of zmmh_high_space.
8045 2015-01-09 Pedro Alves <palves@redhat.com>
8047 * linux-low.c (step_over_bkpt): Move higher up in the file.
8048 (handle_extended_wait): Don't store the stop_pc here.
8049 (get_stop_pc): Adjust comments and rename to ...
8050 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8051 stopped for a software breakpoint or hardware breakpoint.
8052 (thread_still_has_status_pending_p): New function.
8053 (status_pending_p_callback): Use
8054 thread_still_has_status_pending_p. If the event is no longer
8055 interesting, resume the LWP.
8056 (handle_tracepoints): Add assert.
8057 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8058 (wstatus_maybe_breakpoint): New function.
8059 (cancel_breakpoint): Delete function.
8060 (check_stopped_by_watchpoint): New function, factored out from
8061 linux_low_filter_event.
8062 (lp_status_maybe_breakpoint): Delete function.
8063 (linux_low_filter_event): Remove filter_ptid argument.
8064 Leave thread group exits pending here. Store the LWP's stop PC.
8065 Always leave events pending.
8066 (linux_wait_for_event_filtered): Pull all events out of the
8067 kernel, and leave them all pending.
8068 (count_events_callback, select_event_lwp_callback): Consider all
8070 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8071 (select_event_lwp): Only give preference to the stepping LWP in
8072 all-stop mode. Adjust comments.
8073 (ignore_event): New function.
8074 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8075 references to cancel_breakpoints. Adjust to renames. Also give
8076 equal priority to all LWPs that have had events in non-stop mode.
8077 If reporting a software breakpoint event, unadjust the LWP's PC.
8078 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8079 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8081 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8082 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8083 (linux_stopped_by_watchpoint): Adjust.
8084 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8085 * linux-low.h (enum lwp_stop_reason): New.
8086 (struct lwp_info) <stop_pc>: Adjust comment.
8087 <stopped_by_watchpoint>: Delete field.
8088 <stop_reason>: New field.
8089 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8090 * mem-break.c (software_breakpoint_inserted_here)
8091 (hardware_breakpoint_inserted_here): New function.
8092 * mem-break.h (software_breakpoint_inserted_here)
8093 (hardware_breakpoint_inserted_here): Declare.
8094 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8095 (cancel_breakpoints): Delete.
8096 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8097 (upload_fast_traceframes): Remove references to
8100 2015-01-09 Pedro Alves <palves@redhat.com>
8102 * thread-db.c (find_new_threads_callback): Ignore thread if the
8103 kernel thread ID is -1.
8105 2015-01-09 Pedro Alves <palves@redhat.com>
8107 * linux-low.c (linux_attach_fail_reason_string): Move to
8108 nat/linux-ptrace.c, and rename.
8109 (linux_attach_lwp): Update comment.
8110 (attach_proc_task_lwp_callback): New function.
8111 (linux_attach): Adjust to rename and use
8112 linux_proc_attach_tgid_threads.
8113 (linux_attach_fail_reason_string): Delete declaration.
8115 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8117 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8118 * server.c (gdbserver_version): Likewise.
8120 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8122 * remote-utils.c: Include ctype.h.
8123 (input_interrupt): Explicitly handle the case when the char
8124 received is the NUL byte. Improve the printing of non-ASCII
8127 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8129 * linux-low.c (linux_low_filter_event): Update call to
8130 linux_enable_event_reporting following the addition of
8131 a new parameter to that function.
8133 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8136 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8137 (AARCH64_FPCR_REGNO): Likewise.
8138 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8139 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8140 (aarch64_store_fpregset): Likewise.
8142 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8144 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8145 Remove FIXME comment about assumption about N.
8147 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8149 * configure.ac: If large-file support is disabled in GDBserver,
8150 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8151 * configure: Regenerate.
8153 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8155 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8156 warning upon ENODATA from ptrace.
8157 * linux-s390-low.c (s390_store_tdb): New.
8158 (s390_regsets): Add regset for NT_S390_TDB.
8160 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8162 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8163 without a fill_function.
8164 * linux-s390-low.c (s390_fill_last_break): Remove.
8165 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8166 (s390_arch_setup): Use regset's size instead of fill_function for
8169 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8171 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8172 the regset's store function when ptrace returned an error.
8173 * regcache.c (get_thread_regcache): Invalidate register cache
8174 before fetching inferior's registers.
8176 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8178 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8179 while-loop as for-loop.
8180 (regsets_store_inferior_registers): Likewise.
8182 2014-11-28 Yao Qi <yao@codesourcery.com>
8184 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8185 * config.in, configure: Re-generate.
8186 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8189 2014-11-21 Yao Qi <yao@codesourcery.com>
8191 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8192 (AC_CHECK_HEADERS): Remove malloc.h.
8193 * configure: Re-generated.
8194 * config.in: Re-generated.
8195 * server.h: Don't include alloca.h and malloc.h.
8196 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8197 Don't include malloc.h.
8199 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8201 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8202 corresponding ERRNO check in same block.
8204 2014-11-12 Pedro Alves <palves@redhat.com>
8206 * server.c (cont_thread): Update comment.
8207 (start_inferior, attach_inferior): No longer clear cont_thread.
8208 (handle_v_cont): No longer set cont_thread.
8209 (captured_main): Clear cont_thread each time a GDB connects.
8211 2014-11-12 Pedro Alves <palves@redhat.com>
8213 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8214 thread, and don't resume all threads if the Hc thread has exited.
8216 2014-11-12 Pedro Alves <palves@redhat.com>
8218 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8219 the process group instead of to a specific LWP.
8221 2014-10-15 Pedro Alves <palves@redhat.com>
8224 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8226 (arm_set_thread_context): Delete.
8227 (the_low_target): Adjust.
8228 * win32-i386-low.c (debug_registers_changed)
8229 (debug_registers_used): Delete.
8230 (update_debug_registers_callback): New function.
8231 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8232 needing to update their debug registers.
8233 (win32_get_current_dr): New function.
8234 (x86_dr_low_get_addr, x86_dr_low_get_control)
8235 (x86_dr_low_get_status): Fetch the debug register from the thread
8237 (i386_initial_stuff): Adjust.
8238 (i386_get_thread_context): Remove current_event parameter. Don't
8239 clear debug_registers_changed nor copy DR values to
8241 (i386_set_thread_context): Delete.
8242 (i386_prepare_to_resume): New function.
8243 (i386_thread_added): Mark the thread as needing to update irs
8245 (the_low_target): Remove i386_set_thread_context and install
8246 i386_prepare_to_resume.
8247 * win32-low.c (win32_get_thread_context): Adjust.
8248 (win32_set_thread_context): Use SetThreadContext
8250 (win32_prepare_to_resume): New function.
8251 (win32_require_context): New function, factored out from ...
8252 (thread_rec): ... this.
8253 (continue_one_thread): Call win32_prepare_to_resume on each thread
8254 we're about to continue.
8255 (win32_resume): Call win32_prepare_to_resume on the event thread.
8256 * win32-low.h (struct win32_thread_info)
8257 <debug_registers_changed>: New field.
8258 (struct win32_target_ops): Change prototype of set_thread_context,
8259 delete set_thread_context and add prepare_to_resume.
8260 (win32_require_context): New declaration.
8262 2014-10-08 Gary Benson <gbenson@redhat.com>
8264 * server.h: Do not include common-exceptions.h.
8266 2014-10-08 Gary Benson <gbenson@redhat.com>
8268 * server.h: Do not include cleanups.h.
8270 2014-09-30 James Hogan <james.hogan@imgtec.com>
8272 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8275 2014-09-23 Yao Qi <yao@codesourcery.com>
8277 * linux-low.c (lp_status_maybe_breakpoint): New function.
8278 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8279 (count_events_callback): Likewise.
8280 (select_event_lwp_callback): Likewise.
8281 (cancel_breakpoints_callback): Likewise.
8283 2014-09-19 Don Breazeal <donb@codesourcery.com>
8285 * linux-low.c (handle_extended_wait): Call
8286 linux_ptrace_get_extended_event.
8287 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8288 linux_is_extended_waitstatus.
8290 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8292 * Makefile.in (CPPFLAGS): Define.
8293 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8294 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8296 2014-09-16 Gary Benson <gbenson@redhat.com>
8298 * inferiors.h (current_inferior): Renamed as...
8299 (current_thread): New variable. All uses updated.
8300 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8301 (maybe_move_out_of_jump_pad): Likewise.
8302 (cancel_breakpoint): Likewise.
8303 (linux_low_filter_event): Likewise.
8304 (wait_for_sigstop): Likewise.
8305 (linux_resume_one_lwp): Likewise.
8306 (need_step_over_p): Likewise.
8307 (start_step_over): Likewise.
8308 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8309 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8310 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8311 and save_inferior as saved_thread.
8312 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8314 (regcache_invalidate_thread): Likewise.
8315 * remote-utils.c (prepare_resume_reply): Likewise.
8316 * thread-db.c (thread_db_get_tls_address): Likewise.
8317 (disable_thread_event_reporting): Likewise.
8318 (remove_thread_event_breakpoints): Likewise.
8319 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8321 * target.h (set_desired_inferior): Renamed as...
8322 (set_desired_thread): New declaration. All uses updated.
8323 * server.c (myresume): Updated comment to reference thread instead
8325 (handle_serial_event): Likewise.
8326 (handle_target_event): Likewise.
8328 2014-09-12 Tom Tromey <tromey@redhat.com>
8329 Gary Benson <gbenson@redhat.com>
8331 * regcache.h: Include common-regcache.h.
8332 (regcache_read_pc): Don't declare.
8333 * regcache.c (get_thread_regcache_for_ptid): New function.
8335 2014-09-11 Tom Tromey <tromey@redhat.com>
8336 Gary Benson <gbenson@redhat.com>
8338 * symbol.c: New file.
8339 * Makefile.in (SFILES): Add symbol.c.
8340 (OBS): Add symbol.o.
8342 2014-09-11 Gary Benson <gbenson@redhat.com>
8344 * target.c (target_stop_ptid, target_continue_ptid): New
8347 2014-09-11 Tom Tromey <tromey@redhat.com>
8348 Gary Benson <gbenson@redhat.com>
8350 * target.h: Include target/target.h.
8351 * target.c (target_read_memory, target_read_uint32)
8352 (target_write_memory): New functions.
8354 2014-09-11 Gary Benson <gbenson@redhat.com>
8356 * server.h (debug_hw_points): Don't declare.
8357 * server.c (debug_hw_points): Don't define. Replace all uses
8358 with show_debug_regs.
8359 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8360 all uses with show_debug_regs.
8362 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8364 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8365 endianness into account.
8366 (ppc_supply_ptrace_register): Likewise.
8368 2014-09-03 James Hogan <james.hogan@imgtec.com>
8370 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8371 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8373 2014-09-03 Gary Benson <gbenson@redhat.com>
8375 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8376 ALL_DEBUG_ADDRESS_REGISTERS.
8378 2014-09-02 Gary Benson <gbenson@redhat.com>
8380 * i386-low.h: Renamed as...
8381 * x86-low.h: New file. All type, function and variable name
8382 prefixes changed from "i386_" to "x86_". All references updated.
8383 * i386-low.c: Renamed as...
8384 * x86-low.c: New file. All type, function and variable name
8385 prefixes changed from "i386_" to "x86_". All references updated.
8387 2014-09-02 Gary Benson <gbenson@redhat.com>
8389 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8390 (x86_linux_new_thread): Likewise.
8392 2014-08-29 Gary Benson <gbenson@redhat.com>
8394 * server.h (setjmp.h): Do not include.
8395 (toplevel): Do not declare.
8396 (common-exceptions.h): Include.
8397 (cleanups.h): Likewise.
8398 * server.c (toplevel): Do not define.
8399 (exit_code): New static global.
8400 (detach_or_kill_for_exit_cleanup): New function.
8401 (main): New function. Original main renamed to...
8402 (captured_main): New function.
8403 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8405 2014-08-29 Gary Benson <gbenson@redhat.com>
8407 * Makefile.in (SFILES): Add common/common-exceptions.c.
8408 (OBS): Add common-exceptions.o.
8409 (common-exceptions.o): New rule.
8410 * utils.c (prepare_to_throw_exception): New function.
8412 2014-08-29 Gary Benson <gbenson@redhat.com>
8414 * config.in: Regenerate.
8415 * configure: Likewise.
8417 2014-08-29 Gary Benson <gbenson@redhat.com>
8419 * Makefile.in (SFILES): Add common/cleanups.c.
8421 (cleanups.o): New rule.
8423 2014-08-29 Gary Benson <gbenson@redhat.com>
8425 * utils.c (internal_vwarning): New function.
8427 2014-08-28 Gary Benson <gbenson@redhat.com>
8429 * utils.h (fatal): Remove declaration.
8430 * utils.c (fatal): Remove function.
8432 2014-08-28 Gary Benson <gbenson@redhat.com>
8434 * tracepoint.c (gdb_agent_init): Replace fatal with
8436 (initialize_tracepoint): Likewise.
8438 2014-08-28 Gary Benson <gbenson@redhat.com>
8440 * remote-utils.c (remote_prepare): Replace fatal with error.
8442 2014-08-28 Gary Benson <gbenson@redhat.com>
8444 * linux-low.c (linux_async): Replace fatal with warning.
8446 (linux_start_non_stop): Return -1 if linux_async failed.
8448 2014-08-28 Gary Benson <gbenson@redhat.com>
8450 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8452 (i386_dr_low_get_addr): Remove vague comment.
8453 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8456 2014-08-28 Gary Benson <gbenson@redhat.com>
8458 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8459 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8461 (linux_resume_one_lwp): Likewise.
8462 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8464 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8465 with internal_error.
8466 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8467 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8468 (find_register_by_name): Replace fatal with internal_error.
8469 (find_regno): Likewise.
8470 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8471 * thread-db.c (thread_db_create_event): Likewise.
8472 (thread_db_load_search): Likewise.
8473 (try_thread_db_load_1): Likewise.
8474 * tracepoint.c (get_jump_space_head): Replace fatal with
8476 (claim_trampoline_space): Likewise.
8477 (have_fast_tracepoint_trampoline_buffer): Likewise.
8478 (cmd_qtstart): Likewise.
8479 (stop_tracing): Likewise.
8480 (fast_tracepoint_collecting): Likewise.
8481 (target_malloc): Likewise.
8482 (download_tracepoint): Likewise.
8483 (download_trace_state_variables): Replace check with gdb_assert.
8484 (upload_fast_traceframes): Replace fatal with internal_error.
8486 2014-08-19 Tom Tromey <tromey@redhat.com>
8487 Gary Benson <gbenson@redhat.com>
8489 * Makefile.in (SFILES): Add common/common-debug.c.
8490 (OBS): Add common-debug.o.
8491 (common-debug.o): New rule.
8492 * debug.h (debug_printf): Don't declare.
8493 * debug.c (debug_printf): Renamed and rewritten as...
8494 (debug_vprintf): New function.
8496 2014-08-19 Gary Benson <gbenson@redhat.com>
8498 * utils.h: Do not include print-utils.h.
8500 2014-08-19 Tom Tromey <tromey@redhat.com>
8501 Gary Benson <gbenson@redhat.com>
8503 * server.h: Add static assertion.
8504 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8506 2014-08-19 Tom Tromey <tromey@redhat.com>
8507 Gary Benson <gbenson@redhat.com>
8509 * Makefile.in (SFILES): Add common/errors.c.
8510 (OBS): Add errors.o.
8511 (IPA_OBS): Add errors-ipa.o.
8512 (errors.o): New rule.
8513 (errors-ipa.o): Likewise.
8514 * utils.h (perror_with_name, error, warning): Don't declare.
8515 * utils.c (warning): Renamed and rewritten as...
8516 (vwarning): New function.
8517 (error): Renamed and rewritten as...
8518 (verror): New function.
8519 (internal_error): Renamed and rewritten as...
8520 (internal_verror): New function.
8522 2014-08-07 Gary Benson <gbenson@redhat.com>
8524 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8525 * configure: Regenerate.
8526 * config.in: Likewise.
8527 * server.h: Do not include errno.h.
8528 * event-loop.c: Likewise.
8529 * hostio-errno.c: Likewise.
8530 * linux-low.c: Likewise.
8531 * remote-utils.c: Likewise.
8532 * spu-low.c: Likewise.
8533 * utils.c: Likewise.
8534 * gdbreplay.c: Unconditionally include errno.h.
8536 2014-08-07 Gary Benson <gbenson@redhat.com>
8538 * server.h: Do not include string.h.
8539 * event-loop.c: Likewise.
8540 * linux-low.c: Likewise.
8541 * regcache.c: Likewise.
8542 * remote-utils.c: Likewise.
8543 * spu-low.c: Likewise.
8544 * utils.c: Likewise.
8546 2014-08-07 Gary Benson <gbenson@redhat.com>
8548 * server.h: Do not include gdb_assert.h.
8550 2014-08-07 Gary Benson <gbenson@redhat.com>
8552 * server.h: Do not include common-utils.h.
8554 2014-08-07 Gary Benson <gbenson@redhat.com>
8556 * server.h: Do not include ptid.h.
8557 * notif.h: Likewise.
8559 2014-08-07 Gary Benson <gbenson@redhat.com>
8561 * server.h: Do not include gdb_locale.h.
8563 2014-08-07 Gary Benson <gbenson@redhat.com>
8565 * server.h: Do not include gdb/signals.h.
8566 * win32-low.c: Likewise.
8568 2014-08-07 Gary Benson <gbenson@redhat.com>
8570 * server.h: Do not include pathmax.h.
8572 2014-08-07 Gary Benson <gbenson@redhat.com>
8574 * server.h: Do not include libiberty.h.
8575 * linux-bfin-low.c: Likewise.
8577 2014-08-07 Gary Benson <gbenson@redhat.com>
8579 * server.h: Do not include ansidecl.h.
8581 2014-08-07 Gary Benson <gbenson@redhat.com>
8583 * linux-x86-low.c: Do not include stddef.h.
8584 * lynx-ppc-low.c: Likewise.
8585 * tracepoint.c: Likewise.
8587 2014-08-07 Gary Benson <gbenson@redhat.com>
8589 * server.h: Do not include stdarg.h.
8590 * nto-low.c: Likewise.
8592 2014-08-07 Gary Benson <gbenson@redhat.com>
8594 * server.h: Do not include stdlib.h.
8595 * inferiors.c: Likewise.
8596 * linux-low.c: Likewise.
8597 * regcache.c: Likewise.
8598 * spu-low.c: Likewise.
8599 * tracepoint.c: Likewise.
8600 * utils.c: Likewise.
8602 2014-08-07 Gary Benson <gbenson@redhat.com>
8604 * server.h: Do not include stdio.h.
8605 * linux-low.c: Likewise.
8606 * remote-utils.c: Likewise.
8607 * spu-low.c: Likewise.
8608 * utils.c: Likewise.
8609 * wincecompat.c: Likewise.
8611 2014-08-06 Gary Benson <gbenson@redhat.com>
8613 * regcache.c (init_register_cache): Move conditionals inside if.
8615 2014-08-06 Gary Benson <gbenson@redhat.com>
8617 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8619 2014-07-31 Gary Benson <gbenson@redhat.com>
8621 * ax.h: Do not include server.h.
8622 * gdbthread.h: Likewise.
8623 * lynx-low.h: Likewise.
8624 * notif.h: Likewise.
8626 2014-07-30 Gary Benson <gbenson@redhat.com>
8628 * server.h: Include common-defs.h.
8629 Do not include config.h or build-gnulib-gdbserver/config.h.
8631 2014-07-30 Gary Benson <gbenson@redhat.com>
8633 * hostio-errno.c: Move server.h to top of includes list.
8634 * inferiors.c: Likewise.
8635 * linux-x86-low.c: Likewise.
8636 * notif.c: Include server.h.
8638 2014-07-24 Tom Tromey <tromey@redhat.com>
8639 Gary Benson <gbenson@redhat.com>
8641 * server.h (CORE_ADDR): Now unsigned.
8643 2014-07-16 Pedro Alves <palves@redhat.com>
8645 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8647 2014-07-15 Pedro Alves <palves@redhat.com>
8649 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8652 2014-07-11 Pedro Alves <palves@redhat.com>
8654 * linux-low.c (kill_wait_lwp): New function, based on
8655 kill_one_lwp_callback, but use my_waitpid directly.
8656 (kill_one_lwp_callback, linux_kill): Use it.
8658 2014-06-23 Pedro Alves <palves@redhat.com>
8660 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8661 before setting DR0..DR3.
8663 2014-06-20 Gary Benson <gbenson@redhat.com>
8665 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8666 * configure: Regenerated.
8667 * config.in: Likewise.
8669 2014-06-20 Gary Benson <gbenson@redhat.com>
8671 * Makefile.in (SFILES): Update locations for files moved
8673 (object file files): Reordered.
8675 2014-06-20 Gary Benson <gbenson@redhat.com>
8677 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8678 (i386_dr_low_set_addr): Likewise.
8679 (i386_dr_low_get_addr): Likewise.
8680 (i386_dr_low_can_set_control): Likewise.
8681 (i386_dr_low_set_control): Likewise.
8682 (i386_dr_low_get_control): Likewise.
8683 (i386_dr_low_get_status): Likewise.
8684 (i386_get_debug_register_length): Likewise.
8685 * linux-x86-low.c (i386_dr_low_set_addr):
8686 Changed signature. Made static.
8687 (i386_dr_low_get_addr): Likewise.
8688 (i386_dr_low_set_control): Likewise.
8689 (i386_dr_low_get_control): Likewise.
8690 (i386_dr_low_get_status): Likewise.
8691 (i386_dr_low): New global variable.
8692 * win32-i386-low.c (i386_dr_low_set_addr):
8693 Changed signature. Made static.
8694 (i386_dr_low_get_addr): Likewise.
8695 (i386_dr_low_set_control): Likewise.
8696 (i386_dr_low_get_control): Likewise.
8697 (i386_dr_low_get_status): Likewise.
8698 (i386_dr_low): New global variable.
8700 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8702 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8703 * Makefile.in (AR, AR_FLAGS): Define.
8704 * configure: Regenerate.
8706 2014-06-19 Gary Benson <gbenson@redhat.com>
8708 * Makefile.in (i386-dregs.o): New rule.
8709 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8710 * i386-low.c (target.h): Remove include.
8711 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8712 (DR_CONTROL_SHIFT): Likewise.
8713 (DR_CONTROL_SIZE): Likewise.
8714 (DR_RW_EXECUTE): Likewise.
8715 (DR_RW_WRITE): Likewise.
8716 (DR_RW_READ): Likewise.
8717 (DR_RW_IORW): Likewise.
8718 (DR_LEN_1): Likewise.
8719 (DR_LEN_2): Likewise.
8720 (DR_LEN_4): Likewise.
8721 (DR_LEN_8): Likewise.
8722 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8723 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8724 (DR_ENABLE_SIZE): Likewise.
8725 (DR_LOCAL_SLOWDOWN): Likewise.
8726 (DR_GLOBAL_SLOWDOWN): Likewise.
8727 (DR_CONTROL_RESERVED): Likewise.
8728 (I386_DR_CONTROL_MASK): Likewise.
8729 (I386_DR_VACANT): Likewise.
8730 (I386_DR_LOCAL_ENABLE): Likewise.
8731 (I386_DR_GLOBAL_ENABLE): Likewise.
8732 (I386_DR_DISABLE): Likewise.
8733 (I386_DR_SET_RW_LEN): Likewise.
8734 (I386_DR_GET_RW_LEN): Likewise.
8735 (I386_DR_WATCH_HIT): Likewise.
8736 (i386_wp_op_t): Likewise.
8737 (i386_show_dr): Likewise.
8738 (i386_length_and_rw_bits): Likewise.
8739 (i386_insert_aligned_watchpoint): Likewise.
8740 (i386_remove_aligned_watchpoint): Likewise.
8741 (i386_handle_nonaligned_watchpoint): Likewise.
8742 i386_update_inferior_debug_regs(): Likewise.
8743 (i386_dr_insert_watchpoint): Likewise.
8744 (i386_dr_remove_watchpoint): Likewise.
8745 (i386_dr_region_ok_for_watchpoint): Likewise.
8746 (i386_dr_stopped_data_address): Likewise.
8747 (i386_dr_stopped_by_watchpoint): Likewise.
8749 2014-06-19 Gary Benson <gbenson@redhat.com>
8751 * i386-low.c (i386_dr_show): Renamed to
8752 i386_show_dr and made static. All uses updated.
8753 (i386_dr_length_and_rw_bits): Renamed to
8754 i386_length_and_rw_bits and made static.
8756 (i386_dr_insert_aligned_watchpoint): Renamed to
8757 i386_insert_aligned_watchpoint and made static.
8759 (i386_dr_remove_aligned_watchpoint): Renamed to
8760 i386_remove_aligned_watchpoint and made static.
8762 (i386_dr_update_inferior_debug_regs): Renamed to
8763 i386_update_inferior_debug_regs and made static.
8766 2014-06-18 Gary Benson <gbenson@redhat.com>
8768 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8769 (i386_dr_low_can_set_control): Likewise.
8770 (i386_get_debug_register_length): Likewise.
8771 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8772 (i386_dr_low_can_set_control): Likewise.
8773 (i386_get_debug_register_length): Likewise.
8775 2014-06-17 Gary Benson <gbenson@redhat.com>
8777 * i386-low.h (i386-dregs.h): New include.
8778 (DR_FIRSTADDR): Now in i386-dregs.h.
8779 (DR_LASTADDR): Likewise.
8780 (DR_NADDR): Likewise.
8781 (DR_STATUS): Likewise.
8782 (DR_CONTROL): Likewise.
8783 (i386_debug_reg_state): Likewise.
8784 (i386_dr_insert_watchpoint): Likewise.
8785 (i386_dr_remove_watchpoint): Likewise.
8786 (i386_dr_region_ok_for_watchpoint): Likewise.
8787 (i386_dr_stopped_data_address): Likewise.
8788 (i386_dr_stopped_by_watchpoint): Likewise.
8789 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8791 2014-06-18 Gary Benson <gbenson@redhat.com>
8793 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8794 i386_dr_insert_watchpoint.
8795 (i386_low_remove_watchpoint): Renamed to
8796 i386_dr_remove_watchpoint.
8797 (i386_low_region_ok_for_watchpoint): Renamed to
8798 i386_dr_region_ok_for_watchpoint.
8799 (i386_low_stopped_data_address): Renamed to
8800 i386_dr_stopped_data_address.
8801 (i386_low_stopped_by_watchpoint): Renamed to
8802 i386_dr_stopped_by_watchpoint.
8803 * i386-low.c (i386_show_dr): Renamed to
8804 i386_dr_show and made nonstatic. All uses updated.
8805 (i386_length_and_rw_bits): Renamed to
8806 i386_dr_length_and_rw_bits and made nonstatic.
8808 (i386_insert_aligned_watchpoint): Renamed to
8809 i386_dr_insert_aligned_watchpoint and made nonstatic.
8811 (i386_remove_aligned_watchpoint): Renamed to
8812 i386_dr_remove_aligned_watchpoint and made nonstatic.
8814 (i386_update_inferior_debug_regs): Renamed to
8815 i386_dr_update_inferior_debug_regs and made nonstatic.
8817 (i386_low_insert_watchpoint): Renamed to
8818 i386_dr_insert_watchpoint. All uses updated.
8819 (i386_low_remove_watchpoint): Renamed to
8820 i386_dr_remove_watchpoint. All uses updated.
8821 (i386_low_region_ok_for_watchpoint): Renamed to
8822 i386_dr_region_ok_for_watchpoint. All uses updated.
8823 (i386_low_stopped_data_address): Renamed to
8824 i386_dr_stopped_data_address. All uses updated.
8825 (i386_low_stopped_by_watchpoint): Renamed to
8826 i386_dr_stopped_by_watchpoint. All uses updated.
8828 2014-06-18 Gary Benson <gbenson@redhat.com>
8830 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8831 (i386_dr_low_can_set_control): Likewise.
8832 (i386_insert_aligned_watchpoint): New check.
8834 2014-06-18 Gary Benson <gbenson@redhat.com>
8836 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8839 2014-06-18 Gary Benson <gbenson@redhat.com>
8841 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8842 instead of fatal and error.
8843 (i386_handle_nonaligned_watchpoint): Likewise.
8845 2014-06-18 Gary Benson <gbenson@redhat.com>
8847 * i386-low.c (i386_get_debug_register_length): New macro.
8848 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8849 (i386_show_dr): Use debug_printf instead of fprintf. Use
8850 phex to format values.
8852 2014-06-18 Gary Benson <gbenson@redhat.com>
8854 * i386-low.h: Comment changes.
8855 * i386-low.c: Likewise.
8857 2014-06-18 Gary Benson <gbenson@redhat.com>
8859 * i386-low.c: Whitespace changes.
8861 2014-06-12 Tom Tromey <tromey@redhat.com>
8863 * utils.c (freeargv): Remove.
8865 2014-06-12 Tom Tromey <tromey@redhat.com>
8867 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8868 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8869 (parse_debug_format_options): Likewise.
8870 (gdbserver_usage): Likewise.
8871 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8872 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8873 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8875 ($(LIBGNU)): Depend on libiberty.
8876 (all-lib): Recurse into all subdirs.
8877 (install-only): Invoke "install" target in subdirs.
8878 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8880 * configure: Rebuild.
8881 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8882 for vasprintf, vsnprintf, or gettimeofday.
8883 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8886 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8888 * development.sh: Delete.
8889 * Makefile.in (config.status): Adjust dependency on development.sh.
8890 * configure.ac: Adjust development.sh source call.
8891 * configure: Regenerate.
8893 2014-06-02 Pedro Alves <palves@redhat.com>
8895 * ax.c (gdb_free_agent_expr): New function.
8896 * ax.h (gdb_free_agent_expr): New declaration.
8897 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8899 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8901 (clear_breakpoint_conditions_and_commands): New function.
8902 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8903 (clear_breakpoint_conditions_and_commands): New declaration.
8905 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8907 * linux-aarch64-low.c (asm/ptrace.h): Include.
8909 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8911 Fix TLS access for -static -pthread.
8912 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8913 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8914 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8916 2014-05-20 Pedro Alves <palves@redhat.com>
8918 * linux-aarch64-low.c (aarch64_insert_point)
8919 (aarch64_remove_point): No longer check whether the type is
8920 supported here. Adjust to new interface.
8921 (the_low_target): Install aarch64_supports_z_point_type as
8922 supports_z_point_type method.
8923 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8924 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8925 instead of a Z packet char. Adjust.
8926 (arm_supports_z_point_type): New function.
8927 (arm_insert_point, arm_remove_point): Adjust to new interface.
8928 (the_low_target): Install arm_supports_z_point_type.
8929 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8930 (cris_insert_point, cris_remove_point): Adjust to new interface.
8931 Don't check whether the type is supported here.
8932 (the_low_target): Install cris_supports_z_point_type.
8933 * linux-low.c (linux_supports_z_point_type): New function.
8934 (linux_insert_point, linux_remove_point): Adjust to new interface.
8935 * linux-low.h (struct linux_target_ops) <insert_point,
8936 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8937 raw_breakpoint pointer parameter.
8938 <supports_z_point_type>: New method.
8939 * linux-mips-low.c (mips_supports_z_point_type): New function.
8940 (mips_insert_point, mips_remove_point): Adjust to new interface.
8941 Use mips_supports_z_point_type.
8942 (the_low_target): Install mips_supports_z_point_type.
8943 * linux-ppc-low.c (the_low_target): Install NULL as
8944 supports_z_point_type method.
8945 * linux-s390-low.c (the_low_target): Install NULL as
8946 supports_z_point_type method.
8947 * linux-sparc-low.c (the_low_target): Install NULL as
8948 supports_z_point_type method.
8949 * linux-x86-low.c (x86_supports_z_point_type): New function.
8950 (x86_insert_point): Adjust to new insert_point interface. Use
8951 insert_memory_breakpoint. Adjust to new
8952 i386_low_insert_watchpoint interface.
8953 (x86_remove_point): Adjust to remove_point interface. Use
8954 remove_memory_breakpoint. Adjust to new
8955 i386_low_remove_watchpoint interface.
8956 (the_low_target): Install x86_supports_z_point_type.
8957 * lynx-low.c (lynx_target_ops): Install NULL as
8958 supports_z_point_type callback.
8959 * nto-low.c (nto_supports_z_point_type): New.
8960 (nto_insert_point, nto_remove_point): Adjust to new interface.
8961 (nto_target_ops): Install nto_supports_z_point_type.
8962 * mem-break.c: Adjust intro comment.
8963 (struct raw_breakpoint) <raw_type, size>: New fields.
8964 <inserted>: Update comment.
8965 <shlib_disabled>: Delete field.
8966 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8967 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8968 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8969 (raw_bkpt_type_to_target_hw_bp_type): New function.
8970 (find_enabled_raw_code_breakpoint_at): New function.
8971 (find_raw_breakpoint_at): New type and size parameters. Use them.
8972 (insert_memory_breakpoint): New function, based off
8973 set_raw_breakpoint_at.
8974 (remove_memory_breakpoint): New function.
8975 (set_raw_breakpoint_at): Reimplement.
8976 (set_breakpoint): New, based on set_breakpoint_at.
8977 (set_breakpoint_at): Reimplement.
8978 (delete_raw_breakpoint): Go through the_target->remove_point
8979 instead of assuming memory breakpoints.
8980 (find_gdb_breakpoint_at): Delete.
8981 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8982 (find_gdb_breakpoint): New function.
8983 (set_gdb_breakpoint_at): Delete.
8984 (z_type_supported): New function.
8985 (set_gdb_breakpoint_1): New function, loosely based off
8986 set_gdb_breakpoint_at.
8987 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8988 (delete_gdb_breakpoint_at): Delete.
8989 (delete_gdb_breakpoint_1): New function, loosely based off
8990 delete_gdb_breakpoint_at.
8991 (delete_gdb_breakpoint): New function.
8992 (clear_gdb_breakpoint_conditions): Rename to ...
8993 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8995 (add_condition_to_breakpoint): Make static.
8996 (add_breakpoint_condition): Take a struct breakpoint pointer
8997 instead of an address. Adjust.
8998 (gdb_condition_true_at_breakpoint): Rename to ...
8999 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9001 (gdb_condition_true_at_breakpoint): Reimplement.
9002 (add_breakpoint_commands): Take a struct breakpoint pointer
9003 instead of an address. Adjust.
9004 (gdb_no_commands_at_breakpoint): Rename to ...
9005 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9006 parameter. Return true if no breakpoint was found. Change debug
9008 (gdb_no_commands_at_breakpoint): Reimplement.
9009 (run_breakpoint_commands): Rename to ...
9010 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9011 and change return type to boolean.
9012 (run_breakpoint_commands): New function.
9013 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9014 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9015 breakpoint. Go through the_target->remove_point instead of
9016 assuming memory breakpoint.
9017 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9018 software and hardware breakpoints.
9019 (reinsert_raw_breakpoint): Go through the_target->insert_point
9020 instead of assuming memory breakpoint.
9021 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9022 software and hardware breakpoints.
9023 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9024 Check both software and hardware breakpoints.
9025 (validate_inserted_breakpoint): Assert the breakpoint is a
9026 software breakpoint. Set the inserted flag to -1 instead of
9027 setting shlib_disabled.
9028 (delete_disabled_breakpoints): Adjust.
9029 (validate_breakpoints): Only validate software breakpoints.
9030 Adjust to inserted flag change.
9031 (check_mem_read, check_mem_write): Skip breakpoint types other
9032 than software breakpoints. Adjust to inserted flag change.
9033 * mem-break.h (enum raw_bkpt_type): New enum.
9034 (raw_breakpoint, struct process_info): Forward declare.
9035 (Z_packet_to_target_hw_bp_type): Delete declaration.
9036 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9037 (set_gdb_breakpoint, delete_gdb_breakpoint)
9038 (clear_breakpoint_conditions): New declarations.
9039 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9040 (breakpoint_inserted_here): Update comment.
9041 (add_breakpoint_condition, add_breakpoint_commands): Replace
9042 address parameter with a breakpoint pointer parameter.
9043 (gdb_breakpoint_here): Update comment.
9044 (delete_gdb_breakpoint_at): Delete.
9045 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9046 * server.c (process_point_options): Take a struct breakpoint
9047 pointer instead of an address. Adjust.
9048 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9049 delete_gdb_breakpoint.
9050 * spu-low.c (spu_target_ops): Install NULL as
9051 supports_z_point_type method.
9052 * target.h: Include mem-break.h.
9053 (struct target_ops) <prepare_to_access_memory>: Update comment.
9054 <supports_z_point_type>: New field.
9055 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9056 instead of a char. Also take a raw breakpoint pointer.
9057 * win32-arm-low.c (the_low_target): Install NULL as
9058 supports_z_point_type.
9059 * win32-i386-low.c (i386_supports_z_point_type): New function.
9060 (i386_insert_point, i386_remove_point): Adjust to new interface.
9061 (the_low_target): Install i386_supports_z_point_type.
9062 * win32-low.c (win32_supports_z_point_type): New function.
9063 (win32_insert_point, win32_remove_point): Adjust to new interface.
9064 (win32_target_ops): Install win32_supports_z_point_type.
9065 * win32-low.h (struct win32_target_ops):
9066 <supports_z_point_type>: New method.
9067 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9068 instead of a char. Also take a raw breakpoint pointer.
9070 2014-05-20 Pedro Alves <palves@redhat.com>
9072 * mem-break.h: Include break-common.h.
9073 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9074 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9075 (Z_packet_to_target_hw_bp_type): New declaration.
9076 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9077 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9078 (Z_PACKET_ACCESS_WP): Delete macros.
9079 (Z_packet_to_hw_type): Delete function.
9080 * i386-low.h: Don't include break-common.h here.
9081 (Z_packet_to_hw_type): Delete declaration.
9082 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9083 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9084 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9085 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9086 * linux-aarch64-low.c: Don't include break-common.h here.
9087 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9088 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9089 (Z_packet_to_target_hw_bp_type): Delete function.
9090 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9092 (mips_insert_point, mips_remove_point): Use
9093 Z_packet_to_target_hw_bp_type.
9095 2014-05-20 Pedro Alves <palves@redhat.com>
9097 * linux-aarch64-low.c: Include break-common.h.
9098 (enum target_point_type): Delete.
9099 (Z_packet_to_point_type): Rename to ...
9100 (Z_packet_to_target_hw_bp_type): ... this, and return a
9101 target_hw_bp_type instead.
9102 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9103 instead of an enum target_point_type.
9104 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9106 (aarch64_dr_state_insert_one_point)
9107 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9108 (aarch64_handle_aligned_watchpoint)
9109 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9110 Take an enum target_hw_bp_type instead of an enum
9112 (aarch64_supports_z_point_type): New function.
9113 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9114 use Z_packet_to_target_hw_bp_type.
9116 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9118 * configure.ac: Only use -Werror by default when DEVELOPMENT
9120 * configure: Regenerate.
9122 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9124 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9125 * linux-x86-low.c (X86_64_USER_REGS): New.
9126 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9128 2014-04-28 Yao Qi <yao@codesourcery.com>
9130 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9133 2014-04-25 Pedro Alves <palves@redhat.com>
9136 * linux-low.c (linux_attach_fail_reason_string): New function.
9137 (linux_attach_lwp): Delete.
9138 (linux_attach_lwp_1): Rename to ...
9139 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9140 argument. Remove "initial" parameter. Return int instead of
9141 void. Don't error or warn here.
9142 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9143 failure to attach to the tgid. Call warning when failing to
9145 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9146 argument. Remove "initial" parameter. Return int instead of
9147 void. Don't error or warn here.
9148 (linux_attach_fail_reason_string): New declaration.
9149 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9150 interface change. Use linux_attach_fail_reason_string.
9152 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9153 Walfred Tedeschi <walfred.tedeschi@intel.com>
9155 * Makefile.in: Added rules to handle new files
9156 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9157 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9158 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9159 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9160 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9161 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9163 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9164 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9165 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9166 i386/x32-avx512.xml.
9167 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9168 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9169 i386/x32-avx512-linux.xml.
9170 * i387-fp.c (num_avx512_k_registers): New constant for number
9172 (num_avx512_zmmh_low_registers): New constant for number of
9173 lower ZMM registers (0-15).
9174 (num_avx512_zmmh_high_registers): New constant for number of
9175 higher ZMM registers (16-31).
9176 (num_avx512_ymmh_registers): New contant for number of higher
9177 YMM registers (ymm16-31 added by avx521 on x86_64).
9178 (num_avx512_xmm_registers): New constant for number of higher
9179 XMM registers (xmm16-31 added by AVX512 on x86_64).
9180 (struct i387_xsave): Add space for AVX512 registers.
9181 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9182 Add code to handle AVX512 registers.
9183 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9184 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9185 prototypei from generated file.
9186 (tdesc_amd64_avx512_linux): Likewise.
9187 (init_registers_x32_avx512_linux): Likewise.
9188 (tdesc_x32_avx512_linux): Likewise.
9189 (init_registers_i386_avx512_linux): Likewise.
9190 (tdesc_i386_avx512_linux): Likewise.
9191 (x86_64_regmap): Add AVX512 registers.
9192 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9194 (initialize_low_arch): Add code to initialize AVX512 registers.
9196 2014-04-23 Pedro Alves <palves@redhat.com>
9198 * mem-break.c (find_gdb_breakpoint_at): Make static.
9199 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9201 2014-04-23 Pedro Alves <palves@redhat.com>
9203 * i386-low.c: Don't include break-common.h here.
9204 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9205 prototype to take target_hw_bp_type as argument instead of a Z
9207 * i386-low.h: Include break-common.h here.
9208 (Z_packet_to_hw_type): Declare.
9209 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9211 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9212 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9213 (x86_remove_point): Convert the packet number to a
9214 target_hw_bp_type before calling i386_low_remove_watchpoint.
9215 * win32-i386-low.c (i386_insert_point): Convert the packet number
9216 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9217 (i386_remove_point): Convert the packet number to a
9218 target_hw_bp_type before calling i386_low_remove_watchpoint.
9220 2014-04-23 Pedro Alves <palves@redhat.com>
9222 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9224 2014-04-10 Pedro Alves <palves@redhat.com>
9226 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9227 Check if the condition or command is NULL before checking if the
9228 breakpoint is known. On success, return true.
9229 * mem-break.h (add_breakpoint_condition): Document return.
9230 (add_breakpoint_commands): Add describing comment.
9231 * server.c (skip_to_semicolon): New function.
9232 (process_point_options): Use it.
9234 2014-04-09 Pedro Alves <palves@redhat.com>
9236 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9239 2014-02-27 Pedro Alves <palves@redhat.com>
9242 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9244 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9246 (last_thread_of_process_p): Take a PID argument instead of a
9248 (linux_wait_for_lwp): Delete.
9249 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9251 (linux_low_filter_event): New function, party factored out from
9252 linux_wait_for_event.
9253 (linux_wait_for_event): Rename to ...
9254 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9255 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9256 sigsuspend. Check for zombie leaders.
9257 (linux_wait_for_event): Reimplement as wrapper around
9258 linux_wait_for_event_filtered.
9259 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9260 a normal or signal exit is seen, it's the whole process exiting.
9261 (wait_for_sigstop): No longer a for_each_inferior callback.
9262 Rewrite on top of linux_wait_for_event_filtered.
9263 (stop_all_lwps): Call wait_for_sigstop directly.
9264 * server.c (resume, handle_target_event): Handle
9265 TARGET_WAITKIND_NO_RESUMED.
9267 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9269 * win32-low.c (psapi_get_dll_name,
9270 * win32_CreateToolhelp32Snapshot): Delete.
9271 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9272 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9274 (handle_load_dll): Add function description.
9275 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9277 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9279 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9281 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9282 base address when calling win32_add_one_solib.
9283 (handle_load_dll): Delete local variable load_addr.
9284 Remove 0x1000 offset applied to DLL base address when calling
9285 win32_add_one_solib.
9286 (handle_unload_dll): Add comment.
9288 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9290 * win32-low.c (win32_add_all_dlls): Renames
9291 win32_ensure_ntdll_loaded. Rewrite function documentation.
9292 Adjust implementation to always load all DLLs.
9293 Add 0x1000 offset to DLL base address when calling
9294 win32_add_one_solib.
9295 (child_initialization_done): New static global.
9296 (do_initial_child_stuff): Set child_initialization_done to
9297 zero during child initialization, and 1 after. Replace call
9298 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9300 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9301 (handle_unload_dll): Add function documentation.
9302 (get_child_debug_event): Ignore load and unload DLL events
9303 during child initialization.
9305 2014-02-20 Doug Evans <dje@google.com>
9307 Remove global all_lwps.
9308 * inferiors.h (ptid_of): Move here from linux-low.h.
9309 (pid_of, lwpid_of): Ditto.
9310 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9311 parameter is a struct thread_info * now.
9312 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9313 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9314 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9316 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9317 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9318 * linux-arm-low.c (update_registers_callback): Update, "entry"
9319 parameter is a struct thread_info * now.
9320 Fetch lwpid from current_inferior directly.
9321 (arm_insert_point): Pass &all_threads to find_inferior instead of
9323 (arm_remove_point): Ditto.
9324 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9325 (arm_prepare_to_resume): Fetch pid from thread.
9326 (arm_read_description): Fetch lwpid from current_inferior directly.
9327 * linux-low.c (all_lwps): Delete.
9328 (delete_lwp): Delete call to remove_inferior.
9329 (handle_extended_wait): Fetch lwpid from thread.
9330 (add_lwp): Don't set lwp->entry.id. Remove call to
9331 add_inferior_to_list.
9332 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9333 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9334 (kill_one_lwp_callback): Ditto.
9335 (linux_kill): Don't dereference NULL pointer.
9336 Fetch ptid,lwpid from thread.
9337 (get_detach_signal): Fetch ptid from thread.
9338 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9339 Simplify call to regcache_invalidate_thread.
9340 (delete_lwp_callback): Update, "entry" parameter is a
9341 struct thread_info * now. Fetch pid from thread.
9342 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9343 (status_pending_p_callback): Update, "entry" parameter is a
9344 struct thread_info * now. Fetch ptid from thread.
9345 (find_lwp_pid): Update, "entry" parameter is a
9346 struct thread_info * now.
9347 (linux_wait_for_lwp): Fetch pid from thread.
9348 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9349 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9350 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9351 (dequeue_one_deferred_signal): Ditto.
9352 (cancel_breakpoint): Fetch ptid from current_inferior.
9353 (linux_wait_for_event): Pass &all_threads to find_inferior,
9354 not &all_lwps. Fetch ptid, lwpid from thread.
9355 (count_events_callback): Update, "entry" parameter is a
9356 struct thread_info * now.
9357 (select_singlestep_lwp_callback): Ditto.
9358 (select_event_lwp_callback): Ditto.
9359 (cancel_breakpoints_callback): Ditto.
9360 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9362 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9363 (unsuspend_one_lwp): Update, "entry" parameter is a
9364 struct thread_info * now.
9365 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9367 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9368 Fetch lwpid from thread, not lwp.
9369 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9370 Pass &all_threads to find_inferior, not &all_lwps.
9371 (send_sigstop): Fetch lwpid from thread, not lwp.
9372 (send_sigstop_callback): Update, "entry" parameter is a
9373 struct thread_info * now.
9374 (suspend_and_send_sigstop_callback): Ditto.
9375 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9376 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9377 struct thread_info * now.
9378 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9380 (lwp_running): Update, "entry" parameter is a
9381 struct thread_info * now.
9382 (stop_all_lwps): Fetch ptid from thread.
9383 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9384 (linux_resume_one_lwp): Fetch lwpid from thread.
9385 (linux_set_resume_request): Update, "entry" parameter is a
9386 struct thread_info * now. Fetch pid, lwpid from thread.
9387 (resume_status_pending_p): Update, "entry" parameter is a
9388 struct thread_info * now.
9389 (need_step_over_p): Ditto. Fetch lwpid from thread.
9390 (start_step_over): Fetch lwpid from thread.
9391 (linux_resume_one_thread): Update, "entry" parameter is a
9392 struct thread_info * now. Fetch lwpid from thread.
9393 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9394 (proceed_one_lwp): Update, "entry" parameter is a
9395 struct thread_info * now. Fetch lwpid from thread.
9396 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9397 struct thread_info * now.
9398 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9399 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9400 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9402 (regsets_store_inferior_registers): Ditto.
9403 (fetch_register, store_register): Ditto.
9404 (linux_read_memory, linux_write_memory): Ditto.
9405 (linux_request_interrupt): Ditto.
9406 (linux_read_auxv): Ditto.
9407 (linux_xfer_siginfo): Ditto.
9408 (linux_qxfer_spu): Ditto.
9409 (linux_qxfer_libraries_svr4): Ditto.
9410 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9411 moved to inferiors.h.
9413 (get_thread_lwp): Update.
9414 (struct lwp_info): Delete member "entry". Simplify comment for
9417 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9418 current_inferior directly.
9419 (update_watch_registers_callback): Update, "entry" parameter is a
9420 struct thread_info * now. Fetch pid from thread.
9421 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9422 (mips_insert_point): Fetch lwpid from current_inferior.
9423 Pass &all_threads to find_inferior, not &all_lwps.
9424 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9425 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9427 (mips_stopped_data_address): Ditto.
9428 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9430 * linux-tile-low.c (tile_arch_setup): Ditto.
9431 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9432 (update_debug_registers_callback): Update, "entry" parameter is a
9433 struct thread_info * now. Fetch pid from thread.
9434 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9435 Pass &all_threads to find_inferior, not &all_lwps.
9436 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9437 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9438 Pass &all_threads to find_inferior, not &all_lwps.
9439 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9440 (i386_dr_low_get_status): Ditto.
9441 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9442 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9443 (x86_linux_read_description): Ditto.
9444 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9446 2014-02-20 Doug Evans <dje@google.com>
9448 * inferiors.c (get_first_inferior): Fix buglet.
9450 2014-02-19 Doug Evans <dje@google.com>
9452 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9453 * inferiors.c (add_thread): Change result type to struct thread_info *.
9454 All callers updated.
9455 (add_lwp): Call add_thread here instead of in callers.
9456 All callers updated.
9457 * linux-low.h (get_lwp_thread): Rewrite.
9458 (struct lwp_info): New member "thread".
9460 2014-02-19 Doug Evans <dje@google.com>
9462 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9463 All callers updated.
9465 2014-02-19 Doug Evans <dje@google.com>
9467 * inferiors.c (add_thread): Fix whitespace.
9469 2014-02-19 Doug Evans <dje@google.com>
9471 * dll.c (clear_dlls): Replace accessing list implemention details
9473 * gdbthread.h (get_first_thread): Declare.
9474 * inferiors.c (for_each_inferior_with_data): New function.
9475 (get_first_thread): New function.
9476 (find_thread_ptid): Simplify.
9477 (get_first_inferior): New function.
9478 (clear_list): Delete.
9479 (one_inferior_p): New function.
9480 (clear_inferior_list): New function.
9481 (clear_inferiors): Update.
9482 * inferiors.h (for_each_inferior_with_data): Declare.
9483 (clear_inferior_list): Declare.
9484 (one_inferior_p): Declare.
9485 (get_first_inferior): Declare.
9486 * linux-low.c (linux_wait_for_event): Replace accessing list
9487 implemention details with API function.
9488 * server.c (target_running): Ditto.
9489 (accumulate_file_name_length): New function.
9490 (emit_dll_description): New function.
9491 (handle_qxfer_libraries): Replace accessing list implemention
9492 details with API function.
9493 (handle_qxfer_threads_worker): New function.
9494 (handle_qxfer_threads_proper): Replace accessing list implemention
9495 details with API function.
9496 (handle_query): Ditto.
9497 (visit_actioned_threads_callback_ftype): New typedef.
9498 (visit_actioned_threads_data): New struct.
9499 (visit_actioned_threads): Rewrite to be find_inferior callback.
9500 (resume): Call find_inferior.
9501 (handle_status): Replace accessing list implemention
9502 details with API function.
9503 (process_serial_event): Replace accessing list implemention details
9505 * target.c (set_desired_inferior): Replace accessing list implemention
9506 details with API function.
9507 * tracepoint.c (same_process_p): New function.
9508 (gdb_agent_about_to_close): Replace accessing list implemention
9509 details with API function.
9510 * win32-low.c (child_delete_thread): Replace accessing list
9511 implemention details with API function.
9512 (match_dll_by_basename): New function.
9513 (dll_is_loaded_by_basename): New function.
9514 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9515 details call to dll_is_loaded_by_basename.
9517 2014-02-19 Doug Evans <dje@google.com>
9519 * dll.h (struct dll_info): Add comment.
9520 * gdbthread.h (struct thread_info): Add comment.
9521 (current_ptid): Simplify.
9522 * inferiors.c (add_process): Update.
9523 (remove_process): Update.
9524 * inferiors.h (struct process_info): Rename member "head" to "entry".
9525 * linux-low.c (delete_lwp): Update.
9527 (last_thread_of_process_p): Update.
9528 (kill_one_lwp_callback, linux_kill): Update.
9529 (status_pending_p_callback): Update.
9530 (wait_for_sigstop): Update. Simplify read of ptid.
9531 (start_step_over): Update.
9532 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9533 (get_lwp_thread): Update.
9534 (struct lwp_info): Rename member "head" to "entry".
9535 * regcache.h (inferior_list_entry): Delete.
9536 * server.c (kill_inferior_callback): Update.
9537 (detach_or_kill_inferior_callback): Update.
9538 (print_started_pid): Update.
9539 (print_attached_pid): Update.
9540 (process_serial_event): Simplify read of ptid.
9541 * thread-db.c (thread_db_create_event): Update.
9542 (thread_db_get_tls_address): Update.
9543 * win32-low.c (current_inferior_ptid): Simplify.
9545 2014-02-19 Tom Tromey <tromey@redhat.com>
9547 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9549 (target_supports_btrace): Update.
9551 2014-02-14 Yao Qi <yao@codesourcery.com>
9553 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9554 (rsp-low-ipa.o): New target.
9556 2014-02-12 Tom Tromey <tromey@redhat.com>
9558 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9559 convert_ascii_to_int.
9560 * regcache.c (registers_to_string): Likewise.
9561 * remote-utils.c (decode_M_packet): Likewise.
9562 * server.c (process_serial_event): Likewise.
9564 2014-02-12 Tom Tromey <tromey@redhat.com>
9566 * server.c (handle_query, handle_v_run): Use hex2bin, not
9568 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9570 2014-02-12 Tom Tromey <tromey@redhat.com>
9572 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9573 convert_int_to_ascii.
9574 * regcache.c (registers_to_string, collect_register_as_string):
9576 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9578 * server.c (process_serial_event): Likewise.
9579 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9580 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9582 2014-02-12 Tom Tromey <tromey@redhat.com>
9584 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9585 bin2hex, not hexify.
9586 * tracepoint.c (cmd_qtstatus): Likewise.
9588 2014-02-12 Tom Tromey <tromey@redhat.com>
9590 * remote-utils.c (monitor_output): Pass explicit length to
9593 2014-02-12 Tom Tromey <tromey@redhat.com>
9595 * tracepoint.c: Include rsp-low.h.
9596 * server.c: Include rsp-low.h.
9597 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9598 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9600 * remote-utils.c: Include rsp-low.h.
9601 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9602 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9603 (convert_int_to_ascii, convert_ascii_to_int): Move to
9605 * regcache.c: Include rsp-low.h.
9606 * ax.c: Include rsp-low.h.
9607 * Makefile.in (SFILES): Add common/rsp-low.c.
9608 (OBS): Add rsp-low.o.
9609 (rsp-low.o): New target.
9611 2014-02-12 Tom Tromey <tromey@redhat.com>
9613 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9614 Include print-utils.h.
9615 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9616 (plongest, thirty_two, phex_nz): Remove.
9617 * Makefile.in (SFILES): Add common/print-utils.c.
9618 (OBS): Add print-utils.o.
9619 (print-utils-ipa.o): New target.
9620 (print-utils.o): New target.
9621 (IPA_OBJS): Add print-utils-ipa.o.
9623 2014-02-06 Tom Tromey <tromey@redhat.com>
9625 * Makefile.in (SFILES): Fix indentation.
9627 2014-02-05 Doug Evans <dje@google.com>
9629 * linux-low.c (linux_wait_for_event): Improve comment.
9630 (linux_wait_1): Keep current_inferior in sync with event_child.
9632 2014-01-22 Doug Evans <dje@google.com>
9634 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9636 2014-01-22 Doug Evans <dje@google.com>
9638 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9639 * configure: Regenerate.
9640 * config.in: Regenerate.
9641 * Makefile.in (SFILES): Add debug.c.
9643 * debug.c: New file.
9644 * debug.h: New file.
9645 * linux-aarch64-low.c (*): Update all debugging printfs to use
9646 debug_printf instead of fprintf.
9647 * linux-arm-low.c (*): Ditto.
9648 * linux-cris-low.c (*): Ditto.
9649 * linux-crisv32-low.c (*): Ditto.
9650 * linux-m32r-low.c (*): Ditto.
9651 * linux-sparc-low.c (*): Ditto.
9652 * linux-x86.c (*): Ditto.
9653 * linux-low.c (*): Ditto.
9654 (linux_wait_1): Add calls to debug_enter, debug_exit.
9655 (linux_wait): Remove redundant debugging printf.
9656 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9657 (linux_resume, unstop_all_lwps): Ditto.
9658 * mem-break.c (*): Update all debugging printfs to use
9659 debug_printf instead of fprintf.
9660 * remote-utils.c (*): Ditto.
9661 * thread-db.c (*): Ditto.
9662 * server.c #include <ctype.h>, "gdb_vecs.h".
9663 (debug_threads): Moved to debug.c.
9664 (*): Update all debugging printfs to use debug_printf instead of
9666 (start_inferior): Replace call to fflush with call to debug_flush.
9667 (monitor_show_help): Mention set debug-format.
9668 (parse_debug_format_options): New function.
9669 (handle_monitor_command): Handle "monitor set debug-format".
9670 (gdbserver_usage): Mention --debug-format.
9671 (main): Parse --debug-format.
9672 * server.h (debug_threads): Declaration moved to debug.h.
9674 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9675 trace_debug_1 that uses debug_printf.
9676 (tracepoint_look_up_symbols): Update all debugging printfs to use
9677 debug_printf instead of fprintf.
9679 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9681 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9684 2014-01-17 Pedro Alves <palves@redhat.com>
9687 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9688 defined after including gdb_proc_service.h.
9690 2014-01-16 Doug Evans <dje@google.com>
9692 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9693 (match_dll): Use it.
9695 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9697 * target.h (target_ops) <read_btrace>: Change parameters and
9698 return type to allow error reporting.
9699 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9700 trace reading errors on.
9701 * linux-low.c (linux_low_read_btrace): Pass trace reading
9703 (linux_low_disable_btrace): New.
9705 2014-01-15 Doug Evans <dje@google.com>
9707 * inferiors.c (thread_id_to_gdb_id): Delete.
9708 * inferiors.h (thread_id_to_gdb_id): Delete.
9710 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9712 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9713 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9716 2014-01-08 Pedro Alves <palves@redhat.com>
9718 * server.c (handle_status): Don't discard previous queued stop
9719 replies or thread's pending status here.
9720 (main) <disconnection>: Do it here instead.
9722 2014-01-08 Pedro Alves <palves@redhat.com>
9724 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9725 * server.c (visit_actioned_threads, handle_pending_status): New
9727 (handle_v_cont): Factor out parts to ...
9728 (resume): ... this new function. If in all-stop, and a thread
9729 being resumed has a pending status, report it without actually
9731 (myresume): Adjust to use the new 'resume' function.
9732 (clear_pending_status_callback, set_pending_status_callback)
9733 (find_status_pending_thread_callback): New functions.
9734 (handle_status): Handle the case of multiple threads having
9735 interesting statuses to report. Report threads' real last signal
9736 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9737 with an interesting thread to report the status for, instead of
9738 always reporting the status of the first thread.
9740 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9742 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9743 * gdbreplay.c (gdbreplay_version): Likewise.
9745 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9747 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9748 iov.iov_len with the real length in use.
9750 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9752 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9753 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9754 for all targets that use win32-low.c.
9755 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9756 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9758 2013-12-13 Pedro Alves <palves@redhat.com>
9760 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9761 if equal to TARGET_WAITKIND_LOADED.
9762 * win32-low.c (cached_status): New static global.
9763 (win32_wait): Add declaration.
9764 (do_initial_child_stuff): Flush all initial pending debug events
9765 up to the initial breakpoint.
9766 (win32_wait): If CACHED_STATUS was set, return that instead
9767 of doing a real wait. Remove the code resuming the execution
9768 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9769 during the initial phase. Also remove the code changing
9770 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9771 TARGET_WAITKIND_STOPPED.
9773 2013-12-11 Yao Qi <yao@codesourcery.com>
9775 * notif.c (handle_notif_ack): Return 0 if no notification
9778 2013-11-20 Doug Evans <dje@google.com>
9780 * linux-low.c (linux_set_resume_request): Fix comment.
9782 2013-11-20 Doug Evans <dje@google.com>
9784 * linux-low.c (resume_status_pending_p): Tweak comment.
9786 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9788 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9789 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9790 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9791 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9792 (srv_amd64_regobj): Add amd64-mpx.o.
9793 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9794 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9795 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9796 * i387-fp.c (num_pl_bnd_register) Added constant.
9797 (num_pl_bnd_cfg_registers) Added constant.
9798 (struct i387_xsave) Added reserved area and MPX fields.
9799 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9800 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9802 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9803 (init_registers_amd64_mpx_linux): Declare new function.
9804 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9805 (x86_64_regmap): Add MPX registers.
9806 (x86_linux_read_description): Add MPX case.
9807 (initialize_low_arch): Initialize MPX targets.
9809 2013-11-18 Tom Tromey <tromey@redhat.com>
9811 * configure: Rebuild.
9812 * configure.ac: Don't check for stdlib.h.
9813 * gdbreplay.c: Unconditionally include stdlib.h.
9815 2013-11-18 Tom Tromey <tromey@redhat.com>
9817 * config.in: Rebuild.
9818 * configure: Rebuild.
9819 * configure.ac: Don't use AC_HEADER_DIRENT.
9821 2013-11-18 Tom Tromey <tromey@redhat.com>
9823 * server.h: Don't check HAVE_STRING_H.
9824 * gdbreplay.c: Don't check HAVE_STRING_H.
9825 * configure: Rebuild.
9827 2013-11-18 Tom Tromey <tromey@redhat.com>
9829 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9832 2013-11-08 Tom Tromey <tromey@redhat.com>
9834 * configure, config.in: Rebuild.
9835 * configure.ac: Remove unused configury.
9837 2013-11-08 Tom Tromey <tromey@redhat.com>
9839 * acinclude.m4: Include common.m4, codeset.m4.
9840 * configure, config.in: Rebuild.
9841 * configure.ac: Use GDB_AC_COMMON.
9843 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9845 * linux-s390-low.c (HWCAP_S390_TE): New define.
9846 (s390_arch_setup): Consider the TE field in the HWCAP for
9847 determining 'have_regset_tdb'.
9849 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9852 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9855 2013-10-02 Pedro Alves <palves@redhat.com>
9857 * server.c (process_serial_event): Don't output "GDBserver
9858 exiting" if GDB is connected through stdio.
9859 * target.c (mywait): Likewise, be silent if GDB is connected
9862 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9864 * lynx-low.c (lynx_add_threads_after_attach): New function.
9865 (lynx_attach): Remove call to add_thread. Add call to
9866 lynx_add_threads_after_attach instead.
9868 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9870 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9871 * config.in, configure: Regenerated.
9873 2013-09-18 Yao Qi <yao@codesourcery.com>
9876 * server.c (start_inferior): Clear 'resume_info'.
9878 2013-09-16 Jiong Wang <jiwang@tilera.com>
9880 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9883 2013-09-16 Jiong Wang <jiwang@tilera.com>
9885 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9886 linux-tile-low.o to srv_tgtobj.
9888 2013-09-16 Will Newton <will.newton@linaro.org>
9890 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9893 2013-09-06 Pedro Alves <palves@redhat.com>
9895 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9896 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9897 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9898 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9899 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9900 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9902 2013-09-06 Pedro Alves <palves@redhat.com>
9904 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9905 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9907 2013-09-06 Pedro Alves <palves@redhat.com>
9909 * linux-amd64-ipa.c: Include tracepoint.h.
9910 * linux-i386-ipa.c: Include tracepoint.h.
9912 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9914 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9915 (ps_get_thread_area): New function.
9917 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9919 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9920 (initialize_low_arch): Call init_registers_crisv32 rather than
9921 init_register_crisv32.
9923 2013-09-05 Pedro Alves <palves@redhat.com>
9925 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9927 * hostio.h: ... this new file.
9928 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9929 win32-low.c: Include hostio.h.
9931 2013-09-05 Pedro Alves <palves@redhat.com>
9933 * server.h (gdb_client_data, handler_func, callback_handler_func)
9934 (delete_file_handler, add_file_handler, append_callback_event)
9935 (delete_callback_event, start_event_loop, initialize_event_loop):
9936 Move to event-loop.h and include it.
9937 * event-loop.h: New file.
9939 2013-09-05 Pedro Alves <palves@redhat.com>
9941 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9942 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9943 (loaded_dll, unloaded_dll): Move to ...
9944 * dll.h: ... this new file.
9945 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9947 2013-09-05 Pedro Alves <palves@redhat.com>
9949 * server.h (current_process, get_thread_process, all_processes)
9950 (add_inferior_to_list, for_each_inferior, current_inferior)
9951 (remove_inferior, add_process, remove_process, find_process_pid)
9952 (have_started_inferiors_p, have_attached_inferiors_p)
9953 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9954 (clear_inferiors, find_inferior, find_inferior_id)
9955 (inferior_target_data, set_inferior_target_data)
9956 (inferior_regcache_data, set_inferior_regcache_data): Move to
9957 inferiors.h, and include it.
9958 * inferiors.h: New file.
9960 2013-09-05 Pedro Alves <palves@redhat.com>
9962 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9966 2013-09-05 Pedro Alves <palves@redhat.com>
9968 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9970 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9971 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9972 (handle_tracepoint_general_set, handle_tracepoint_query)
9973 (tracepoint_finished_step, tracepoint_was_hit)
9974 (release_while_stepping_state_list, current_traceframe)
9975 (in_readonly_region, traceframe_read_mem)
9976 (fetch_traceframe_registers, traceframe_read_sdata)
9977 (traceframe_read_info, struct fast_tpoint_collect_status)
9978 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9979 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9980 (supply_fast_tracepoint_registers)
9981 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9982 (ipa_tdesc, claim_trampoline_space)
9983 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9984 (agent_mem_read, agent_get_trace_state_variable_value)
9985 (agent_set_trace_state_variable_value, agent_tsv_read)
9986 (agent_mem_read_string, get_raw_reg_func_addr)
9987 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9988 * tracepoint.h: ... this new file.
9990 2013-09-05 Pedro Alves <palves@redhat.com>
9992 * server.h (perror_with_name, error, fatal, warning, paddress)
9993 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9995 * utils.h: New file.
9997 2013-09-05 Pedro Alves <palves@redhat.com>
9999 * server.h (remote_debug, noack_mode, transport_is_reliable)
10000 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10001 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10002 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10003 (write_enn, initialize_async_io, enable_async_io)
10004 (disable_async_io, check_remote_input_interrupt_request)
10005 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10006 (dead_thread_notify, prepare_resume_reply)
10007 (decode_address_to_semicolon, decode_address, decode_m_packet)
10008 (decode_M_packet, decode_X_packet, decode_xfer_write)
10009 (decode_search_memory_packet, unhexify, hexify)
10010 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10011 (look_up_one_symbol, relocate_instruction)
10012 (monitor_output): Move to remote-utils.h, and include it.
10013 * remote-utils.h: New file.
10015 2013-09-05 Pedro Alves <palves@redhat.com>
10017 * server.h (_): Delete.
10019 2013-09-02 Pedro Alves <palves@redhat.com>
10021 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10022 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10024 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10026 2013-09-02 Pierre Muller <muller@sourceware.org>
10028 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10029 or WriteProcessMemory complete successfully and handle
10030 ERROR_PARTIAL_COPY error.
10032 2013-09-02 Pedro Alves <palves@redhat.com>
10034 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10035 error instead of EIO.
10037 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10040 * linux-low.c: Include filestuff.h.
10041 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10042 * lynx-low.c: Include filestuff.h.
10043 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10044 * server.c: Include filestuff.h.
10045 (main): Call notice_open_fds.
10046 * spu-low.c: Include filestuff.h.
10047 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10049 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10051 * Makefile.in: Explain why ../target and ../nat are not
10052 listed as include file search paths.
10053 (linux-waitpid.o): New object file rule.
10054 * configure.srv (srv_native_linux_obj): New variable.
10055 Replace all occurrences of linux native object files with
10056 $srv_native_linux_obj.
10057 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10058 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10059 (linux_enable_event_reporting): Remove declaration.
10060 (my_waitpid): Moved to common/linux-waitpid.c.
10061 (linux_wait_for_event): Pass ptid when calling
10062 linux_enable_event_reporting.
10063 (linux_supports_tracefork_flag): Remove.
10064 (linux_enable_event_reporting): Likewise.
10065 (linux_tracefork_grandchild): Remove.
10066 (STACK_SIZE): Moved to common/linux-ptrace.c.
10067 (linux_tracefork_child): Remove.
10068 (linux_test_for_tracefork): Remove.
10069 (linux_look_up_symbols): Call linux_supports_traceclone.
10070 (initialize_low): Remove call to linux_test_for_tracefork.
10071 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10072 common/linux-ptrace.h.
10073 (PTRACE_TYPE_ARG4): Likewise.
10074 Include linux-ptrace.h.
10076 2013-08-21 Pedro Alves <palves@redhat.com>
10078 * config.in: Renegerate.
10080 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10082 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10083 (SFILES): Remove $(srcdir)/common/target-common.c and
10084 add $(srcdir)/target/waitstatus.c.
10085 (OBS): Remove target-common.o and add waitstatus.o.
10086 (server_h): Remove $(srcdir)/../common/target-common.h and
10087 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10088 and $(srcdir)/../target/waitstatus.h.
10089 (target-common.o): Remove.
10090 (waitstatus.o): New target object file.
10091 * target.h: Do not include target-common.h and
10092 include target/resume.h, target/wait.h and
10093 target/waitstatus.h.
10095 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10097 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10098 to PTRACE_TYPE_ARG3.
10099 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10100 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10102 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10103 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10105 2013-07-27 Jie Zhang <jie@codesourcery.com>
10106 Daniel Jacobowitz <dan@codesourcery.com>
10107 Yao Qi <yao@codesourcery.com>
10109 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10110 (mips-linux-watch.o): New rule.
10111 (mips_linux_watch_h): New variable.
10112 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10114 * linux-mips-low.c: Include mips-linux-watch.h.
10115 (struct arch_process_info, struct arch_lwp_info): New.
10116 (update_watch_registers_callback): New function.
10117 (mips_linux_new_process, mips_linux_new_thread) New functions.
10118 (mips_linux_prepare_to_resume, mips_insert_point): New
10120 (mips_remove_point, mips_stopped_by_watchpoint): New
10122 (rsp_bp_type_to_target_hw_bp_type): New function.
10123 (mips_stopped_data_address): New function.
10124 (the_low_target): Add watchpoint support functions.
10126 2013-07-27 Yao Qi <yao@codesourcery.com>
10128 * i386-low.c: Include break-common.h.
10129 (enum target_hw_bp_type): Remove.
10131 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10133 * Makefile.in (SFILES): /common/target-common.c.
10134 (OBS): Add target-common.o.
10135 (server_h): Add $(srcdir)/../common/target-common.h.
10136 (target-common.o): New target.
10137 * server.c (queue_stop_reply_callback): Free
10138 status string after use.
10139 * target.c (target_waitstatus_to_string): Remove.
10140 * target.h: Include target-common.h.
10141 (resume_kind): Likewise.
10142 (target_waitkind): Likewise.
10143 (target_waitstatus): Likewise.
10144 (TARGET_WNOHANG): Likewise.
10146 2013-07-04 Yao Qi <yao@codesourcery.com>
10148 * Makefile.in (host_alias): Use @host_noncanonical@.
10149 (target_alias): Use @target_noncanonical@.
10150 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10151 ACX_NONCANONICAL_HOST.
10152 * configure: Regenerated.
10155 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10157 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10158 * configure: Rebuild.
10159 * Makefile.in (version_host, version_target): Get from configure.
10160 (version.c): Use $(version_host) and $(version_target).
10162 2013-07-03 Pedro Alves <palves@redhat.com>
10164 * Makefile.in (config.status): Depend on development.sh.
10165 * acinclude.m4: Include libmcheck.m4.
10166 * configure: Regenerate.
10168 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10170 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10171 attribute inside the parentheses.
10172 (winapi_DebugSetProcessKillOnExit): Ditto.
10173 (winapi_DebugBreakProcess): Ditto.
10174 (winapi_GenerateConsoleCtrlEvent): Ditto.
10176 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10178 * notif.h (notif_event): Add a dummy member to avoid compiler
10181 2013-07-01 Pedro Alves <palves@redhat.com>
10183 * hostio.c (HOSTIO_PATH_MAX): Define.
10184 (require_filename, handle_open, handle_unlink, handle_readlink):
10187 2013-07-01 Pedro Alves <palves@redhat.com>
10189 * server.h: Include "pathmax.h".
10190 * linux-low.c: Don't include sys/param.h.
10191 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10193 * win32-low.c: Don't include sys/param.h.
10194 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10196 2013-07-01 Pedro Alves <palves@redhat.com>
10198 * event-loop.c: Don't check HAVE_UNISTD_H before including
10200 * gdbreplay.c: Likewise.
10201 * remote-utils.c: Likewise.
10202 * server.c: Likewise.
10203 * configure.ac: Don't check for unistd.h.
10204 * configure: Regenerate.
10206 2013-06-28 Tom Tromey <tromey@redhat.com>
10208 * Makefile.in (version.c): Use version.in, not
10211 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10213 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10214 * configure: Rebuild.
10215 * Makefile.in (version_host, version_target): Get from configure.
10216 (version.c): Use $(version_host) and $(version_target).
10218 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10220 Fix trace-status to output user name without trailing colon.
10221 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10223 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10225 Fix trace-status to output proper start-time and stop-time.
10226 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10227 output start time and stop time in hex as gdb expects.
10229 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10231 * tracepoint.c (build_traceframe_info_xml): Output trace state
10232 variables present in the trace buffer.
10234 2013-06-24 Tom Tromey <tromey@redhat.com>
10236 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10238 (version.o): Remove.
10239 * gdbreplay.c: Include version.h.
10240 (version, host_name): Don't declare.
10241 * server.h: Include version.h.
10242 (version, host_name): Don't declare.
10244 2013-06-12 Pedro Alves <palves@redhat.com>
10246 * linux-x86-low.c (linux_is_elf64): Delete global.
10247 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10248 with local linux_pid_exe_is_elf_64_file use.
10250 2013-06-11 Pedro Alves <palves@redhat.com>
10252 * linux-low.c (regset_disabled, disable_regset): New functions.
10253 (regsets_fetch_inferior_registers)
10254 (regsets_store_inferior_registers): Use them.
10255 (initialize_regsets_info); Don't allocate the disabled_regsets
10257 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10260 2013-06-11 Pedro Alves <palves@redhat.com>
10262 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10265 2013-06-11 Pedro Alves <palves@redhat.com>
10267 * linux-x86-low.c (initialize_low_arch): Call
10268 init_registers_x32_avx_linux.
10270 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10272 Fix compatibility with Android Bionic.
10273 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10276 2013-06-07 Pedro Alves <palves@redhat.com>
10279 * Makefile.in (OBS): Add tdesc.o.
10280 (IPA_OBJS): Add tdesc-ipa.o.
10281 (tdesc-ipa.o): New rule.
10282 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10284 * linux-low.c (new_inferior): Delete.
10285 (disabled_regsets, num_regsets): Delete.
10286 (linux_add_process): Adjust to set the new per-process
10288 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10289 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10290 was a stop. When calling arch_setup, switch the current inferior
10291 to the thread that got an event.
10292 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10293 (regsets_fetch_inferior_registers)
10294 (regsets_store_inferior_registers): New regsets_info parameter.
10296 (linux_register_in_regsets): New regs_info parameter. Adjust to
10298 (register_addr, fetch_register, store_register): New usrregs_info
10299 parameter. Adjust to use it.
10300 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10301 parameter regs_info. Adjust to use it.
10302 (linux_fetch_registers): Get the current inferior's regs_info, and
10304 (linux_store_registers): Ditto.
10305 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10306 (initialize_low): Don't initialize the target_regsets here. Call
10307 initialize_low_arch.
10308 * linux-low.h (target_regsets): Delete declaration.
10309 (struct regsets_info): New.
10310 (struct usrregs_info): New.
10311 (struct regs_info): New.
10312 (struct process_info_private) <new_inferior>: New field.
10313 (struct linux_target_ops): Delete the num_regs, regmap, and
10314 regset_bitmap fields. New field regs_info.
10315 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10316 * i387-fp.c (num_xmm_registers): Delete.
10317 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10318 calls to new interface.
10319 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10320 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10321 Infer the number of xmm registers from the regcache's target
10323 * i387-fp.h (num_xmm_registers): Delete.
10324 * inferiors.c (add_thread): Don't install the thread's regcache
10326 * proc-service.c (gregset_info): Fetch the current inferior's
10327 regs_info. Adjust to use it.
10328 * regcache.c: Include tdesc.h.
10329 (register_bytes, reg_defs, num_registers)
10330 (gdbserver_expedite_regs): Delete.
10331 (get_thread_regcache): If the thread doesn't have a regcache yet,
10332 create one, instead of aborting gdbserver.
10333 (regcache_invalidate_one): Rename to ...
10334 (regcache_invalidate_thread): ... this.
10335 (regcache_invalidate_one): New.
10336 (regcache_invalidate): Only invalidate registers of the current
10338 (init_register_cache): Add target_desc parameter, and use it.
10339 (new_register_cache): Ditto. Assert the target description has a
10340 non zero registers_size.
10341 (regcache_cpy): Add assertions. Adjust.
10342 (realloc_register_cache, set_register_cache): Delete.
10343 (registers_to_string, registers_from_string): Adjust.
10344 (find_register_by_name, find_regno, find_register_by_number)
10345 (register_cache_size): Add target_desc parameter, and use it.
10346 (free_register_cache_thread, free_register_cache_thread_one)
10347 (regcache_release, register_cache_size): New.
10348 (register_size): Add target_desc parameter, and use it.
10349 (register_data, supply_register, supply_register_zeroed)
10350 (supply_regblock, supply_register_by_name, collect_register)
10351 (collect_register_as_string, collect_register_by_name): Adjust.
10352 * regcache.h (struct target_desc): Forward declare.
10353 (struct regcache) <tdesc>: New field.
10354 (init_register_cache, new_register_cache): Add target_desc
10356 (regcache_invalidate_thread): Declare.
10357 (regcache_invalidate_one): Delete declaration.
10358 (regcache_release): Declare.
10359 (find_register_by_number, register_cache_size, register_size)
10360 (find_regno): Add target_desc parameter.
10361 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10363 * remote-utils.c: Include tdesc.h.
10364 (outreg, prepare_resume_reply): Adjust.
10365 * server.c: Include tdesc.h.
10366 (gdbserver_xmltarget): Delete declaration.
10367 (get_features_xml, process_serial_event): Adjust.
10368 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10370 (struct process_info) <tdesc>: New field.
10371 (ipa_tdesc): Declare.
10372 * tdesc.c: New file.
10373 * tdesc.h: New file.
10374 * tracepoint.c: Include tdesc.h.
10375 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10376 (get_context_regcache): Adjust to pass ipa_tdesc down.
10377 (do_action_at_tracepoint): Adjust to get the register cache size
10378 from the context regcache's description.
10379 (traceframe_walk_blocks): Adjust to get the register cache size
10380 from the current trace frame's description.
10381 (traceframe_get_pc): Adjust to get current trace frame's
10382 description and pass it down.
10383 (gdb_collect): Adjust to get the register cache size from the
10385 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10386 (gdbserver_xmltarget): Delete.
10387 (initialize_low_tracepoint): Set the ipa's target description.
10388 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10389 (initialize_low_tracepoint): Set the ipa's target description.
10390 * linux-x86-low.c: Include tdesc.h.
10391 [__x86_64__] (is_64bit_tdesc): New.
10392 (ps_get_thread_area, x86_get_thread_area): Use it.
10393 (i386_cannot_store_register): Rename to ...
10394 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10395 (i386_cannot_fetch_register): Rename to ...
10396 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10397 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10399 (target_regsets): Rename to ...
10400 (x86_regsets): ... this.
10401 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10403 (x86_siginfo_fixup): Use is_64bit_tdesc.
10404 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10405 (tdesc_x32_avx_linux, tdesc_x32_linux)
10406 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10408 (x86_linux_update_xmltarget): Delete.
10409 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10410 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10411 (AMD64_LINUX_USER64_CS): New.
10412 (x86_linux_read_description): New, based on
10413 x86_linux_update_xmltarget.
10414 (same_process_callback): New.
10415 (x86_arch_setup_process_callback): New.
10416 (x86_linux_update_xmltarget): New.
10417 (x86_regsets_info): New.
10418 (amd64_linux_regs_info): New.
10419 (i386_linux_usrregs_info): New.
10420 (i386_linux_regs_info): New.
10421 (x86_linux_regs_info): New.
10422 (x86_arch_setup): Reimplement.
10423 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10424 (x86_emit_ops): Ditto.
10425 (the_low_target): Adjust. Install x86_linux_regs_info,
10426 x86_cannot_fetch_register, and x86_cannot_store_register.
10427 (initialize_low_arch): New.
10428 * linux-ia64-low.c (tdesc_ia64): Declare.
10429 (ia64_fetch_register): Adjust.
10430 (ia64_usrregs_info, regs_info): New globals.
10431 (ia64_regs_info): New function.
10432 (the_low_target): Adjust.
10433 (initialize_low_arch): New function.
10434 * linux-sparc-low.c (tdesc_sparc64): Declare.
10435 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10437 (sparc_arch_setup): New function.
10438 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10439 (the_low_target): Adjust.
10440 (initialize_low_arch): New function.
10441 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10442 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10443 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10444 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10445 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10446 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10447 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10448 (tdesc_powerpc_isa205_vsx64l): Declare.
10449 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10450 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10451 (ppc_set_pc, ppc_get_hwcap): Adjust.
10452 (ppc_usrregs_info): Forward declare.
10453 (!__powerpc64__) ppc_regmap_adjusted: New global.
10454 (ppc_arch_setup): Adjust to the current process'es target
10456 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10457 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10458 (ppc_store_evrregset): Adjust.
10459 (target_regsets): Rename to ...
10460 (ppc_regsets): ... this, and make static.
10461 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10462 (ppc_regs_info): New function.
10463 (the_low_target): Adjust.
10464 (initialize_low_arch): New function.
10465 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10466 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10467 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10468 (tdesc_s390x_linux64v2): Declare.
10469 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10470 (s390_fill_gregset, s390_store_last_break): Adjust.
10471 (target_regsets): Rename to ...
10472 (s390_regsets): ... this, and make static.
10473 (s390_get_pc, s390_set_pc): Adjust.
10474 (s390_get_hwcap): New target_desc parameter, and use it.
10475 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10476 (s390_arch_setup): Adjust to set the current process'es target
10477 description. Don't adjust the regmap.
10478 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10479 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10480 (regs_info_3264): New globals.
10481 (s390_regs_info): New function.
10482 (the_low_target): Adjust.
10483 (initialize_low_arch): New function.
10484 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10485 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10486 [__mips64] (init_registers_mips_linux)
10487 (init_registers_mips_dsp_linux): Delete defines.
10488 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10489 (have_dsp): New global.
10490 (mips_read_description): New, based on mips_arch_setup.
10491 (mips_arch_setup): Reimplement.
10492 (get_usrregs_info): New function.
10493 (mips_cannot_fetch_register, mips_cannot_store_register)
10494 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10495 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10496 (target_regsets): Rename to ...
10497 (mips_regsets): ... this, and make static.
10498 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10499 (dsp_regs_info, regs_info): New globals.
10500 (mips_regs_info): New function.
10501 (the_low_target): Adjust.
10502 (initialize_low_arch): New function.
10503 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10504 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10506 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10507 (arm_read_description): New, with bits factored from
10509 (arm_arch_setup): Reimplement.
10510 (target_regsets): Rename to ...
10511 (arm_regsets): ... this, and make static.
10512 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10513 (arm_regs_info): New function.
10514 (the_low_target): Adjust.
10515 (initialize_low_arch): New function.
10516 * linux-m68k-low.c (tdesc_m68k): Declare.
10517 (target_regsets): Rename to ...
10518 (m68k_regsets): ... this, and make static.
10519 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10520 (m68k_regs_info): New function.
10521 (m68k_arch_setup): New function.
10522 (the_low_target): Adjust.
10523 (initialize_low_arch): New function.
10524 * linux-sh-low.c (tdesc_sharch): Declare.
10525 (target_regsets): Rename to ...
10526 (sh_regsets): ... this, and make static.
10527 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10528 (sh_regs_info, sh_arch_setup): New functions.
10529 (the_low_target): Adjust.
10530 (initialize_low_arch): New function.
10531 * linux-bfin-low.c (tdesc_bfin): Declare.
10532 (bfin_arch_setup): New function.
10533 (bfin_usrregs_info, regs_info): New globals.
10534 (bfin_regs_info): New function.
10535 (the_low_target): Adjust.
10536 (initialize_low_arch): New function.
10537 * linux-cris-low.c (tdesc_cris): Declare.
10538 (cris_arch_setup): New function.
10539 (cris_usrregs_info, regs_info): New globals.
10540 (cris_regs_info): New function.
10541 (the_low_target): Adjust.
10542 (initialize_low_arch): New function.
10543 * linux-cris-low.c (tdesc_crisv32): Declare.
10544 (cris_arch_setup): New function.
10545 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10546 (cris_regs_info): New function.
10547 (the_low_target): Adjust.
10548 (initialize_low_arch): New function.
10549 * linux-m32r-low.c (tdesc_m32r): Declare.
10550 (m32r_arch_setup): New function.
10551 (m32r_usrregs_info, regs_info): New globals.
10552 (m32r_regs_info): Adjust.
10553 (initialize_low_arch): New function.
10554 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10555 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10556 (tic6x_usrregs_info): Forward declare.
10557 (tic6x_read_description): New function, based on ...
10558 (tic6x_arch_setup): ... this. Reimplement.
10559 (target_regsets): Rename to ...
10560 (tic6x_regsets): ... this, and make static.
10561 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10562 (tic6x_regs_info): New function.
10563 (the_low_target): Adjust.
10564 (initialize_low_arch): New function.
10565 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10566 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10567 (target_regsets): Rename to ...
10568 (xtensa_regsets): ... this, and make static.
10569 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10571 (xtensa_arch_setup, xtensa_regs_info): New functions.
10572 (the_low_target): Adjust.
10573 (initialize_low_arch): New function.
10574 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10575 (nios2_arch_setup): Set the current process'es tdesc.
10576 (target_regsets): Rename to ...
10577 (nios2_regsets): ... this.
10578 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10579 (nios2_regs_info): New function.
10580 (the_low_target): Adjust.
10581 (initialize_low_arch): New function.
10582 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10583 (aarch64_arch_setup): Set the current process'es tdesc.
10584 (target_regsets): Rename to ...
10585 (aarch64_regsets): ... this.
10586 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10587 (aarch64_regs_info): New function.
10588 (the_low_target): Adjust.
10589 (initialize_low_arch): New function.
10590 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10592 (target_regsets): Rename to ...
10593 (tile_regsets): ... this.
10594 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10595 (tile_regs_info): New function.
10596 (tile_arch_setup): Set the current process'es tdesc.
10597 (the_low_target): Adjust.
10598 (initialize_low_arch): New function.
10599 * spu-low.c (tdesc_spu): Declare.
10600 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10601 * win32-arm-low.c (tdesc_arm): Declare.
10602 (arm_arch_setup): New function.
10603 (the_low_target): Install arm_arch_setup instead of
10604 init_registers_arm.
10605 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10606 (init_windows_x86): Rename to ...
10607 (i386_arch_setup): ... this. Set `win32_tdesc'.
10608 (the_low_target): Adjust.
10609 * win32-low.c (win32_tdesc): New global.
10610 (child_add_thread): Don't create the thread cache here.
10611 (do_initial_child_stuff): Set the new process'es tdesc.
10612 * win32-low.h (struct target_desc): Forward declare.
10613 (win32_tdesc): Declare.
10614 * lynx-i386-low.c (tdesc_i386): Declare global.
10615 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10616 * lynx-low.c (lynx_tdesc): New global.
10617 (lynx_add_process): Set the new process'es tdesc.
10618 * lynx-low.h (struct target_desc): Forward declare.
10619 (lynx_tdesc): Declare global.
10620 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10621 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10622 * nto-low.c (nto_tdesc): New global.
10623 (do_attach): Set the new process'es tdesc.
10624 * nto-low.h (struct target_desc): Forward declare.
10625 (nto_tdesc): Declare.
10626 * nto-x86-low.c (tdesc_i386): Declare.
10627 (nto_x86_arch_setup): Set `nto_tdesc'.
10629 2013-06-04 Gary Benson <gbenson@redhat.com>
10631 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10632 to qSupported response when appropriate.
10633 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10634 with nonzero-length annex.
10635 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10636 arguments supplied in annex.
10638 2013-05-31 Doug Evans <dje@google.com>
10641 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10642 64 bits in 64-cross-32 environment.
10644 2013-05-28 Pedro Alves <palves@redhat.com>
10646 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10647 (aarch64-without-fpu.c): Delete rule.
10648 * configure.srv (aarch64*-*-linux*): Remove references to
10649 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10650 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10653 2013-05-24 Pedro Alves <palves@redhat.com>
10655 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10656 instead of strchr/decode_address. Error if the range isn't split
10657 with a ','. Don't assume there's be a ':' in the action.
10659 2013-05-23 Yao Qi <yao@codesourcery.com>
10660 Pedro Alves <palves@redhat.com>
10662 * linux-low.c (lwp_in_step_range): New function.
10663 (linux_wait_1): If the thread was range stepping and stopped
10664 outside the stepping range, report the stop to GDB. Otherwise,
10665 continue stepping. Add range stepping debug output.
10666 (linux_set_resume_request): Copy the step range from the resume
10667 request to the lwp.
10668 (linux_supports_range_stepping): New.
10669 (linux_target_ops) <supports_range_stepping>: Set to
10670 linux_supports_range_stepping.
10671 * linux-low.h (struct linux_target_ops)
10672 <supports_range_stepping>: New field.
10673 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10674 * linux-x86-low.c (x86_supports_range_stepping): New.
10675 (the_low_target) <supports_range_stepping>: Set to
10676 x86_supports_range_stepping.
10677 * server.c (handle_v_cont): Handle 'r' action.
10678 (handle_v_requests): Append ";r" if the target supports range
10680 * target.h (struct thread_resume) <step_range_start,
10681 step_range_end>: New fields.
10682 (struct target_ops) <supports_range_stepping>:
10684 (target_supports_range_stepping): New macro.
10686 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10688 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10689 confusion in comment.
10691 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10693 * lynx-low.c (struct process_info_private): New type.
10694 (lynx_add_process): New function.
10695 (lynx_create_inferior, lynx_attach): Replace calls to
10696 add_process by calls to lynx_add_process.
10697 (lynx_resume): If PTID is null, then try using
10698 current_process()->private->last_wait_event_ptid.
10700 (lynx_clear_inferiors): Delete. The contents of that function
10701 has been inlined in lynx_mourn;
10702 (lynx_wait_1): Save the ptid in the process's private data.
10703 (lynx_mourn): Free the process' private data. Replace call
10704 to lynx_clear_inferiors by call to clear_inferiors.
10706 2013-05-17 Yao Qi <yao@codesourcery.com>
10708 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10711 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10713 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10714 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10715 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10716 PT_TEXT_END_ADDR guards. Update comments.
10717 (linux_target_op) <read_offsets>: Conditionally define to
10718 linux_read_offsets if the target is UCLIBC and if it defines
10719 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10721 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10722 Andrew Jenner <andrew@codesourcery.com>
10724 * Makefile.in (SFILES): Add linux-nios2-low.c.
10725 (clean): Add action to delete nios2-linux.c.
10726 (nios2-linux.c): New rule.
10727 * configure.srv: Add nios2*-*-linux*.
10728 * linux-nios2-low.c: New.
10730 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10732 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10734 2013-04-25 Hui Zhu <hui@codesourcery.com>
10737 * ax.c (ax_printf): Add fflush.
10739 2013-04-22 Tom Tromey <tromey@redhat.com>
10741 * Makefile.in (SFILES): Add filestuff.c.
10742 (OBS): Add filestuff.o.
10743 (filestuff.o): New target.
10744 * config.in, configure: Rebuild.
10745 * configure.ac: Check for fdwalk, pipe2.
10747 2013-04-17 Pedro Alves <palves@redhat.com>
10749 * configure.ac (USE_THREAD_DB): Delete variable.
10750 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10751 Don't AC_SUBST USE_THREAD_DB.
10752 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10753 * config.in, configure: Regenerate.
10755 2013-04-16 Pedro Alves <palves@redhat.com>
10757 * linux-low.h (struct lwp_info) <thread_known>: Move under
10758 the USE_THREAD_DB #ifdef.
10760 2013-04-16 Pedro Alves <palves@redhat.com>
10762 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10763 (linux-low.o): Delete rule.
10764 * linux-low.h: Always include "gdb_thread_db.h" instead of
10765 conditionally including thread_db.h.
10766 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10769 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10771 * Makefile.in (install-only): Fix make install regression.
10773 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10775 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10776 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10778 * gdbserver.1: Remove.
10780 2013-03-22 Pedro Alves <palves@redhat.com>
10782 * linux-low.c (handle_extended_wait): Don't call
10783 linux_enable_event_reporting.
10785 2013-03-15 Tony Theodore <tonyt@logyst.com>
10788 * Makefile.in (SHELL): Use @SHELL@.
10790 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10792 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10795 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10797 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10798 Remove extraneous NULL element.
10800 2013-03-13 Yao Qi <yao@codesourcery.com>
10802 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10803 'V' block in trace frame.
10805 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10807 * target.h (struct target_ops): Add btrace ops.
10808 (target_supports_btrace): New macro.
10809 (target_enable_btrace): New macro.
10810 (target_disable_btrace): New macro.
10811 (target_read_btrace): New macro.
10812 * gdbthread.h (struct thread_info): Add btrace field.
10813 * server.c: Include btrace-common.h.
10814 (handle_btrace_general_set): New function.
10815 (handle_btrace_enable): New function.
10816 (handle_btrace_disable): New function.
10817 (handle_general_set): Call handle_btrace_general_set.
10818 (handle_qxfer_btrace): New function.
10819 (struct qxfer qxfer_packets[]): Add btrace entry.
10820 * inferiors.c (remove_thread): Disable btrace.
10821 * linux-low: Include linux-btrace.h.
10822 (linux_low_enable_btrace): New function.
10823 (linux_low_read_btrace): New function.
10824 (linux_target_ops): Add btrace ops.
10825 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10826 Add srv_linux_btrace=yes.
10827 (x86_64-*-linux*): Add linux-btrace.o.
10828 Add srv_linux_btrace=yes.
10829 * configure.ac: Define HAVE_LINUX_BTRACE.
10830 * config.in: Regenerated.
10831 * configure: Regenerated.
10833 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10835 * server.c (handle_qxfer): Preserve error message if -3 is
10837 (qxfer): Document the -3 return value.
10839 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10841 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10842 (linux_btrace_h): New variable.
10843 (linux-btrace.o): New rule.
10845 2013-03-08 Stan Shebs <stan@codesourcery.com>
10846 Hafiz Abid Qadeer <abidh@codesourcery.com>
10848 * tracepoint.c (trace_buffer_size): New global.
10849 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10850 (init_trace_buffer): Change to one-argument function. Allocate
10851 trace buffer memory.
10852 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10853 handle QTBuffer:size packet.
10854 (cmd_bigqtbuffer_size): New function.
10855 (initialize_tracepoint): Call init_trace_buffer with
10856 DEFAULT_TRACE_BUFFER_SIZE.
10857 * server.c (handle_query): Add QTBuffer:size in the
10860 2013-03-07 Yao Qi <yao@codesourcery.com>
10862 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10863 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10865 (cmd_qtsp): Adjust condition. Do post increment.
10866 Set cur_action and cur_step_action back to 0.
10868 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10871 * linux-low.c (linux_write_memory): Return early success if LEN is
10874 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10876 * configure.srv: Add x86_64-*-cygwin* as target.
10878 2013-02-28 Tom Tromey <tromey@redhat.com>
10880 * configure.ac: Invoke AC_SYS_LARGEFILE.
10881 * configure, config.in: Rebuild.
10883 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10885 * win32-low.c: Throughout, fix format strings and casts of
10886 printf-like functions to avoid type related warnings on all
10888 (get_child_debug_event): Print dwDebugEventCode as hex since
10889 that's how it's usually documented.
10891 2013-02-28 Yao Qi <yao@codesourcery.com>
10893 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10896 2013-02-27 Jiong Wang <jiwang@tilera.com>
10898 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10899 (reg-tilegx32.c): New rule.
10900 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10901 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10902 different register info initializer according to elf class.
10903 (init_registers_tilgx32): New function. The tilegx32 register info
10905 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10906 (tile_store_gregset): Likewise.
10908 2013-02-27 Yao Qi <yao@codesourcery.com>
10910 * server.c (process_point_options): Print debug message when
10911 debug_threads is true.
10913 2013-02-26 Yao Qi <yao@codesourcery.com>
10915 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10917 2013-02-19 Pedro Alves <palves@redhat.com>
10918 Kai Tietz <ktietz@redhat.com>
10922 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10923 instead of strtoul to extract address from packet.
10924 (process_serial_event) <'z'>: Likewise.
10926 2013-02-18 Yao Qi <yao@codesourcery.com>
10928 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10930 2013-02-14 Pedro Alves <palves@redhat.com>
10934 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10935 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10937 2013-02-14 Pedro Alves <palves@redhat.com>
10939 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10941 2013-02-14 Pedro Alves <palves@redhat.com>
10943 * tracepoint.c (save_string): Delete.
10944 (add_tracepoint_action): Use savestring instead of save_string.
10946 2013-02-12 Pedro Alves <palves@redhat.com>
10948 * linux-xtensa-low.c: Ditto.
10949 * xtensa-xtregs.c: Ditto.
10951 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10953 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10956 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10958 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10959 aarch64_num_wp_regs and aarch64_num_bp_regs to
10960 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10962 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10964 * linux-aarch64-low.c (ps_get_thread_area): Replace
10965 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10967 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10968 Marcus Shawcroft <marcus.shawcroft@arm.com>
10969 Nigel Stephens <nigel.stephens@arm.com>
10970 Yufeng Zhang <yufeng.zhang@arm.com>
10972 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10973 (aarch64.c, aarch64-without-fpu.c): New targets.
10974 * configure.srv (aarch64*-*-linux*): New.
10975 * linux-aarch64-low.c: New file.
10977 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10979 * linux-low.c (handle_extended_wait, linux_create_inferior)
10980 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10981 (dequeue_one_deferred_signal, linux_resume_one_thread)
10982 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10983 (linux_tracefork_grandchild, linux_test_for_tracefork)
10984 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10985 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10986 where the argument is 0.
10988 2013-01-25 Yao Qi <yao@codesourcery.com>
10990 * event-loop.c: Include "queue.h".
10991 (gdb_event_p): New typedef.
10992 (struct gdb_event) <next_event>: Remove.
10993 (event_queue): Change to QUEUE(gdb_event_p).
10994 (async_queue_event): Remove.
10995 (gdb_event_xfree): New.
10996 (initialize_event_loop): New.
10997 (process_event): Use API from QUEUE.
10998 (wait_for_event): Likewise.
10999 * server.c (main): Call initialize_event_loop.
11000 * server.h (initialize_event_loop): Declare.
11002 2013-01-18 Yao Qi <yao@codesourcery.com>
11004 * ax.h (struct eval_agent_expr_context): New.
11005 (gdb_eval_agent_expr): Update declaration.
11006 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11007 TFRAME. Add new argument CTX.
11008 * server.h (struct eval_agent_expr_context): Declare.
11009 (agent_mem_read, agent_tsv_read): Update declaration.
11010 (agent_mem_read_string): Likewise.
11011 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11012 (add_traceframe_block): Add new argument TPOINT.
11013 Increase TPOINT->traceframe_usage.
11014 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11015 eval_tracepoint_agent_expr.
11016 (condition_true_at_tracepoint): Likewise.
11017 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11018 (agent_mem_read_string, agent_tsv_read): Likewise.
11020 2013-01-16 Yao Qi <yao@codesourcery.com>
11022 * linux-low.c (linux_resume_one_lwp): Don't check
11023 'lwp->bp_reinsert != 0'.
11025 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11026 Pedro Alves <palves@redhat.com>
11028 * lynx-low.c (ptrace_request_to_str): Define a temporary
11029 macro and use it to simplify this function's implementation.
11031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11033 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11036 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11038 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11040 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11042 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11044 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11046 * lynx-low.c (lynx_resume): Use the resume_info parameter
11047 to determine the ptid for the lynx_ptrace call, unless
11048 it is equal to minus_one_ptid, in which case we use the
11049 ptid of the current_inferior.
11050 (lynx_wait_1): After having received a thread create/exit
11051 event, resume the inferior's execution using the signaling
11052 thread's ptid, rather than the old ptid.
11054 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11056 * lynx-low.c (lynx_resume): Delete variable ret.
11058 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11060 * gdbreplay.c (gdbreplay_version): Update copyright year.
11061 * server.c (gdbserver_version): Likewise.
11063 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11065 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11068 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11070 * lynx-low.c (ptrace_request_to_str): Add handling for
11071 PTRACE_GETTRACESIG.
11073 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11075 * lynx-low.c (lynx_attach): Delete variable new_process.
11077 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11079 * lynx-low.c (lynx_create_inferior): Delete variable
11082 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11084 * lynx-low.c (ptrace_request_to_str): Do not handle
11085 PTRACE_GETTHREADLIST if this macro does not exist.
11087 2012-12-15 Yao Qi <yao@codesourcery.com>
11089 * Makefile.in (OBS): Add notif.o.
11090 * notif.c, notif.h: New.
11091 * server.c: Include "notif.h".
11092 (struct vstop_notif) <next>: Remove.
11094 (queue_stop_reply): Update.
11095 (push_event, send_next_stop_reply): Remove.
11096 (discard_queued_stop_replies): Update.
11097 (notif_stop): New variable.
11098 (handle_v_stopped): Remove.
11099 (handle_v_requests): Don't call handle_v_stopped. Call
11100 handle_ack_notif instead.
11101 (queue_stop_reply_callback): Call notif_event_enque instead
11102 of queue_stop_reply.
11103 (handle_status): Don't call send_next_stop_reply, call
11104 notif_write_event instead.
11105 (kill_inferior_callback): Likewise.
11106 (detach_or_kill_inferior_callback): Likewise.
11107 (main): Call initialize_notif.
11108 (process_serial_event): Call QUEUE_is_empty.
11109 (handle_target_event): Call notif_push instead of push event.
11110 * server.h (push_event): Remove declaration.
11112 2012-12-10 Tom Tromey <tromey@redhat.com>
11114 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11115 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11118 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11119 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11120 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11121 (amd64-linux-ipa.o, ax.o): Rewrite.
11122 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11123 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11124 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11125 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11126 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11127 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11128 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11129 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11130 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11131 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11132 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11133 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11134 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11135 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11136 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11137 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11138 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11139 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11140 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11141 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11142 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11143 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11144 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11145 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11146 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11147 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11148 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11149 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11150 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11151 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11152 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11153 (reg-tilegx.o): Remove.
11154 (all_object_files): New macro.
11155 Include .deps files.
11156 * aclocal.m4, configure: Rebuild.
11157 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11158 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11159 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11161 2012-12-05 Tom Tromey <tromey@redhat.com>
11164 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11166 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11168 * configure.ac: Check for linux/perf_event.h.
11169 * config.in: Regenerated.
11170 * configure: Regenerated.
11172 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11174 * hostio.c (handle_readlink): Decrease buffer size
11175 parameter passed to readlink by one byte.
11177 2012-11-26 Yao Qi <yao@codesourcery.com>
11179 * configure.ac (build_warnings): Append '-Wempty-body'.
11180 * configure: Regenerated.
11181 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11184 2012-11-15 Pierre Muller <muller@sourceware.org>
11186 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11187 * config.in: Regenerate.
11188 * configure: Regenerate.
11189 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11190 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11191 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11192 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11194 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11195 instead of <sys/wait.h> header.
11196 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11198 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11200 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11201 (various make rules): Remove -DGDBSERVER
11203 2012-11-09 Yao Qi <yao@codesourcery.com>
11205 * spu-low.c (current_ptid): Move it to ..
11206 * gdbthread.h: ... here. New.
11207 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11208 * server.c (myresume, process_serial_event): Likewise.
11209 * thread-db.c (thread_db_find_new_threads): Likewise.
11210 * tracepoint.c (run_inferior_command): Likewise.
11212 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11214 * server.c (handle_search_memory_1): Include access length in
11217 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11219 * linux-crisv32-low.c: Fix compile errors.
11221 2012-09-04 Yao Qi <yao@codesourcery.com>
11223 * tracepoint.c (cmd_qtsv): Adjust debug message.
11224 Don't check CUR_TPOINT.
11226 2012-08-28 Yao Qi <yao@codesourcery.com>
11228 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11229 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11230 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11231 Remove declarations of xmalloc, xreallloc, xstrdup and
11233 * Makefile.in (libiberty_h): New.
11234 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11235 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11237 2012-08-23 Yao Qi <yao@codesourcery.com>
11239 * server.h: Remove declaration of 'xsnprintf'.
11241 2012-08-22 Keith Seitz <keiths@redhat.com>
11243 * server.h: Include build-gnulib-gbserver/config.h.
11244 * gdbreplay.c: Likewise.
11246 2012-08-08 Doug Evans <dje@google.com>
11248 * Makefile.in (SFILES): Add gdb_vecs.c.
11249 (OBS): Add gdb_vecs.o.
11250 (gdb_vecs_h, host_defs_h): New variables.
11251 (thread-db.o): Add $(gdb_vecs_h) dependency.
11252 (gdb_vecs.o): New rule.
11253 * thread-db.c: #include "gdb_vecs.h".
11254 (thread_db_load_search): Use a vector to iterate over path elements.
11255 Handle text appearing after "$pdir".
11257 * configure.ac: Add check for strstr.
11258 * config.in: Regenerate.
11259 * configure: Regenerate.
11261 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11263 * hostio.c (handle_pread): If pread fails, fall back to attempting
11265 (handle_pwrite): Likewise for pwrite.
11267 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11269 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11270 between unsupported TYPE and unimplementable ADDR/LEN combination.
11271 (arm_insert_point): Act on new return value.
11273 2012-07-31 Pedro Alves <palves@redhat.com>
11275 * server.c (process_point_options): Only skip tokens if we find
11276 one that is unrecognized. Don't treat 'X' specially while
11277 skipping unrecognized tokens.
11279 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11281 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11282 to 4-byte-align HW breakpoint addresses for Thumb.
11284 2012-07-27 Yao Qi <yao@codesourcery.com>
11288 * server.h: Declare gdb_agent_about_to_close.
11289 * target.c (kill_inferior): Include "agent.h".
11290 New. Send command 'kill'.
11291 * target.h (kill_inferior): Removed macro.
11292 * tracepoint.c (gdb_agent_about_to_close): New.
11293 (gdb_agent_helper_thread): Handle command 'close'.
11294 Wait endlessly until the inferior stops.
11295 Install gdb_agent_remove_socket to atexit hook.
11296 (agent_socket_name): New static variable.
11297 (gdb_agent_socket_init): Replace local variable 'name' with
11298 'agent_socket_name'.
11299 (gdb_agent_remove_socket): New.
11301 2012-07-27 Yao Qi <yao@codesourcery.com>
11303 * server.c (process_point_options): Stop at 'X' when parsing.
11305 2012-07-19 Michael Eager <eager@eagercon.com>
11307 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11309 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11310 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11311 hardware breakpoint.
11313 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11315 * gdbserver/linux-low.c (initialize_low): Call
11316 linux_ptrace_init_warnings.
11318 2012-07-02 Doug Evans <dje@google.com>
11320 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11323 2012-07-02 Stan Shebs <stan@codesourcery.com>
11325 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11326 (ax.o): Add it to build rule.
11328 (OBS): Add format.o.
11329 (IPA_OBS): Add format.o.
11330 * server.c (handle_query): Claim support for breakpoint commands.
11331 (process_point_options): Add command case.
11332 (process_serial_event): Leave running if there are printfs in
11334 * mem-break.h (any_persistent_commands): Declare.
11335 (add_breakpoint_commands): Declare.
11336 (gdb_no_commands_at_breakpoint): Declare.
11337 (run_breakpoint_commands): Declare.
11338 * mem-break.c (struct point_command_list): New struct.
11339 (struct breakpoint): New field command_list.
11340 (any_persistent_commands): New function.
11341 (add_commands_to_breakpoint): New function.
11342 (add_breakpoint_commands): New function.
11343 (gdb_no_commands_at_breakpoint): New function.
11344 (run_breakpoint_commands): New function.
11345 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11347 * ax.c: Include format.h.
11348 (ax_printf): New function.
11349 (gdb_eval_agent_expr): Add printf opcode.
11351 2012-06-13 Yao Qi <yao@codesourcery.com>
11353 * server.c (start_inferior): Remove duplicated writes to fields
11354 'last_resume_kind' and 'last_status' of 'current_inferior'.
11356 2012-06-12 Yao Qi <yao@codesourcery.com>
11357 Pedro Alves <palves@redhat.com>
11359 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11361 * server.c (handle_v_cont): Extend comment.
11363 2012-06-11 Yao Qi <yao@codesourcery.com>
11365 * linux-low.c (linux_attach): Add 'static'.
11367 2012-06-06 Yao Qi <yao@codesourcery.com>
11369 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11371 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11373 Fix gcc -flto compilation warning.
11374 * server.c (main): Make variable multi_mode and attach volatile.
11376 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11378 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11379 if the platform doesn't know about it.
11381 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11383 * Makefile.in (SFILES): Add linux-tile-low.c.
11384 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11385 * configure.srv: Handle tilegx-*-linux*.
11386 * linux-tile-low.c: New file.
11388 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11390 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11392 2012-05-24 Pedro Alves <palves@redhat.com>
11396 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11398 2012-05-24 Pedro Alves <palves@redhat.com>
11402 Replace target_signal with gdb_signal throughout.
11404 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11406 * linux-low.c (linux_store_registers): Avoid the copying sequence
11407 when no data has been retrieved by ptrace.
11409 2012-05-22 Will Deacon <will.deacon@arm.com>
11411 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11412 Include asm/ptrace.h.
11413 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11416 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11418 * linux-low.c (linux_store_registers): Don't re-retrieve data
11419 with ptrace that has already been obtained from /proc. Always
11420 copy any data retrieved with ptrace to the buffer supplied.
11422 2012-05-11 Yao Qi <yao@codesourcery.com>
11423 Pedro Alves <palves@redhat.com>
11425 * linux-low.c (enum stopping_threads_kind): New.
11426 (stopping_threads): Change type to `enum stopping_threads_kind'.
11427 (handle_extended_wait): If stopping and suspending threads, leave
11428 the new_lwp suspended too.
11429 (linux_wait_for_event): Adjust.
11430 (stop_all_lwps): Set `stopping_threads' to
11431 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11432 whether we're suspending threads or just stopping them. Assert no
11435 2012-04-29 Yao Qi <yao@codesourcery.com>
11437 * server.h: Move some code to ...
11438 * gdbthread.h: ... here. New.
11439 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11440 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11441 (nto-low.o, win32-low.o): Likewise.
11442 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11443 * regcache.c, remote-utils.c, server.c: Likewise.
11444 * target.c, tracepoint.c, win32-low.c: Likewise.
11446 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11448 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11449 (PTRACE_ARG4_TYPE): Likewise.
11450 (PTRACE_XFER_TYPE): Likewise.
11451 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11452 ptrace to PTRACE_ARG3_TYPE.
11453 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11454 (PTRACE_ARG4_TYPE): Likewise.
11455 (PTRACE_XFER_TYPE): Likewise.
11456 (linux_detach_one_lwp): Cast fourth argument of
11457 ptrace to long then PTRACE_ARG4_TYPE.
11458 (regsets_fetch_inferior_registers): Cast third argument of
11459 ptrace to long then PTRACE_ARG3_TYPE.
11460 (regsets_store_inferior_registers): Likewise.
11462 2012-04-20 Pedro Alves <palves@redhat.com>
11464 * configure: Regenerate.
11466 2012-04-19 Pedro Alves <palves@redhat.com>
11468 * Makefile.in (GNULIB_BUILDDIR): New.
11469 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11470 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11471 (all, install-only, uninstall, clean-info, all-lib, clean): No
11472 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11473 (maintainer-clean realclean distclean): Use subdir_do.
11475 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11476 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11477 * acinclude.m4: Include acx_configure_dir.m4.
11478 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11479 calls. Call AC_PROG_RANLIB. Configure gnulib using
11482 (GNULIB_STDINT_H): Adjust.
11483 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11484 * gdbreplay.c: Include build-gnulib/config.h.
11485 * server.h: Likewise.
11486 * aclocal.m4: Regenerate.
11487 * config.in: Regenerate.
11488 * configure: Regenerate.
11490 2012-04-19 Pedro Alves <palves@redhat.com>
11492 * Makefile.in (LIBGNU, INCGNU): Adjust.
11493 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11494 (all, install-only, uninstall, clean-info, all-lib, clean)
11495 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11496 * configure.ac: Adjust AC_OUTPUT output.
11497 * aclocal.m4: Regenerate.
11498 * configure: Regenerate.
11500 2012-04-19 Pedro Alves <palves@redhat.com>
11502 * Makefile.in (generated_files): New.
11503 (server_h): Remove the explicit dependency on config.h, and depend
11504 on $generated_files.
11506 2012-04-19 Pedro Alves <palves@redhat.com>
11508 * Makefile.in (INCGNU): Add -Ignulib.
11510 2012-04-19 Pedro Alves <palves@redhat.com>
11512 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11513 (INCGNU): ... this, and spell out -I here.
11514 (GNULIB_LIB): Rename to ...
11515 (LIBGNU): ... this.
11516 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11518 2012-04-19 Pedro Alves <palves@redhat.com>
11520 * config.in: Regenerate.
11522 2012-04-19 Pedro Alves <palves@redhat.com>
11524 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11525 * server.h (memmem): Remove declaration.
11526 * config.in: Regenerate.
11527 * configure: Regenerate.
11529 2012-04-19 Yao Qi <yao@codesourcery.com>
11531 * Makefile.in (SFILES): Add common/vec.c.
11535 2012-04-19 Yao Qi <yao@codesourcery.com>
11537 * remote-utils.c (prepare_resume_reply): Replace with macro
11538 target_core_of_thread.
11539 * server.c (handle_qxfer_threads_proper): Likewise.
11540 * target.h (traget_core_of_thread): New macro.
11542 2012-04-18 Pedro Alves <palves@redhat.com>
11544 * aclocal.m4: Regenerate.
11545 * configure: Regenerate.
11547 2012-04-16 Yao Qi <yao@codesourcery.com>
11549 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11550 duplicated on address.
11552 2012-04-16 Yao Qi <yao@codesourcery.com>
11554 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11555 (struct tracepoint_action_ops) <send>: New field.
11556 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11557 (agent_expr_send, x_tracepoint_action_send): New.
11558 (l_tracepoint_action_send): New.
11559 (cmd_qtdp): Download and install tracepoint
11560 according to `use_agent'.
11561 (run_inferior_command): Add one more parameter `len'.
11563 (tracepoint_send_agent): New.
11564 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11566 2012-04-16 Yao Qi <yao@codesourcery.com>
11568 * tracepoint.c (download_tracepoints): Moved to ...
11569 (cmd_qtstart): ... here.
11571 2012-04-14 Yao Qi <yao@codesourcery.com>
11573 * tracepoint.c: Include inttypes.h.
11574 (struct collect_memory_action): Use sized types.
11575 (struct tracepoint): Likewise.
11576 (cmd_qtdp, stop_tracing): Update print specifiers.
11577 (cmd_qtp, response_tracepoint): Likewise.
11578 (collect_data_at_tracepoint): Likewise.
11579 (collect_data_at_step): Likewise.
11581 2012-04-14 Yao Qi <yao@codesourcery.com>
11583 Import gnulib module inttypes.
11584 * aclocal.m4, config.in, configure: Regenerated.
11586 2012-04-14 Yao Qi <yao@codesourcery.com>
11588 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11589 Makefile and config.status at last.
11591 2012-04-13 Yao Qi <yao@codesourcery.com>
11593 * tracepoint.c: Include stdint.h unconditionally.
11595 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11597 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11598 on BFD_HAVE_SYS_PROCFS_TYPE.
11599 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11600 * configure: Regenerate.
11601 * config.in: Likewise.
11603 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11605 * Makefile.in (clean): Also remove x32.c x32-linux.c
11606 x32-avx.c x32-avx-linux.c.
11607 (x32.o): New target.
11609 (x32-linux.o): Likewise.
11610 (x32-linux.c): Likewise.
11611 (x32-avx.o): Likewise.
11612 (x32-avx.c): Likewise.
11613 (x32-avx-linux.o): Likewise.
11614 (x32-avx-linux.c): Likewise.
11616 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11617 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11618 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11619 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11620 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11621 i386/x32-avx-linux.xml.
11623 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11624 (init_registers_x32_avx_linux): Likwise.
11625 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11626 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11628 2012-04-13 Pedro Alves <palves@redhat.com>
11630 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11631 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11632 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11633 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11636 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11638 * linux-x86-low.c (compat_x32_clock_t): New.
11639 (compat_x32_siginfo_t): Likewise.
11640 (compat_x32_siginfo_from_siginfo): Likewise.
11641 (siginfo_from_compat_x32_siginfo): Likewise.
11642 (linux_is_elf64): Likewise.
11643 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11644 and siginfo_from_compat_x32_siginfo for x32.
11645 (x86_arch_setup): Set linux_is_elf64.
11647 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11650 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11652 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11653 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11654 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11655 compatible with process.
11657 2012-04-12 Yao Qi <yao@codesourcery.com>
11659 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11660 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11661 (install-only, install-info, clean): Handle sub dir gnulib.
11662 (all-lib, am--refresh): New targets.
11663 (memmem.o): Remove target.
11664 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11665 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11666 (AC_REPLACE_FUNCS): Remove memmem.
11667 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11668 (AC_OUTPUT): Generate Makefile in gnulib/.
11669 * aclocal.m4, config.in, configure: Regenerated.
11671 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11673 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11675 2012-04-05 Pedro Alves <palves@redhat.com>
11677 -Werror=strict-aliasing
11679 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11682 2012-04-04 Pedro Alves <palves@redhat.com>
11684 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11685 (sparc_store_gregset_from_stack, sparc_store_gregset)
11686 (sparc_breakpoint_at): Fix formatting.
11688 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11690 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11692 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11693 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11694 * config.in: Regenerate.
11695 * configure: Likewise.
11697 2012-03-29 Pedro Alves <palves@redhat.com>
11699 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11700 Correct ptrace arguments.
11702 2012-03-28 Pedro Alves <palves@redhat.com>
11704 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11705 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11706 (IA64_FR1_REGNUM): New defines.
11707 (ia64_fetch_register): New.
11708 (the_low_target): Install it.
11709 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11711 * linux-low.c (linux_fetch_registers): Try the
11712 the_low_target.fetch_register hook first.
11714 * linux-arm-low.c (the_low_target): Adjust.
11715 * linux-bfin-low.c (the_low_target): Adjust.
11716 * linux-cris-low.c (the_low_target): Adjust.
11717 * linux-crisv32-low.c (the_low_target): Adjust.
11718 * linux-m32r-low.c (the_low_target): Adjust.
11719 * linux-m68k-low.c (the_low_target): Adjust.
11720 * linux-mips-low.c (the_low_target): Adjust.
11721 * linux-ppc-low.c (the_low_target): Adjust.
11722 * linux-s390-low.c (the_low_target): Adjust.
11723 * linux-sh-low.c (the_low_target): Adjust.
11724 * linux-sparc-low.c (the_low_target): Adjust.
11725 * linux-tic6x-low.c (the_low_target): Adjust.
11726 * linux-x86-low.c (the_low_target): Adjust.
11727 * linux-xtensa-low.c (the_low_target): Adjust.
11729 2012-03-26 Pedro Alves <palves@redhat.com>
11731 * server.c (handle_qxfer_libraries): Don't bail early if
11732 the_target->qxfer_libraries_svr4 is not NULL.
11734 2012-03-26 Pedro Alves <palves@redhat.com>
11736 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11738 2012-03-23 Pedro Alves <palves@redhat.com>
11740 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11741 "library-list-svr4" element's start tag when the the DSO list is
11744 2012-03-23 Pedro Alves <palves@redhat.com>
11746 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11747 a variable whose type size is the same as the inferior's pointer
11750 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11752 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11754 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11755 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11756 * linux-low.h: Include <signal.h>.
11757 (struct siginfo): Remove forward declaration.
11758 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11761 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11763 * .gitignore: Ignore more files.
11765 2012-03-19 Pedro Alves <palves@redhat.com>
11766 Jan Kratochvil <jan.kratochvil@redhat.com>
11768 * server.c (cont_thread, general_thread): Add describing comments.
11769 (start_inferior): Clear `cont_thread'.
11770 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11773 2012-03-15 Yao Qi <yao@codesourcery.com>
11775 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11777 (cmd_qtdp): ... here.
11779 2012-03-15 Yao Qi <yao@codesourcery.com>
11781 * tracepoint.c (struct tracepoint_action_ops): New.
11782 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11783 (m_tracepoint_action_download): New.
11784 (r_tracepoint_action_download): New.
11785 (x_tracepoint_action_download): New.
11786 (l_tracepoint_action_download): New.
11787 (add_tracepoint_action): Install `action->ops' according type.
11788 (download_tracepoint_1): Move code `download' function pointer
11789 of various tracepoint_action_ops.
11791 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11793 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11794 linux_ptrace_attach_warnings.
11796 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11798 * Makefile.in (linux-ptrace.o): New.
11799 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11800 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11801 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11802 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11803 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11805 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11807 2012-03-08 Yao Qi <yao@codesourcery.com>
11808 Pedro Alves <palves@redhat.com>
11810 Fix PR server/13392.
11811 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11812 offset of JMP insn.
11813 * tracepoint.c (remove_tracepoint): New.
11814 (cmd_qtdp): Call remove_tracepoint when failed to install.
11816 2012-03-07 Pedro Alves <palves@redhat.com>
11818 * linux-low.c (get_detach_signal): New.
11819 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11820 Pass on pending signals to PTRACE_DETACH. Check the result of the
11822 * server.c (program_signals, program_signals_p): New.
11823 (handle_general_set): Handle QProgramSignals.
11824 * server.h (program_signals, program_signals_p): Declare.
11826 2012-03-05 Pedro Alves <palves@redhat.com>
11827 Jan Kratochvil <jan.kratochvil@redhat.com>
11829 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11832 2012-03-03 Yao Qi <yao@codesourcery.com>
11834 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11835 agent_look_up_symbols.
11837 2012-03-03 Yao Qi <yao@codesourcery.com>
11839 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11840 (linux-x86-low.o): Likewise.
11841 * server.h: Remove in_process_agent_loaded.
11842 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11846 2012-03-03 Yao Qi <yao@codesourcery.com>
11848 * tracepoint.c (gdb_agent_capability): New global.
11849 (in_process_agent_loaded_ust): Renamed to
11850 `in_process_agent_supports_ust'.
11852 (in_process_agent_supports_ust): Call agent_capability_check.
11853 (clear_installed_tracepoints): Assert that agent supports
11856 2012-03-03 Yao Qi <yao@codesourcery.com>
11858 * linux-low.c (linux_supports_agent): New.
11859 (linux_target_ops): Initialize field `supports_agent' with
11860 linux_supports_agent.
11861 * target.h (struct target_ops) <supports_agent>: New.
11862 (target_supports_agent): New macro.
11863 * server.c (handle_general_set): Handle packet 'QAgent'.
11864 (handle_query): Send `QAgent+'.
11865 * Makefile.in (server.o): Depends on agent.h.
11867 2012-03-03 Yao Qi <yao@codesourcery.com>
11869 * Makefile.in (OBS): Add agent.o.
11870 Add new rule for agent.o.
11871 Track dependence of tracepoint.c on agent.h.
11872 * tracepoint.c (run_inferior_command_1):
11873 (run_inferior_command): Call agent_run_command.
11874 (gdb_ust_connect_sync_socket): Deleted. Move it to
11876 (resume_thread, stop_thread): Likewise.
11877 (gdb_ust_socket_init): Renamed to ...
11878 (gdb_agent_socket_init): ... New.
11879 (gdb_ust_thread): Renamed to ...
11880 (gdb_agent_helper_thread): ... New.
11881 (gdb_ust_init): Move some code to ...
11882 (gdb_agent_init): ... here. New.
11883 [HAVE_UST]: Call gdb_ust_init.
11884 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11885 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11886 * config.in, configure: Regenerated.
11888 2012-03-02 Pedro Alves <palves@redhat.com>
11890 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11891 * linux-low.c (struct simple_pid_list): New.
11892 (stopped_pids): New a struct simple_pid_list pointer.
11893 (add_to_pid_list, pull_pid_from_list): New.
11894 (handle_extended_wait): Don't assume the first signal new children
11895 report is SIGSTOP. Adjust call to pull_pid_from_list.
11896 (linux_wait_for_lwp): Adjust.
11898 2012-03-02 Yao Qi <yao@codesourcery.com>
11900 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11903 2012-03-02 Yao Qi <yao@codesourcery.com>
11905 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11906 `stop_pc' and `tpoint'. Update caller.
11908 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11910 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11911 * linux-low.c (use_linux_regsets): New macro.
11912 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11913 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11914 (linux_register_in_regsets): New function.
11915 (usr_fetch_inferior_registers): Skip registers covered by
11917 (usr_store_inferior_registers): Likewise.
11918 (usr_fetch_inferior_registers): New macro.
11919 (usr_store_inferior_registers): Likewise.
11920 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11921 (linux_store_registers): Likewise.
11922 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11924 (init_registers_mips64_dsp_linux): Likewise.
11925 (init_registers_mips_linux): New macro.
11926 (init_registers_mips_dsp_linux): Likewise.
11927 (mips_dsp_num_regs): Likewise.
11928 (DSP_BASE, DSP_CONTROL): New fallback macros.
11929 (mips_base_regs): New macro.
11930 (mips_regmap): Use it. Fix the size.
11931 (mips_dsp_regmap): New variable.
11932 (mips_dsp_regset_bitmap): Likewise.
11933 (mips_arch_setup): New function.
11934 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11936 (mips_cannot_store_register): Likewise.
11937 (the_low_target): Update .arch_setup, .num_regs and .regmap
11938 initializers. Add .regset_bitmap initializer.
11939 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11941 * linux-bfin-low.c (the_low_target): Likewise.
11942 * linux-cris-low.c (the_low_target): Likewise.
11943 * linux-crisv32-low.c (the_low_target): Likewise.
11944 * linux-ia64-low.c (the_low_target): Likewise.
11945 * linux-m32r-low.c (the_low_target): Likewise.
11946 * linux-m68k-low.c (the_low_target): Likewise.
11947 * linux-ppc-low.c (the_low_target): Likewise.
11948 * linux-s390-low.c (the_low_target): Likewise.
11949 * linux-sh-low.c (the_low_target): Likewise.
11950 * linux-sparc-low.c (the_low_target): Likewise.
11951 * linux-tic6x-low.c (the_low_target): Likewise.
11952 * linux-x86-low.c (the_low_target): Likewise.
11953 * linux-xtensa-low.c (the_low_target): Likewise.
11954 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11955 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11956 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11958 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11959 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11961 2012-02-29 Yao Qi <yao@codesourcery.com>
11962 Pedro Alves <palves@redhat.com>
11964 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11965 `step_over_finished' is true.
11967 2012-02-27 Pedro Alves <palves@redhat.com>
11969 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11970 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11972 2012-02-27 Pedro Alves <palves@redhat.com>
11975 * linux-low.c (pid_is_stopped): New.
11976 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11978 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11980 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11983 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11985 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11987 2012-02-24 Luis Machado <lgustavo@codesourcery>
11989 * server.c (handle_query): Advertise support for target-side
11990 breakpoint condition evaluation.
11991 (process_point_options): New function.
11992 (process_serial_event): When inserting a breakpoint, check for
11993 a target-side condition that should be evaluated.
11995 * mem-break.c: Include regcache.h and ax.h.
11996 (point_cond_list_t): New data structure.
11997 (breakpoint) <cond_list>: New field.
11998 (find_gdb_breakpoint_at): Make non-static.
11999 (delete_gdb_breakpoint_at): Clear any target-side
12001 (clear_gdb_breakpoint_conditions): New function.
12002 (add_condition_to_breakpoint): Likewise.
12003 (add_breakpoint_condition): Likewise.
12004 (gdb_condition_true_at_breakpoint): Likewise.
12005 (gdb_breakpoint_here): Return result directly instead
12006 of going through a local variable.
12008 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12009 (clear_gdb_breakpoint_conditions): Likewise.
12010 (add_breakpoint_condition): Likewise.
12011 (gdb_condition_true_at_breakpoint): Likewise.
12013 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12014 (need_step_over_p): Take target-side breakpoint condition into
12017 2012-02-24 Luis Machado <lgustavo@codesourcery>
12019 * server.h: Include tracepoint.h.
12020 (agent_mem_read, agent_get_trace_state_variable_value,
12021 agent_set_trace_state_variable_value,
12022 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12023 get_set_tsv_func_addr): New prototypes.
12025 * ax.h: New include file.
12026 * ax.c: New source file.
12028 * tracepoint.c: Include ax.h.
12029 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12030 agent_expr, eval_result_type): Move to ax.h.
12031 (parse_agent_expr): Rename to ...
12032 (gdb_parse_agent_expr): ... this, make it non-static and move
12034 (unparse_agent_expr) Rename to ...
12035 (gdb_unparse_agent_expr): ... this, make it non-static and move
12037 (eval_agent_expr): Rename to ...
12038 (eval_tracepoint_agent_expr): ... this.
12039 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12040 forward declarations.
12041 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12042 (agent_get_trace_state_variable_value): New function.
12043 (agent_set_trace_state_variable_value): New function.
12044 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12045 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12046 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12047 (condition_true_at_tracepoint): Likewise.
12048 (parse_agent_expr): Rename to ...
12049 (gdb_parse_agent_expr): ... this and move to ax.c.
12050 (unparse_agent_expr): Rename to ...
12051 (gdb_unparse_agent_expr): ... this and move to ax.c.
12052 (gdb_agent_op_name): Move to ax.c.
12053 (eval_agent_expr): Rename to ...
12054 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12056 (eval_tracepoint_agent_expr): New function.
12057 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12059 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12061 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12062 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12063 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12064 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12065 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12066 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12067 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12068 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12069 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12070 (compile_bytecodes): Remove forward declaration.
12071 (is_goto_target): Move to ax.c.
12072 (compile_bytecodes): Move to ax.c and call
12073 agent_get_trace_state_variable_value (...) and
12074 agent_set_trace_state_variable_value (...).
12076 * Makefile.in: Update ax.c and IPA dependencies.
12078 2012-02-24 Pedro Alves <palves@redhat.com>
12080 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12081 (cmd_bigqtbuffer_circular): ... this. Only handle
12082 'QTBuffer:circular:'.
12083 (handle_tracepoint_general_set): Adjust.
12085 2012-02-16 Yao Qi <yao@codesourcery.com>
12087 * inferiors.c: Move code to ...
12088 * dll.c: .... here. New.
12089 * server.h: Declare clear_dlls.
12090 * Makefile.in (SFILES): Add dll.c.
12094 2012-02-11 Yao Qi <yao@codesourcery.com>
12096 * server.c: (handle_monitor_command): Add a new parameter
12098 (handle_query): Update caller.
12100 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12102 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12103 * configure, config.in: Regenerate.
12104 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12107 2012-02-02 Pedro Alves <palves@redhat.com>
12109 Try SIGKILL first, then PTRACE_KILL.
12110 * linux-low.c (linux_kill_one_lwp): New.
12111 (linux_kill_one_lwp): Rename to ...
12112 (kill_one_lwp_callback): ... this. Use the new
12113 linux_kill_one_lwp.
12115 2012-02-02 Pedro Alves <palves@redhat.com>
12117 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12120 2012-01-27 Pedro Alves <palves@redhat.com>
12122 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12123 (elf_64_file_p): Make static.
12124 (linux_pid_exe_is_elf_64_file): New.
12125 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12126 Delete declarations.
12127 (linux_pid_exe_is_elf_64_file): Declare.
12128 * linux-x86-low.c (x86_arch_setup): Use
12129 linux_pid_exe_is_elf_64_file.
12131 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12133 * linux-low.c (linux_wait_for_event_1): Rename to ...
12134 (linux_wait_for_event): ... here and merge it with former
12135 linux_wait_for_event - new variable wait_ptid, use it.
12136 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12138 2012-01-23 Pedro Alves <palves@redhat.com>
12140 * server.c (main): Avoid yet another case of infinite loop while
12141 detaching/killing after a longjmp.
12143 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12146 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12148 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12150 * hostio.c (handle_readlink): New function.
12151 (handle_vFile): Call it to handle "vFile:readlink" packets.
12153 2012-01-20 Pedro Alves <palves@redhat.com>
12154 Ulrich Weigand <ulrich.weigand@linaro.org>
12156 * server.c (handle_v_requests): Only support vAttach and vRun to
12157 start multiple processes when in extended protocol mode.
12159 2012-01-17 Pedro Alves <palves@redhat.com>
12161 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12162 memalign plus mprotect to allocate the scratch buffer.
12164 2012-01-13 Pedro Alves <palves@redhat.com>
12166 * server.c (attach_inferior): Clear `cont_thread'.
12168 2012-01-13 Pedro Alves <palves@redhat.com>
12170 * server.c (main): Avoid infinite loop while detaching/killing
12173 2012-01-09 Doug Evans <dje@google.com>
12175 * server.c (start_inferior): Set last_ptid in --wrapper case.
12177 2012-01-06 Yao Qi <yao@codesourcery.com>
12179 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12181 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12183 2012-01-04 Yao Qi <yao@codesourcery.com>
12185 * tracepoint.c (cmd_qtdp): Print debug message
12186 for static tracepoint.
12188 2012-01-04 Yao Qi <yao@codesourcery.com>
12190 * tracepoint.c (trace_vdebug): Differentiate debug message
12191 between gdbserver and IPA.
12193 2012-01-03 Yao Qi <yao@codesourcery.com>
12195 * tracepoint.c (tracepoint_was_hit): Don't collect for
12198 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12200 * terminal.h: Reformat copyright header.
12202 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12204 * server.c (gdbserver_version): Update copyright year.
12205 * gdbreplay.c (gdbreplay_version): Likewise.
12207 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12209 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12212 2011-12-18 Hui Zhu <teawater@gmail.com>
12213 * linux-low.c (linux_create_inferior): Save return value to ret.
12215 2011-12-18 Hui Zhu <teawater@gmail.com>
12217 * linux-low.c (linux_create_inferior): Save return value to ret.
12219 2011-12-16 Doug Evans <dje@google.com>
12221 * linux-low.c (linux_create_inferior): If stdio connection,
12222 redirect stdin from /dev/null, stdout to stderr.
12223 * remote-utils.c (remote_is_stdio): New static global.
12224 (remote_connection_is_stdio): New function.
12225 (remote_prepare): Handle stdio connection.
12226 (remote_open): Ditto.
12227 (remote_close): Don't close stdin for stdio connections.
12228 (read_prim,write_prim): New functions. Replace all calls to
12229 read/write to these.
12230 * server.c (main): Watch for "-" argument. Move call to
12231 remote_prepare before start_inferior.
12232 * server.h (STDIO_CONNECTION_NAME): New macro.
12233 (remote_connection_is_stdio): Declare.
12235 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12236 in debugging output.
12238 2011-12-15 Yao Qi <yao@codesourcery.com>
12240 * tracepoint.c: Include sys/syscall.h.
12241 (gdb_ust_thread): Remove preprocessor conditional.
12243 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12245 * linux-low.c (linux_detach_one_lwp): Call
12246 the_low_target.prepare_to_resume before detaching.
12248 2011-12-14 Yao Qi <yao@codesourcery.com>
12250 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12253 2011-12-14 Yao Qi <yao@codesourcery.com>
12255 * i386-low.c (i386_low_stopped_data_address): Initialize local
12256 variable `control'.
12258 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12262 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12263 DR_CONTROL unless necessary. Extend comments.
12264 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12265 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12267 2011-12-13 Yao Qi <yao@codesourcery.com>
12269 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12271 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12273 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12275 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12276 Print new debug message for such case.
12278 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12280 Fix overlapping memcpy.
12281 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12282 the read_inferior_memory transfer.
12283 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12284 write_inferior_memory transfer.
12285 (set_fast_tracepoint_jump): New variable buf. Use it for the
12286 read_inferior_memory and write_inferior_memory transfers.
12287 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12288 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12289 Use it for the write_inferior_memory transfer.
12290 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12293 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12295 * linux-low.c (fetch_register, store_register): Make code
12296 consistent, fix formatting.
12298 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12300 * linux-low.c (usr_store_inferior_registers): Factor out code
12301 to handle individual registers into...
12302 (store_register): ... this new function.
12304 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12306 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12307 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12308 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12309 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12310 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12311 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12312 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12313 (srv_xmlfiles): Add new XML files.
12315 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12317 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12318 (init_registers_s390_linux32v1): Add prototype.
12319 (init_registers_s390_linux32v2): Likewise.
12320 (init_registers_s390_linux64v1): Likewise.
12321 (init_registers_s390_linux64v2): Likewise.
12322 (init_registers_s390x_linux64v1): Likewise.
12323 (init_registers_s390x_linux64v2): Likewise.
12324 (s390_num_regs): Increment to 52.
12325 (s390_regmap): Add orig_r2 register.
12326 (s390_num_regs_3264): Increment to 68.
12327 (s390_regmap_3264): Add orig_r2 register.
12328 (s390_collect_ptrace_register): Handle orig_r2 register.
12329 (s390_supply_ptrace_register): Likewise.
12330 (s390_fill_last_break): New function.
12331 (s390_store_last_break): Likewise.
12332 (s390_fill_system_call): New function.
12333 (s390_store_system_call): Likewise.
12334 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12336 (s390_check_regset): New function.
12337 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12338 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12339 Update target_regsets for available register sets.
12341 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12342 Jan Kratochvil <jan.kratochvil@redhat.com>
12344 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12345 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12347 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12348 * linux-low.h (struct process_info_private): New member r_debug.
12349 * server.c (handle_qxfer_libraries): Call
12350 the_target->qxfer_libraries_svr4.
12351 (handle_qxfer_libraries_svr4): New function.
12352 (qxfer_packets): New entry "libraries-svr4".
12353 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12354 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12355 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12356 PACKET_qXfer_libraries_svr4.
12358 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12360 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12361 PSW address/mask between 8-byte and 16-byte formats.
12362 (s390_supply_ptrace_register): Likewise.
12363 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12364 basic addressing mode bit.
12366 2011-11-24 Stan Shebs <stan@codesourcery.com>
12368 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12370 2011-11-17 Stan Shebs <stan@codesourcery.com>
12372 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12373 (tracing_start_time): New global.
12374 (tracing_stop_time): New global.
12375 (tracing_user_name): New global.
12376 (tracing_notes): New global.
12377 (tracing_stop_note): New global.
12378 (cmd_qtstart): Set traceframe_usage, start_time.
12379 (stop_tracing): Set stop_time.
12380 (cmd_qtstatus): Report additional status.
12381 (cmd_qtp): New function.
12382 (handle_tracepoint_query): Call it.
12383 (cmd_qtnotes): New function.
12384 (handle_tracepoint_general_set): Call it.
12385 (get_timestamp): Rename from tsv_get_timestamp.
12387 2011-11-14 Stan Shebs <stan@codesourcery.com>
12388 Kwok Cheung Yeung <kcy@codesourcery.com>
12390 * linux-x86-low.c (small_jump_insn): New.
12391 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12392 trampoline and error message, build a trampoline and issue a small
12393 jump instruction to it.
12394 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12395 trampoline and error message.
12396 (x86_get_min_fast_tracepoint_insn_len): New.
12397 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12398 * linux-low.h (struct linux_target_ops): Add arguments to
12399 install_fast_tracepoint_jump_pad operation, add new operation.
12400 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12402 (linux_get_min_fast_tracepoint_insn_len): New function.
12403 (linux_target_op): Add new operation.
12404 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12405 (gdb_trampoline_buffer_end): Ditto.
12406 (gdb_trampoline_buffer_error): Ditto.
12407 (struct ipa_sym_addresses): Add fields for new IPA variables.
12408 (symbol_list): Add entries for new IPA variables.
12409 (struct tracepoint): Add fields to hold the address range of the
12410 trampoline used by the tracepoint.
12411 (trampoline_buffer_head): New static variable.
12412 (trampoline_buffer_tail): Ditto.
12413 (claim_trampoline_space): New function.
12414 (have_fast_tracepoint_trampoline_buffer): New function.
12415 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12417 (install_fast_tracepoint): Ditto, also add error buffer argument.
12418 (cmd_qtminftpilen): New function.
12419 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12420 (fast_tracepoint_from_trampoline_address): New function.
12421 (fast_tracepoint_collecting): Handle trampoline as part of jump
12423 (set_trampoline_buffer_space): New function.
12424 (initialize_tracepoint): Initialize new IPA variables.
12425 * target.h (struct target_ops): Add arguments to
12426 install_fast_tracepoint_jump_pad operation, add new
12427 get_min_fast_tracepoint_insn_len operation.
12428 (target_get_min_fast_tracepoint_insn_len): New.
12429 (install_fast_tracepoint_jump_pad): Add arguments.
12430 * server.h (IPA_BUFSIZ): Define.
12431 * linux-i386-ipa.c: Include extra header files.
12432 (initialize_fast_tracepoint_trampoline_buffer): New function.
12433 (initialize_low_tracepoint): Call it.
12434 * server.h (set_trampoline_buffer_space): Declare.
12435 (claim_trampoline_space): Ditto.
12436 (have_fast_tracepoint_trampoline_buffer): Ditto.
12438 2011-11-14 Yao Qi <yao@codesourcery.com>
12440 * server.c (handle_query): Handle InstallInTrace for qSupported.
12441 * tracepoint.c (add_tracepoint): Sort list.
12442 (install_tracepoint, download_tracepoint): New.
12443 (cmd_qtdp): Call them to install and download tracepoints.
12444 (sort_tracepoints): Removed.
12445 (cmd_qtstart): Update.
12447 2011-11-14 Yao Qi <yao@codesourcery.com>
12449 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12450 * mem-break.h: Declare.
12451 * tracepoint.c (cmd_qtstart): Move some code to ...
12452 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12454 (download_tracepoints): Move some code to ...
12455 (download_tracepoint_1): ... here. New.
12457 2011-11-08 Yao Qi <yao@codesourcery.com>
12459 * remote-utils.c (relocate_instruction): A comment fix.
12461 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12463 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12464 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12465 dr_status_mirror and dr_control_mirror from debug_reg_state.
12466 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12467 (i386_initial_stuff): Remove use of deleted globals.
12468 (i386_get_thread_context, i386_set_thread_context,
12469 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12470 from debug_reg_state.
12472 2011-11-05 Yao Qi <yao@codesourcery.com>
12474 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12475 address as TPOINT's.
12477 2011-11-02 Stan Shebs <stan@codesourcery.com>
12479 * tracepoint.c (agent_mem_read_string): New function.
12480 (eval_agent_expr): Call it for tracenz.
12481 * server.c (handle_query): Report support for tracenz.
12483 2011-11-02 Yao Qi <yao@codesourcery.com>
12485 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12487 2011-11-02 Yao Qi <yao@codesourcery.com>
12489 * target.h: Fix a typo in comment.
12491 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12493 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12494 clobber the breakpoints' shadows with fast tracepoint jumps.
12495 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12496 * target.c (write_inferior_memory): Also pass MYADDR down to
12499 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12501 * configure.ac: Check support for personality routine.
12502 * configure: Regenerate.
12503 * config.in: Likewise.
12504 * linux-low.c: Include <sys/personality.h>.
12505 Define ADDR_NO_RANDOMIZE if necessary.
12506 (linux_create_inferior): Disable address space randomization when
12507 forking inferior, if requested.
12508 (linux_supports_disable_randomization): New function.
12509 (linux_target_ops): Install it.
12510 * server.h (disable_randomization): Declare.
12511 * server.c (disable_randomization): New global variable.
12512 (handle_general_set): Handle QDisableRandomization.
12513 (handle_query): Likewise for qSupported.
12514 (main): Support --disable-randomization and --no-disable-randomization
12515 command line arguments.
12516 * target.h (struct target_ops): Add supports_disable_randomization.
12517 (target_supports_disable_randomization): New macro.
12519 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12521 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12523 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12524 [!PT_GETDSBT] (target_loadmap): New definition.
12525 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12526 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12527 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12528 and PT_GETDSBT to LINUX_LOADMAP.
12529 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12530 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12532 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12534 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12535 (arm_linux_hwbp_cap): New static variable.
12536 (arm_linux_get_hwbp_cap): Replace by ...
12537 (arm_linux_init_hwbp_cap): ... this new function.
12538 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12539 (arm_linux_get_hw_watchpoint_count): Likewise.
12540 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12541 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12542 (arm_prepare_to_resume): Use perror_with_name instead of error.
12544 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12546 * linux-arm-low.c: Include <signal.h>.
12547 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12548 (struct arm_linux_hwbp_cap): New data type.
12549 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12550 (struct arm_linux_hw_breakpoint): New data type.
12551 (MAX_BPTS, MAX_WPTS): Define.
12552 (struct arch_process_info, struct arch_lwp_info): New data types.
12553 (arm_linux_get_hwbp_cap): New function.
12554 (arm_linux_get_hw_breakpoint_count): Likewise.
12555 (arm_linux_get_hw_watchpoint_count): Likewise.
12556 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12557 (arm_hwbp_control_initialize): Likewise.
12558 (arm_hwbp_control_is_enabled): Likewise.
12559 (arm_hwbp_control_is_initialized): Likewise.
12560 (arm_hwbp_control_disable): Likewise.
12561 (arm_linux_hw_breakpoint_equal): Likewise.
12562 (arm_linux_hw_point_initialize): Likewise.
12563 (struct update_registers_data): New data structure.
12564 (update_registers_callback: New function.
12565 (arm_insert_point): Likewise.
12566 (arm_remove_point): Likewise.
12567 (arm_stopped_by_watchpoint): Likewise.
12568 (arm_stopped_data_address): Likewise.
12569 (arm_new_process): Likewise.
12570 (arm_new_thread): Likewise.
12571 (arm_prepare_to_resume): Likewise.
12572 (the_low_target): Register arm_insert_point, arm_remove_point,
12573 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12574 arm_new_thread, and arm_prepare_to_resume.
12576 2011-09-15 Stan Shebs <stan@codesourcery.com>
12578 * server.h (struct emit_ops): Add compare-goto fields.
12579 * tracepoint.c (gdb_agent_op_sizes): New table.
12580 (emit_eq_goto): New function.
12581 (emit_ne_goto): New function.
12582 (emit_lt_goto): New function.
12583 (emit_le_goto): New function.
12584 (emit_gt_goto): New function.
12585 (emit_ge_goto): New function.
12586 (is_goto_target): New function.
12587 (compile_bytecodes): Recognize special cases of compare-goto
12588 combinations and call specialized emitters for them.
12589 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12590 (amd64_emit_ne_goto): New function.
12591 (amd64_emit_lt_goto): New function.
12592 (amd64_emit_le_goto): New function.
12593 (amd64_emit_gt_goto): New function.
12594 (amd64_emit_ge_goto): New function.
12595 (amd64_emit_ops): Add the new functions.
12596 (i386_emit_eq_goto): New function.
12597 (i386_emit_ne_goto): New function.
12598 (i386_emit_lt_goto): New function.
12599 (i386_emit_le_goto): New function.
12600 (i386_emit_gt_goto): New function.
12601 (i386_emit_ge_goto): New function.
12602 (i386_emit_ops): Add the new functions.
12604 2011-09-08 Stan Shebs <stan@codesourcery.com>
12606 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12607 (i386_emit_epilogue): Restore %ebx.
12609 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12611 * server.c (step_thread): Remove definition.
12612 (process_serial_event): Don't handle Hs.
12613 * server.h (step_thread): Remove declaration.
12614 * target.c (set_desired_inferior): Remove use of step_thread.
12616 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12618 * linux-low.c: Include linux-procfs.h.
12619 (linux_attach_lwp_1): Update comments.
12620 (linux_attach): Scan for existing threads when attaching to a
12621 process that is the tgid.
12622 * Makefile.in: Update dependencies.
12624 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12626 * configure.srv: Add linux-procfs.o dependencies.
12628 2011-08-14 Yao Qi <yao@codesourcery.com>
12630 * target.h (struct target_ops): Fix indent.
12631 * win32-low.c (win32_target_ops): Fix comment.
12633 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12634 Yao Qi <yao@codesourcery.com>
12636 * Makefile.in (clean): Remove tic6x-*.c files.
12637 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12638 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12639 (tic6x-c64xp-linux.c): Likewise.
12640 * configure.srv: Add support for tic6x-*-uclinux.
12641 * linux-tic6x-low.c: New.
12642 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12644 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12645 Yao Qi <yao@codesourcery.com>
12647 * target.h (struct target_ops): Add read_loadmap.
12648 * linux-low.c (struct target_loadseg): New type.
12649 (struct target_loadmap): New type.
12650 (linux_read_loadmap): New function.
12651 (linux_target_ops): Add linux_read_loadmap.
12652 * server.c (handle_query): Support qXfer:fdpic:read packet.
12653 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12656 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12658 * win32-low.c: Include <stdint.h>.
12660 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12662 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12663 to the inferior here.
12664 (i386_remove_aligned_watchpoint): Ditto.
12665 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12666 fit part of the watchpoint in the debug registers.
12667 (i386_update_inferior_debug_regs): New.
12668 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12669 registers, and only update the inferior on success.
12670 (i386_low_remove_watchpoint): Ditto.
12672 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12674 * linux-low.c (compare_ints, unique, list_threads, show_process,
12675 linux_core_of_thread): Delete.
12676 (linux_target_ops): Change linux_core_of_thread to
12677 linux_common_core_of_thread.
12678 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12679 * utils.c (malloc_failure): Change type of argument.
12680 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12681 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12682 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12683 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12684 (IPA_OBJS): Add common-utils-ipa.o.
12685 (ptid_h, linux_osdata_h): New macros.
12686 (server_h): Add common/common-utils.h, common/xml-utils.h,
12687 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12689 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12690 ptid.o, buffer.o): New rules.
12691 (linux-low.o): Add common/linux-osdata.h as a dependency.
12692 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12693 * configure.ac: Add AC_HEADER_DIRENT check.
12694 * config.in: Regenerate.
12695 * configure: Regenerate.
12696 * remote-utils.c (xml_escape_text): Delete.
12697 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12698 buffer_xml_printf): Move to common/buffer.c.
12699 * server.c (main): Remove call to initialize_inferiors.
12700 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12701 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12702 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12703 internal_error, gdb_assert, gdb_assert_fail): Delete.
12704 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12705 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12707 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12708 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12709 initialize_inferiors): Delete.
12711 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12713 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12716 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12718 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12720 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12722 2011-05-26 Yao Qi <yao@codesourcery.com>
12724 * Makefile.in (thread-db.o): Track dependence to
12725 common/gdb_thread_db.h.
12726 * thread-db.c: include gdb_thread_db.h from right place.
12728 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12730 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12731 __FILE__ and __LINE__ to internal_error.
12733 2011-05-13 Doug Evans <dje@google.com>
12735 * thread-db.c (try_thread_db_load_from_sdir): New function.
12736 (try_thread_db_load_from_dir): New function.
12737 (thread_db_load_search): Handle $sdir, ignore $pdir.
12738 Remove trying of system directories if search of
12739 libthread-db-search-path fails, that is now done via $sdir.
12741 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12743 * server.c (handle_query): Add EnableDisableTracepoints to the list
12744 of supported features.
12745 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12747 (cmd_qtenable_disable): New.
12748 (cmd_qtstart): Install tracepoints even if disabled.
12749 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12750 receiving a QTEnable or QTDisable packet.
12751 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12752 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12754 (gdb_probe): Skip data collection if static tracepoint is disabled.
12756 2011-05-10 Doug Evans <dje@google.com>
12758 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12760 2011-05-04 Doug Evans <dje@google.com>
12762 * linux-low.c (linux_join): Skip process lookup.
12763 * spu-low.c (spu_join): Ditto.
12764 * server.c (join_inferiors_callback): Delete.
12765 (process_serial_event): For 'D' packet (detach) call join_inferior
12768 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12770 * README: Don't mention xscale*-*-linux*.
12771 * configure.srv (xscale*-*-linux*): Don't handle target.
12773 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12775 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12777 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12778 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12779 (i386_emit_void_call_2): Likewise.
12781 2011-04-26 Yao Qi <yao@codesourcery.com>
12783 * linux-low.c: Move common macros to linux-ptrace.h.
12784 Include linux-ptrace.h.
12785 * Makefile.in (linux_ptrace_h): New.
12786 (linux-low.o): Depends on linux-ptrace.h.
12788 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12790 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12791 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12792 (remote_prepare): New function with most of the TCP code from ...
12793 (remote_open): ... here. Detect PORT here unconditionally. Move also
12794 setting transport_is_reliable.
12795 * server.c (run_once): New variable.
12796 (gdbserver_usage): Document it.
12797 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12798 the first run if RUN_ONCE.
12799 * server.h (run_once, remote_prepare): New declarations.
12801 2011-04-19 Tom Tromey <tromey@redhat.com>
12803 * win32-low.c (handle_load_dll): Remove duplicate "the".
12805 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12807 Remove support for old Cygwin 1.5 versions.
12808 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12809 function to avoid warning.
12810 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12813 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12815 * gdbserver/server.h (Macro _): Define it if not available.
12817 2011-03-14 Michael Snyder <msnyder@vmware.com>
12819 * hostio.c (handle_close): Remove unnecessary null test.
12821 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12823 * Makefile.in (maintainer-clean realclean distclean): Remove
12824 "make ... subdir_do" command.
12826 2011-03-10 Michael Snyder <msnyder@vmware.com>
12828 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12830 * server.c (handle_v_run): Free alloced buffer on early return.
12832 2011-03-09 Yao Qi <yao@codesourcery.com>
12835 2011-03-04 Yao Qi <yao@codesourcery.com>
12837 * Makefile.in: Remove GNU make feature --directory.
12839 2011-03-05 Yao Qi <yao@codesourcery.com>
12841 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12842 (subdir_do): New make target. Copied from gdb/Makefile.
12843 (maintainer-clean, realclean, distclean, clean): Call corresponding
12844 make targets in common/Makefile.
12846 2011-02-11 Yao Qi <yao@codesourcery.com>
12848 * configure.ac: Call AC_PROG_RANLIB.
12849 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12850 * configure: Regenerate.
12852 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12854 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12856 2011-03-06 Yao Qi <yao@codesourcery.com>
12858 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12860 2011-03-05 Yao Qi <yao@codesourcery.com>
12862 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12863 (subdir_do): New make target. Copied from gdb/Makefile.
12864 (maintainer-clean, realclean, distclean, clean): Call corresponding
12865 make targets in common/Makefile.
12867 2011-03-04 Yao Qi <yao@codesourcery.com>
12869 * Makefile.in: Remove GNU make feature --directory.
12871 2011-03-04 Michael Snyder <msnyder@vmware.com>
12873 * server.c (queue_stop_reply): Call xmalloc not malloc.
12875 2011-03-02 Michael Snyder <msnyder@vmware.com>
12877 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12879 2011-02-28 Michael Snyder <msnyder@vmware.com>
12881 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12882 (cmd_qtframe): Ditto.
12883 (cmd_qtbuffer): Ditto.
12884 (cmd_bigqtbuffer): Ditto.
12886 * utils.c (decimal2str): Initialize 'width' to nine, then
12887 don't mess with it.
12889 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12891 * hostio.c (require_data): Free *data, not data.
12893 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12895 * hostio.c (require_data): Use free, not xfree.
12897 2011-02-27 Michael Snyder <msnyder@vmware.com>
12899 * server.c (handle_query): Discard unused value.
12901 * hostio.c (require_data): Free malloc memory before returning
12904 2011-02-26 Michael Snyder <msnyder@vmware.com>
12906 * linux-low.c (list_threads): Call closedir for dirent.
12908 2011-02-27 Michael Snyder <msnyder@vmware.com>
12910 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12911 a case statement falls through.
12913 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12915 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12918 2011-02-26 Michael Snyder <msnyder@vmware.com>
12920 * utils.c (decimal2str): Eliminate dead code and dead param.
12921 (pulongest): Drop dead param from call to decimal2str.
12924 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12926 Revert the following patch (not approved yet):
12927 2011-02-21 Hui Zhu <teawater@gmail.com>
12928 * tracepoint.c (tp_printf): New function.
12929 (eval_agent_expr): Handle gdb_agent_op_printf.
12931 2011-02-21 Hui Zhu <teawater@gmail.com>
12933 * tracepoint.c (tp_printf): New function.
12934 (eval_agent_expr): Handle gdb_agent_op_printf.
12936 2011-02-18 Tom Tromey <tromey@redhat.com>
12938 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12939 (tracepoint.o): Likewise.
12940 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12941 (gdb_agent_op_names): Likewise.
12943 2011-02-18 Tom Tromey <tromey@redhat.com>
12945 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12946 gdb_agent_op_rot>: New constants.
12947 (gdb_agent_op_names): Add pick and roll.
12948 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12951 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12953 * aclocal.m4: Regenerated with aclocal-1.11.1.
12955 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12957 * server.c (handle_qxfer_traceframe_info): New.
12958 (qxfer_packets): Register "traceframe-info".
12959 (handle_query): Report support for qXfer:traceframe-info:read+.
12960 * tracepoint.c (match_blocktype): New.
12961 (traceframe_find_block_type): Rename to ...
12962 (traceframe_walk_blocks): ... this. Add callback filter argument,
12964 (traceframe_find_block_type): New, reimplemented on top of
12965 traceframe_walk_blocks.
12966 (build_traceframe_info_xml): New.
12967 (traceframe_read_info): New.
12968 * server.h (traceframe_read_info): Declare.
12970 2011-02-11 Yao Qi <yao@codesourcery.com>
12972 * configure.ac: Call AC_PROG_RANLIB.
12973 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12974 * configure: Regenerate.
12976 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12978 * server.c (gdb_read_memory): Change return semantics to allow
12980 (handle_search_memory_1): Adjust.
12981 (process_serial_event) <'m' packet>: Handle partial transfers.
12982 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12984 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12986 * regcache.c (init_register_cache): Initialize
12987 regcache->register_status.
12988 (free_register_cache): Release regcache->register_status.
12989 (regcache_cpy): Copy register_status.
12990 (registers_to_string): Print 'x's for unavailable registers.
12991 (supply_register): Mark the register's status valid or
12992 unavailable, depending on whether a buffer was passed in or not.
12993 (supply_register_zeroed): New.
12994 (supply_regblock): Mark the registers' status valid or
12995 unavailable, depending on whether a buffer was passed in or not.
12996 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12997 (struct regcache): New `register_status' field.
12998 (supply_register_zeroed): Declare.
12999 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13000 supply_register_zeroed, rather than passing a NULL buffer to
13002 * tracepoint.c (fetch_traceframe_registers): Update comment.
13004 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13006 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13009 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13011 * server.h (decode_xfer_write): Change prototype.
13012 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13013 and don't extract the annex here.
13014 * server.c (decode_xfer_read): Remove `annex' parameter,
13015 and don't extract the annex here.
13016 (decode_xfer): New.
13017 (struct qxfer): New.
13018 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13019 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13020 (handle_qxfer_statictrace): New functions, abstracted out from
13021 handle_query, and made to use the struct qxfer interface.
13022 (handle_threads_qxfer_proper): Rename to ...
13023 (handle_qxfer_threads_proper): ... this.
13024 (handle_threads_qxfer): Rename to ...
13025 (handle_qxfer_threads): ... this. Adjust.
13026 (qxfer_packets): New array.
13027 (handle_qxfer): New function.
13028 (handle_query): Use handle_qxfer.
13030 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13032 * gdbreplay.c: Shorten lines of >= 80 columns.
13033 * linux-low.c: Ditto.
13034 * linux-ppc-low.c: Ditto.
13035 * linux-s390-low.c: Ditto.
13036 * linux-sparc-low.c: Ditto.
13037 * linux-x86-low.c: Ditto.
13038 * linux-xtensa-low.c: Ditto.
13039 * mem-break.c: Ditto.
13040 * nto-low.c: Ditto.
13041 * regcache.h: Ditto.
13042 * remote-utils.c: Ditto.
13045 * thread-db.c: Ditto.
13046 * tracepoint.c: Ditto.
13048 * win32-low.h: Ditto.
13050 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13052 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13055 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13057 * server.c (gdbserver_version): Update copyright year in version
13059 * gdbreplay.c (gdbreplay_version): Ditto.
13061 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13063 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13064 * linux-bfin-low.c: New file.
13065 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13066 PT_DATA_ADDR for BFIN targets.
13067 * Makefile.in (SFILES): Add linux-bfin-low.c.
13068 (clean): Remove reg-bfin.c.
13069 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13070 * README: Mention supported Blackfin targets.
13072 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13074 * .gitignore: New file.
13076 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13078 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13080 2010-10-22 Jie Zhang <jie@codesourcery.com>
13082 * Makefile.in: Add FLAGS_TO_PASS variable.
13083 (install): Remove dependency of install-only and recursively
13084 invoke make for install-only.
13086 2010-10-04 Doug Evans <dje@google.com>
13088 * Makefile.in (uninstall): Use $(DESTDIR).
13090 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13094 * linux-x86-low.c (compat_siginfo_from_siginfo)
13095 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13096 si_code is < 0. Check for si_code == SI_TIMER before checking for
13099 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13101 * lynx-i386-low.c: New file.
13102 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13104 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13106 * lynx-low.c (ptrace_request_to_str): Remove handling for
13107 request values that have been removed in LynxOS 5.x.
13109 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13111 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13114 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13116 * configure.ac: Add --enable-inprocess-agent option.
13117 * configure: Rebuilt.
13119 2010-09-06 Yao Qi <yao@codesourcery.com>
13121 * linux-low.c (linux_kill): Remove unused variable.
13122 (linux_stabilize_threads): Likewise.
13123 * server.c (start_inferior): Likewise.
13124 (queue_stop_reply_callback): Likewise.
13125 * tracepoint.c (do_action_at_tracepoint): Likewise.
13127 2010-09-06 Yao Qi <yao@codesourcery.com>
13129 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13132 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13134 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13136 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13138 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13141 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13143 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13144 gdbserver/lynx-ppc-low.c: New files.
13145 * Makefile.in (lynx_low_h): New variable.
13146 (lynx-low.o, lynx-ppc-low.o): New rules.
13147 * configure.ac: On LynxOS, link with -lnetinet.
13148 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13149 * configure: regenerate.
13151 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13153 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13154 * configure.ac: Add check for vasprintf and vsnprintf.
13155 * configure, config.in: Regenerate.
13156 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13158 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13160 * gdbreplay.c: Move include of alloca.h up, next to include of
13162 * server.h: Add include of malloc.h.
13163 * mem-break.c: Remove include of malloc.h.
13164 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13166 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13168 * Makefile.in (memmem.o): Build with -Wno-error.
13170 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13172 * utils.c (xsnprintf): Make non-static.
13173 * server.h: Add xsnprintf declaration.
13174 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13175 replace calls to snprintf by calls to xsnprintf throughout.
13177 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13179 * configure.ac: Add configure check for alloca.
13180 * configure, config.in: Regenerate.
13181 * server.h: Include alloca.h if it exists.
13182 * gdbreplay.c: Include alloca.h if it exists.
13184 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13186 * linux-low.c (__SIGRTMIN): Define if not already defined.
13187 (linux_create_inferior): Check for __ANDROID__ rather than
13189 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13190 are already deferred.
13191 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13192 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13193 stopped and already has a pending signal to report.
13194 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13195 a pending signal to report or is moving out of a jump pad.
13196 (linux_init_signals): Check for __ANDROID__ rather than
13199 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13201 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13202 debug_threads check. Avoid a linear search when not doing debug
13205 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13207 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13208 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13209 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13210 (process_event): Change local fd's type to gdb_fildes_t.
13211 (create_file_handler): Adjust prototype.
13212 (delete_file_handler): Adjust prototype.
13213 (handle_file_event): Adjust prototype. Use pfildes.
13214 (create_file_event): Adjsut prototype.
13215 * remote-utils.c (remote_desc, listen_desc): Change type to
13217 * server.h: New gdb_fildes_t typedef.
13218 [USE_WIN32API]: Include winsock2.h.
13219 (delete_file_handler, add_file_handler): Adjust prototypes.
13220 (pfildes): Declare.
13221 * utils.c (pfildes): New.
13223 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13225 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13226 * configure: Regenerate.
13228 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13230 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13231 (linux_done_accessing_memory): ... this.
13232 (linux_target_ops): Adjust.
13233 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13234 * nto-low.c (nto_target_ops): Adjust comment.
13235 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13236 * spu-low.c (spu_target_ops): Adjust comment.
13237 * target.h (target_ops): Rename unprepare_to_access_memory field
13238 to done_accessing_memory.
13239 (unprepare_to_access_memory): Rename to ...
13240 (done_accessing_memory): ... this.
13242 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13244 * linux-low.c (linux_prepare_to_access_memory): New.
13245 (linux_unprepare_to_access_memory): New.
13246 (linux_target_ops): Install them.
13247 * server.c (read_memory): Rename to ...
13248 (gdb_read_memory): ... this. Use
13249 prepare_to_access_memory/prepare_to_access_memory.
13250 (write_memory): Rename to ...
13251 (gdb_write_memory): ... this. Use
13252 prepare_to_access_memory/prepare_to_access_memory.
13253 (handle_search_memory_1): Adjust.
13254 (process_serial_event): Adjust.
13255 * target.h (struct target_ops): New fields
13256 prepare_to_access_memory and unprepare_to_access_memory.
13257 (prepare_to_access_memory, unprepare_to_access_memory): New.
13258 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13259 prepare_to_access_memory/prepare_to_access_memory.
13260 * nto-low.c (nto_target_ops): Adjust.
13261 * spu-low.c (spu_target_ops): Adjust.
13262 * win32-low.c (win32_target_ops): Adjust.
13264 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13266 * Makefile.in (WARN_CFLAGS): Get it from configure.
13267 (WERROR_CFLAGS): New.
13268 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13269 * configure.ac: Introduce --enable-werror, which adds -Werror to
13270 the compiler command line. Enabled by default. Disable with
13271 --disable-werror. Add -Wdeclaration-after-statement
13272 Wpointer-arith and -Wformat-nonliteral to warning flags.
13273 * configure: Regenerate.
13275 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13277 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13279 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13281 * gdbreplay.c (remote_error): New.
13283 (expect): Use gdbchar. Check for error reading from GDB.
13284 Clarify sync error output.
13285 (play): Check for errors writing to GDB.
13286 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13287 * remote-utils.c (getpkt): Check for errors writing to the remote
13290 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13292 * linux-low.c (linux_wait_1): Move non-debugging code out of
13293 `debug_threads' control.
13295 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13297 * linux-low.c (linux_wait_1): Don't set last_status here.
13298 * server.c (push_event, queue_stop_reply_callback): Assert we're
13299 not pushing a TARGET_WAITKIND_IGNORE event.
13300 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13301 (myresume, handle_target_event): Set the thread's last_resume_kind
13302 and last_status from the target returned status.
13304 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13308 * linux-x86-low.c (update_debug_registers_callback): New.
13309 (i386_dr_low_set_addr): Use it.
13310 (i386_dr_low_get_addr): New.
13311 (i386_dr_low_set_control): Use update_debug_registers_callback.
13312 (i386_dr_low_get_control): New.
13313 (i386_dr_low_get_status): Adjust.
13314 * linux-low.c (linux_stop_lwp): New.
13315 * linux-low.h (linux_stop_lwp): Declare.
13317 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13318 argument instead of a i386_debug_reg_state.
13319 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13320 a i386_debug_reg_state.
13321 (i386_insert_aligned_watchpoint): Adjust.
13322 (i386_remove_aligned_watchpoint): Adjust.
13323 (i386_low_stopped_data_address): Read the debug registers from the
13324 inferior instead of from the mirrors.
13325 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13326 (i386_dr_low_get_addr): Declare.
13327 (i386_dr_low_get_control): Declare.
13328 (i386_dr_low_get_status): Change prototype.
13330 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13331 (i386_dr_low_get_addr): New.
13332 (i386_dr_low_get_control): New.
13333 (i386_dr_low_get_status): Adjust prototype. Return
13335 (i386_initial_stuff): Clear dr_status_mirror and
13337 (i386_get_thread_context): Adjust.
13338 (i386_set_thread_context): Adjust.
13339 (i386_thread_added): Adjust.
13341 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13343 * linux-low.h (linux_thread_area): Delete declaration.
13345 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13347 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13348 after its termination.
13350 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13352 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13353 (gdb_wants_all_stopped): Delete.
13354 (linux_wait_1): Don't call them.
13355 * server.c (handle_v_cont): Tag all threads as want-stopped.
13356 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13357 stopped as "client-wants-stopped".
13359 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13361 * Makefile.in (signals_h): New.
13362 (server_h): Depend on it.
13363 (server.o): Don't depend on $(signals_def).
13364 (signals.o): Depend on $(signals_def).
13366 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13368 * Makefile.in (signals_def): New.
13369 (server_h): Append include/gdb/signals.h and signals_def.
13370 (server.o): Append signals_def.
13372 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13374 * server.c (handle_target_event): Use target_signal_to_host for
13375 resume_info.sig initialization.
13376 * target.h (struct thread_resume) <sig>: New comment.
13378 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13380 * server.c (handle_query): strcpy() the returned string from paddress()
13381 instead of sprintf().
13382 * utils.c (paddress): Return phex_nz().
13384 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13386 * server.c (handle_v_cont): Call mourn_inferior if process
13388 (myresume): Likewise.
13390 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13392 Static tracepoints, and integration with UST.
13394 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13395 * mem-break.c (uninsert_all_breakpoints)
13396 (reinsert_all_breakpoints): New.
13397 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13398 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13399 (gdb_agent_ust_loaded, helper_thread_id)
13400 (gdb_agent_helper_thread_id): New macros.
13401 (struct ipa_sym_addresses): Add addr_ust_loaded,
13402 addr_helper_thread_id, addr_cmd_buf.
13403 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13404 (in_process_agent_loaded_ust): New.
13405 (write_e_ust_not_loaded): New.
13406 (maybe_write_ipa_ust_not_loaded): New.
13407 (struct collect_static_trace_data_action): New.
13408 (enum tracepoint_type) <static_tracepoint>: New.
13409 (struct tracepoint) <handle>: Mention static tracepoints.
13410 (struct static_tracepoint_ctx): New.
13411 (CMD_BUF_SIZE): New.
13412 (add_tracepoint_action): Handle static tracepoint actions.
13413 (unprobe_marker_at): New.
13414 (clear_installed_tracepoints): Handle static tracepoints.
13415 (cmd_qtdp): Handle static tracepoints.
13416 (probe_marker_at): New.
13417 (cmd_qtstart): Handle static tracepoints.
13418 (response_tracepoint): Handle static tracepoints.
13419 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13420 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13421 (get_context_regcache): Handle static tracepoints.
13422 (do_action_at_tracepoint): Handle static tracepoint actions.
13423 (traceframe_find_block_type): Handle static trace data blocks.
13424 (traceframe_read_sdata): New.
13425 (download_tracepoints): Download static tracepoint actions.
13426 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13427 (GDB_PROBE_NAME): New.
13429 (GET_UST_SYM): New.
13432 (ust_marker_to_static_tracepoint): New.
13434 (collect_ust_data_at_tracepoint): New.
13435 (gdb_ust_probe): New.
13436 (UNIX_PATH_MAX, SOCK_DIR): New.
13437 (gdb_ust_connect_sync_socket): New.
13438 (resume_thread, stop_thread): New.
13439 (run_inferior_command): New.
13440 (init_named_socket): New.
13441 (gdb_ust_socket_init): New.
13442 (cstr_to_hexstr): New.
13444 (first_marker, next_marker): New.
13445 (response_ust_marker): New.
13446 (cmd_qtfstm, cmd_qtsstm): New.
13447 (unprobe_marker_at, probe_marker_at): New.
13448 (cmd_qtstmat, gdb_ust_thread): New.
13449 (gdb_ust_init): New.
13450 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13451 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13452 (ST_REGENTRY): New.
13453 (x86_64_st_collect_regmap): New.
13454 (X86_64_NUM_ST_COLLECT_GREGS): New.
13455 (AMD64_RIP_REGNUM): New.
13456 (supply_static_tracepoint_registers): New.
13457 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13458 (ST_REGENTRY): New.
13459 (i386_st_collect_regmap): New.
13460 (i386_NUM_ST_COLLECT_GREGS): New.
13461 (supply_static_tracepoint_registers): New.
13462 * server.c (handle_query): Handle qXfer:statictrace:read.
13463 <qSupported>: Report support for StaticTracepoints, and
13464 qXfer:statictrace:read features.
13465 * server.h (traceframe_read_sdata)
13466 (supply_static_tracepoint_registers): Declare.
13467 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13468 (unpack_varlen_hex): Include in IPA build.
13469 * Makefile.in (ustlibs, ustinc): New.
13470 (IPA_OBJS): Add remote-utils-ipa.o.
13471 ($(IPA_LIB)): Link -ldl and -lpthread.
13473 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13474 * config.in, configure: Regenerate.
13476 2010-06-20 Ian Lance Taylor <iant@google.com>
13477 Pedro Alves <pedro@codesourcery.com>
13479 * linux-x86-low.c (always_true): Delete.
13480 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13481 trying to fool the compiler with always_true.
13483 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13485 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13486 conditions in gdbserver.
13488 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13490 * spu-low.c (spu_read_memory): Wrap around local store limit.
13491 (spu_write_memory): Likewise.
13493 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13495 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13496 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13498 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13500 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13501 uses with LONGEST uses.
13503 2010-06-14 Stan Shebs <stan@codesourcery.com>
13504 Pedro Alves <pedro@codesourcery.com>
13508 * linux-x86-low.c: Include limits.h.
13510 (always_true): New.
13513 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13514 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13515 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13516 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13517 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13518 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13519 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13520 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13521 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13522 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13523 (amd64_emit_void_call_2): New.
13524 (amd64_emit_ops): New.
13525 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13526 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13527 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13528 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13529 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13530 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13531 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13532 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13533 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13534 (i386_emit_stack_adjust, i386_emit_int_call_1)
13535 (i386_emit_void_call_2): New.
13536 (i386_emit_ops): New.
13537 (x86_emit_ops): New.
13538 (the_low_target): Install x86_emit_ops.
13539 * server.h (struct emit_ops): New.
13540 (get_raw_reg_func_addr): Declare.
13541 (current_insn_ptr, emit_error): Declare.
13542 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13543 (set_trace_state_variable_value): New defines.
13544 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13545 addr_get_trace_state_variable_value and
13546 addr_set_trace_state_variable_value.
13547 (symbol_list): New fields for get_raw_reg,
13548 get_trace_state_variable_value and set_trace_state_variable_value.
13549 (condfn): New typedef.
13550 (struct tracepoint): New field `compiled_cond'.
13551 (do_action_at_tracepoint): Clear compiled_cond.
13552 (get_trace_state_variable_value, set_trace_state_variable_value):
13554 (condition_true_at_tracepoint): If there's a compiled condition,
13556 (current_insn_ptr, emit_error): New globals.
13557 (struct bytecode_address): New.
13558 (get_raw_reg_func_addr): New.
13559 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13560 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13561 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13562 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13563 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13564 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13565 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13566 (compile_tracepoint_condition, compile_bytecodes): New.
13567 * target.h (emit_ops): Forward declare.
13568 (struct target_ops): New field emit_ops.
13569 (target_emit_ops): New.
13570 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13571 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13572 * linux-low.c (linux_emit_ops): New.
13573 (linux_target_ops): Install it.
13574 * linux-low.h (struct linux_target_ops): New field emit_ops.
13576 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13578 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13579 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13581 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13582 Stan Shebs <stan@codesourcery.com>
13584 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13585 (all): Depend on $(extra_libraries).
13586 (install-only): Install the IPA.
13587 (IPA_OBJS, IPA_LIB): New.
13588 (clean): Remove the IPA lib.
13589 (IPAGENT_CFLAGS): New.
13590 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13591 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13592 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13593 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13594 * configure.ac: Check for atomic builtins support in the compiler.
13595 (IPA_DEPFILES, extra_libraries): Define.
13596 * configure.srv (ipa_obj): Add description.
13597 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13598 (i[34567]86-*-linux*): Set ipa_obj.
13599 (x86_64-*-linux*): Set ipa_obj.
13600 * linux-low.c (stabilizing_threads): New.
13601 (supports_fast_tracepoints): New.
13602 (linux_detach): Stabilize threads before detaching.
13603 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13604 the lwp is either not stabilizing, or is moving out of a jump pad.
13605 (linux_fast_tracepoint_collecting): New.
13606 (maybe_move_out_of_jump_pad): New.
13607 (enqueue_one_deferred_signal): New.
13608 (dequeue_one_deferred_signal): New.
13609 (linux_wait_for_event_1): If moving out of a jump pad, defer
13610 pending signals to later.
13611 (linux_stabilize_threads): New.
13612 (linux_wait_1): Check if threads need moving out of jump pads, and
13614 (stuck_in_jump_pad_callback): New.
13615 (move_out_of_jump_pad_callback): New.
13616 (lwp_running): New.
13617 (linux_resume_one_lwp): Handle moving out of jump pads.
13618 (linux_set_resume_request): Dequeue deferred signals.
13619 (need_step_over_p): Also step over fast tracepoint jumps.
13620 (start_step_over): Also uninsert fast tracepoint jumps.
13621 (finish_step_over): Also reinsert fast tracepoint jumps.
13622 (linux_install_fast_tracepoint_jump): New.
13623 (linux_target_ops): Install linux_stabilize_threads and
13624 linux_install_fast_tracepoint_jump_pad.
13625 * linux-low.h (linux_target_ops) <get_thread_area,
13626 install_fast_tracepoint_jump_pad>: New fields.
13627 (struct lwp_info) <collecting_fast_tracepoint,
13628 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13629 (linux_get_thread_area): Declare.
13630 * linux-x86-low.c (jump_insn): New.
13631 (x86_get_thread_area): New.
13632 (append_insns): New.
13633 (push_opcode): New.
13634 (amd64_install_fast_tracepoint_jump_pad): New.
13635 (i386_install_fast_tracepoint_jump_pad): New.
13636 (x86_install_fast_tracepoint_jump_pad): New.
13637 (the_low_target): Install x86_get_thread_area and
13638 x86_install_fast_tracepoint_jump_pad.
13639 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13640 (struct fast_tracepoint_jump): New.
13641 (fast_tracepoint_jump_insn): New.
13642 (fast_tracepoint_jump_shadow): New.
13643 (find_fast_tracepoint_jump_at): New.
13644 (fast_tracepoint_jump_here): New.
13645 (delete_fast_tracepoint_jump): New.
13646 (set_fast_tracepoint_jump): New.
13647 (uninsert_fast_tracepoint_jumps_at): New.
13648 (reinsert_fast_tracepoint_jumps_at): New.
13649 (set_breakpoint_at): Use write_inferior_memory.
13650 (uninsert_raw_breakpoint): Use write_inferior_memory.
13651 (check_mem_read): Mask out fast tracepoint jumps.
13652 (check_mem_write): Mask out fast tracepoint jumps.
13653 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13654 (set_fast_tracepoint_jump): Declare.
13655 (delete_fast_tracepoint_jump)
13656 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13657 (reinsert_fast_tracepoint_jumps_at): Declare.
13658 * regcache.c: Don't compile many functions when building the
13659 in-process agent library.
13660 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13661 the register buffer in the heap.
13662 (free_register_cache): If the register buffer isn't owned by the
13663 regcache, don't free it.
13664 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13665 pre-existing register caches.
13666 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13668 (convert_ascii_to_int): : Constify `from' parameter type.
13669 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13670 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13671 the needed buffer in-place.
13672 (relocate_instruction): New.
13673 * server.c (handle_query) <qSymbols>: If the target supports
13674 tracepoints, give it a chance of looking up symbols. Report
13675 support for fast tracepoints.
13676 (handle_status): Stabilize threads.
13677 (process_serial_event): Adjust.
13678 * server.h (struct fast_tracepoint_jump): Forward declare.
13679 (struct process_info) <fast_tracepoint_jumps>: New field.
13680 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13681 (decode_X_packet, decode_M_packet): Adjust.
13682 (relocate_instruction): Declare.
13683 (in_process_agent_loaded): Declare.
13684 (tracepoint_look_up_symbols): Declare.
13685 (struct fast_tpoint_collect_status): Declare.
13686 (fast_tracepoint_collecting): Declare.
13687 (force_unlock_trace_buffer): Declare.
13688 (handle_tracepoint_bkpts): Declare.
13689 (initialize_low_tracepoint)
13690 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13691 * target.h (struct target_ops) <stabilize_threads,
13692 install_fast_tracepoint_jump_pad>: New fields.
13693 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13694 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13695 [HAVE_STDINT_H]: Include stdint.h.
13696 (trace_debug_1): Rename to ...
13697 (trace_vdebug): ... this.
13698 (trace_debug): Rename to ...
13699 (trace_debug_1): ... this. Add `level' parameter.
13700 (trace_debug): New.
13701 (ATTR_USED, ATTR_NOINLINE): New.
13702 (IP_AGENT_EXPORT): New.
13703 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13704 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13705 (about_to_request_buffer_space, trace_buffer_is_full)
13706 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13707 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13708 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13709 (traceframe_write_count, traceframes_created)
13710 (trace_state_variables)
13711 New renaming defines.
13712 (struct ipa_sym_addresses): New.
13713 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13714 (symbol_list): New.
13715 (ipa_sym_addrs): New.
13716 (all_tracepoint_symbols_looked_up): New.
13717 (in_process_agent_loaded): New.
13718 (write_e_ipa_not_loaded): New.
13719 (maybe_write_ipa_not_loaded): New.
13720 (tracepoint_look_up_symbols): New.
13721 (debug_threads) [IN_PROCESS_AGENT]: New.
13722 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13723 (UNKNOWN_SIDE_EFFECTS): New.
13724 (stop_tracing): New.
13725 (flush_trace_buffer): New.
13726 (stop_tracing_bkpt): New.
13727 (flush_trace_buffer_bkpt): New.
13728 (read_inferior_integer): New.
13729 (read_inferior_uinteger): New.
13730 (read_inferior_data_pointer): New.
13731 (write_inferior_data_pointer): New.
13732 (write_inferior_integer): New.
13733 (write_inferior_uinteger): New.
13734 (struct collect_static_trace_data_action): Delete.
13735 (enum tracepoint_type): New.
13736 (struct tracepoint) <type>: New field `type'.
13737 <actions_str, step_actions, step_actions_str>: Only include in
13739 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13740 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13741 (tracepoints): Use IP_AGENT_EXPORT.
13742 (last_tracepoint): Don't include in the IPA.
13743 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13744 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13745 (alloced_trace_state_variables): New.
13746 (trace_state_variables): Use IP_AGENT_EXPORT.
13747 (traceframe_t): Delete unused variable.
13748 (circular_trace_buffer): Don't include in the IPA.
13749 (trace_buffer_start): Delete.
13750 (struct trace_buffer_control): New.
13751 (trace_buffer_free): Delete.
13752 (struct ipa_trace_buffer_control): New.
13753 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13754 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13756 (trace_buffer_ctrl): New.
13757 (TRACE_BUFFER_CTRL_CURR): New.
13758 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13759 Reimplement as macros.
13760 (trace_buffer_wrap): Delete.
13761 (traceframe_write_count, traceframe_read_count)
13762 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13763 (struct tracepoint_hit_ctx) <type>: New field.
13764 (struct fast_tracepoint_ctx): New.
13765 (memory_barrier): New.
13767 (record_tracepoint_error): Update atomically in the IPA.
13768 (clear_inferior_trace_buffer): New.
13769 (about_to_request_buffer_space): New.
13770 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13771 updating the same buffer.
13772 (add_tracepoint): Default the tracepoint's type to trap
13773 tracepoint, and orig_size to -1.
13774 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13775 internal variables.
13776 (create_trace_state_variable): New parameter `gdb'. Handle it.
13777 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13778 (cmd_qtdp): Handle fast tracepoints.
13779 (cmd_qtdv): Adjust.
13780 (max_jump_pad_size): New.
13781 (gdb_jump_pad_head): New.
13782 (get_jump_space_head): New.
13783 (claim_jump_space): New.
13784 (sort_tracepoints): New.
13785 (MAX_JUMP_SIZE): New.
13786 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13788 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13789 support. Upload fast traceframes, and delete internal IPA
13791 (stop_tracing_handler): New.
13792 (flush_trace_buffer_handler): New.
13793 (cmd_qtstop): Upload fast tracepoints.
13794 (response_tracepoint): Handle fast tracepoints.
13795 (tracepoint_finished_step): Upload fast traceframes. Set the
13796 tracepoint hit context's tracepoint type.
13797 (handle_tracepoint_bkpts): New.
13798 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13799 type. Add comment about fast tracepoints.
13800 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13801 non-existing action_str field.
13802 (get_context_regcache): Handle fast tracepoints.
13803 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13805 (fast_tracepoint_from_jump_pad_address): New.
13806 (fast_tracepoint_from_ipa_tpoint_address): New.
13807 (collecting_t): New.
13808 (force_unlock_trace_buffer): New.
13809 (fast_tracepoint_collecting): New.
13811 (gdb_collect): New.
13812 (write_inferior_data_ptr): New.
13813 (target_tp_heap): New.
13814 (target_malloc): New.
13815 (download_agent_expr): New.
13817 (download_tracepoints): New.
13818 (download_trace_state_variables): New.
13819 (upload_fast_traceframes): New.
13820 (IPA_FIRST_TRACEFRAME): New.
13821 (IPA_NEXT_TRACEFRAME_1): New.
13822 (IPA_NEXT_TRACEFRAME): New.
13823 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13824 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13825 (gdb_jump_pad_buffer_end): New.
13826 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13827 (initialize_tracepoint): Adjust.
13828 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13829 buffer. Initialize the low module.
13830 * utils.c (PREFIX, TOOLNAME): New.
13831 (malloc_failure): Use PREFIX.
13832 (error): In the IPA, an error causes an exit.
13833 (fatal, warning): Use PREFIX.
13834 (internal_error): Use TOOLNAME.
13835 (NUMCELLS): Increase to 10.
13836 * configure, config.in: Regenerate.
13838 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13840 * server.c (handle_query) <qSupported>: Do two passes over the
13841 qSupported string to avoid nesting strtok.
13843 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13845 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13847 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13848 -Wl,--dynamic-list.
13849 * configure: Regenerate.
13850 * proc-service.list: New.
13852 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13854 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13857 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13859 * gdbreplay.c (remote_open): Check error return from socket() call by
13860 its equality to -1 not by it being negative.
13861 * remote-utils.c (remote_open): Likewise.
13863 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13865 * config.h: Regenerate.
13867 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13869 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13870 doesn't provide PTRACE_GET_THREAD_AREA.
13872 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13874 * linux-m68k-low.c: Include <asm/ptrace.h>
13875 (ps_get_thread_area): Implement.
13877 2010-05-03 Doug Evans <dje@google.com>
13879 * event-loop.c (struct callback_event): New struct.
13880 (callback_list): New global.
13881 (append_callback_event, delete_callback_event): New functions.
13882 (process_callback): New function.
13883 (start_event_loop): Call it.
13884 * remote-utils.c (NOT_SCHEDULED): Define.
13885 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13886 moved out of readchar.
13887 (readchar): Rewrite. Call reschedule before returning.
13888 (reset_readchar): New function.
13889 (remote_close): Call it.
13890 (process_remaining, reschedule): New functions.
13891 * server.h (callback_handler_func): New typedef.
13892 (append_callback_event, delete_callback_event): Declare.
13894 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13896 * proc-service.c (ps_pglobal_lookup): Use
13897 thread_db_look_up_one_symbol.
13898 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13899 parameter. Use it instead of all_symbols_looked_up.
13900 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13902 (all_symbols_looked_up): Don't declare.
13903 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13904 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13906 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13907 Set all_symbols_looked_up here.
13908 (thread_db_look_up_one_symbol): New.
13909 (thread_db_get_tls_address): Adjust.
13910 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13911 thread_db object on the heap, and tentatively set it in the
13913 (thread_db_init): Don't set all_symbols_looked_up here.
13914 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13916 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13918 * linux-low.c (linux_kill, linux_detach): Adjust.
13919 (status_pending_p_callback): Remove redundant statement. Check
13920 for !TARGET_WAITIKIND_IGNORE, instead of
13921 TARGET_WAITKIND_STOPPED.
13922 (handle_tracepoints): Make sure LWP is locked. Adjust.
13923 (linux_wait_for_event_1): Adjust.
13924 (linux_cancel_breakpoints): New.
13925 (unsuspend_one_lwp): New.
13926 (unsuspend_all_lwps): New.
13927 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13928 (send_sigstop_callback): Change return type to int, add new
13929 `except' parameter and handle it.
13930 (suspend_and_send_sigstop_callback): New.
13931 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13932 pass them down. If SUSPEND, also increment the lwp's suspend
13934 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13935 (need_step_over_p): Don't consider suspended LWPs.
13936 (start_step_over): Adjust.
13937 (proceed_one_lwp): Change return type to int, add new `except'
13938 parameter and handle it.
13939 (unsuspend_and_proceed_one_lwp): New.
13940 (proceed_all_lwps): Use find_inferior instead of
13942 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13943 also decrement the suspend count of LWPs. Pass `except' down,
13944 instead of hacking its suspend count.
13945 (linux_pause_all): Add `freeze' parameter. Adjust.
13946 (linux_unpause_all): New.
13947 (linux_target_ops): Install linux_unpause_all.
13948 * server.c (handle_status): Adjust.
13949 * target.h (struct target_ops): New fields `unpause_all' and
13950 `cancel_breakpoints'. Add new parameter to `pause_all'.
13951 (pause_all): Add new `freeze' parameter.
13952 (unpause_all): New.
13953 (cancel_breakpoints): New.
13954 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13955 cancel breakpoints.
13956 (cmd_qtstart): Pause threads.
13957 (stop_tracing): Pause threads, and cancel breakpoints.
13958 * win32-low.c (win32_target_ops): Adjust.
13960 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13962 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13963 the inferior right away from here...
13964 (linux_wait_1): ... to here, and adjust to check the thread's
13965 last_resume_kind instead of the lwp's step or stop_expected flags.
13967 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13969 * README: Use consistent `GDB' and `GDBserver' spellings.
13971 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13973 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13974 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13975 (linux_detach_one_lwp): Assume the lwp is stopped.
13976 (any_thread_of): Delete.
13977 (linux_detach): Stop all lwps here. Don't blindly delete all
13979 (delete_lwp_callback): New.
13980 (linux_mourn): Delete all lwps of the process that is gone.
13981 (linux_wait_1): Don't delete the last lwp of the process here.
13982 * mem-break.h (mark_breakpoints_out): Declare.
13983 * mem-break.c (mark_breakpoints_out): New.
13984 (free_all_breakpoints): Use it.
13985 * server.c (handle_target_event): If the process is gone, mark
13987 * thread-db.c (struct thread_db) <create_bp>: New field.
13988 (thread_db_enable_reporting): Fix prototype. Store a thread event
13989 breakpoint reference in the thread_db struct.
13990 (thread_db_load_search): Clear the thread_db object.
13991 (try_thread_db_load_1): Ditto.
13992 (switch_to_process): New.
13993 (disable_thread_event_reporting): Use it.
13994 (remove_thread_event_breakpoints): New.
13995 (thread_db_detach, thread_db_mourn): Use it.
13997 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13999 * linux-low.c (linux_enable_event_reporting): New.
14000 (linux_wait_for_event_1, handle_extended_wait): Use it.
14002 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14004 * linux-low.c (linux_kill_one_lwp, linux_kill)
14005 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14006 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14007 SIGSTOP even if the LWP is stopped.
14008 (send_sigstop_callback): New.
14009 (stop_all_lwps): Use send_sigstop_callback instead.
14010 (linux_resume_one_thread): Adjust.
14011 (proceed_one_lwp): Still proceed an LWP that the client has
14012 requested to stop, if we haven't reported it as stopped yet. Make
14013 sure that LWPs the client want stopped, have a pending SIGSTOP.
14015 2010-04-26 Doug Evans <dje@google.com>
14017 * server.c (handle_general_set): Make static.
14019 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14020 Print received char after testing for error/eof instead of before.
14021 (input_interrupt): Tweak comment.
14023 2010-04-23 Doug Evans <dje@google.com>
14025 * server.c (start_inferior): Print inferior argv if --debug.
14027 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14029 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14030 * nto-x86-low.c: Include server.h
14032 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14034 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14035 be consistent with other sources of this directory.
14036 (init_registers_amd64): Correct name of source file of this function
14039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14041 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14042 64-bit executables.
14044 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14046 * win32-i386-low.c: Add 64-bit support.
14047 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14048 (init_registers_amd64): Declare.
14049 (mappings): Add 64-bit version of array.
14050 (init_windows_x86): New function.
14051 (the_low_target): Change init_arch field to init_windows_x86.
14053 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14055 * win32-low.c: Adapt to support also 64-bit architecture.
14056 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14057 (get_image_name): Use SIZE_T type for local variable `done'.
14058 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14059 (toolhelp_get_dll_name): Idem.
14060 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14061 Use uintptr_t typecast to avoid warning.
14062 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14063 (handle_exception): Use phex_nz to avoid warning.
14064 (win32_wait): Remove unused local variable `process'.
14066 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14068 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14071 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14073 * configure.ac: Use `ws2_32' library for srv_mingw.
14074 * configure: Regenerate.
14075 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14076 * remote-utils.c: Likewise.
14078 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14080 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14081 if __x86_64__ is defined.
14083 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14085 * configure: Regenerate.
14087 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14089 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14090 * target.h (target_ops): New get_tib_address field.
14091 * win32-low.h (win32_thread_info): Add thread_local_base field.
14092 * win32-low.c (child_add_thread): Add tlb argument.
14093 Set thread_local_base field to TLB.
14094 (get_child_debug_event): Adapt to child_add_thread change.
14095 (win32_get_tib_address): New function.
14096 (win32_target_ops): Set get_tib_address field to
14097 win32_get_tib_address.
14098 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14100 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14102 * linux-low.c (linux_mourn): Also remove the process.
14103 * server.c (handle_target_event): Don't remove the process here.
14104 * nto-low.c (nto_mourn): New.
14105 (nto_target_ops): Install it.
14106 * spu-low.c (spu_mourn): New.
14107 (spu_target_ops): Install it.
14108 * win32-low.c (win32_mourn): New.
14109 (win32_target_ops): Install it.
14111 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14113 * server.h (buffer_xml_printf): Remove redundant `;'.
14115 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14117 * regcache.c (set_register_cache): Invalidate regcaches before
14118 changing the register cache layout.
14119 (regcache_invalidate_one): Allow a NULL regcache.
14120 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14121 regcaches before changing the register cache layout or the target
14124 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14126 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14127 variable warning on Linux/x86-64.
14129 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14131 GDBserver disconnected tracing support.
14133 * linux-low.c (linux_remove_process): Delete.
14134 (add_lwp): Don't set last_resume_kind here.
14135 (linux_kill): Use `mourn'.
14136 (linux_detach): Use `thread_db_detach', and `mourn'.
14137 (linux_mourn): New.
14138 (linux_attach_lwp_1): Adjust comment.
14139 (linux_attach): last_resume_kind moved the thread_info; adjust.
14140 (status_pending_p_callback): Adjust.
14141 (linux_wait_for_event_1): Adjust.
14142 (count_events_callback, select_singlestep_lwp_callback)
14143 (select_event_lwp_callback, cancel_breakpoints_callback)
14144 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14145 (proceed_one_lwp): Adjust.
14146 (linux_async): Add debug output.
14147 (linux_thread_stopped): New.
14148 (linux_pause_all): New.
14149 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14151 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14152 (thread_db_free): Delete declaration.
14153 (thread_db_detach, thread_db_mourn): Declare.
14154 * thread-db.c (thread_db_init): Use thread_db_mourn.
14155 (thread_db_free): Delete, split in two.
14156 (disable_thread_event_reporting): New.
14157 (thread_db_detach): New.
14158 (thread_db_mourn): New.
14160 * server.h (struct thread_info) <last_resume_kind>: New field.
14161 <attached>: Add comment.
14162 <gdb_detached>: New field.
14163 (handler_func): Change return type to int.
14164 (handle_serial_event, handle_target_event): Ditto.
14165 (gdb_connected): Declare.
14167 (disconnected_tracing): Declare.
14168 (stop_tracing): Declare.
14170 * server.c (handle_query) <qSupported>: Report support for
14171 disconnected tracing.
14172 (queue_stop_reply_callback): Account for running threads.
14173 (gdb_wants_thread_stopped): New.
14174 (gdb_wants_all_threads_stopped): New.
14175 (gdb_reattached_process): New.
14176 (handle_status): Clear the `gdb_detached' flag of all processes.
14177 In all-stop, stop all threads.
14178 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14179 (process_serial_event): If the remote connection breaks, or if an
14180 exit was forced with "monitor exit", force an event loop exit.
14181 Handle disconnected tracing on detach.
14182 (handle_serial_event): Adjust.
14183 (handle_target_event): If GDB isn't connected, forward events back
14184 to the inferior, unless the last process exited, in which case,
14185 exit gdbserver. Adjust interface.
14187 * remote-utils.c (remote_open): Don't block in accept. Instead
14188 register an event loop source on the listen socket file
14189 descriptor. Refactor bits into ...
14190 (listen_desc): ... this new global.
14191 (gdb_connected): ... this new function.
14192 (enable_async_notification): ... this new function.
14193 (handle_accept_event): ... this new function.
14194 (remote_close): Clear remote_desc.
14196 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14198 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14200 (mourn_inferior): Define.
14201 (target_process_qsupported): Avoid the dangling else problem.
14202 (thread_stopped): Define.
14203 (pause_all): Define.
14204 (target_waitstatus_to_string): Declare.
14205 * target.c (target_waitstatus_to_string): New.
14207 * tracepoint.c (tracing): Make extern.
14208 (disconnected_tracing): New.
14209 (stop_tracing): Make extern. Handle tracing stops due to GDB
14211 (cmd_qtdisconnected): New.
14212 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14213 (handle_tracepoint_general_set): Handle QTDisconnected.
14215 * event-loop.c (event_handler_func): Change return type to int.
14216 (process_event): Bail out if the event handler wants the event
14218 (handle_file_event): Ditto.
14219 (start_event_loop): Bail out if the event handler wants the event
14222 * nto-low.c (nto_target_ops): Adjust.
14223 * spu-low.c (spu_wait): Don't remove the process here.
14224 (spu_target_ops): Adjust.
14225 * win32-low.c (win32_wait): Don't remove the process here.
14226 (win32_target_ops): Adjust.
14228 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14230 * regcache.c (realloc_register_cache): Invalidate inferior's
14231 regcache before recreating it.
14233 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14235 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14237 2010-04-09 Stan Shebs <stan@codesourcery.com>
14238 Pedro Alves <pedro@codesourcery.com>
14240 * server.h (LONGEST): New.
14241 (struct thread_info) <while_stepping>: New field.
14242 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14244 (initialize_tracepoint, handle_tracepoint_general_set)
14245 (handle_tracepoint_query, tracepoint_finished_step)
14246 (tracepoint_was_hit, release_while_stepping_state_list):
14247 (current_traceframe): Declare.
14248 * server.c (handle_general_set): Handle tracepoint packets.
14249 (read_memory): New.
14250 (write_memory): New.
14251 (handle_search_memory_1): Use read_memory.
14252 (handle_query): Report support for conditional tracepoints, trace
14253 state variables, and tracepoint sources. Handle tracepoint
14255 (main): Initialize the tracepoints module.
14256 (process_serial_event): Handle traceframe reads/writes.
14258 * linux-low.c (handle_tracepoints): New.
14259 (linux_wait_1): Call it.
14260 (linux_resume_one_lwp): Handle while-stepping.
14261 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14262 (linux_target_ops): Install them.
14263 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14265 * linux-x86-low.c (x86_supports_tracepoints): New.
14266 (the_low_target). Install it.
14268 * mem-break.h (delete_breakpoint): Declare.
14269 * mem-break.c (delete_breakpoint): Make external.
14271 * target.h (struct target_ops): Add `supports_tracepoints',
14272 `read_pc', and `write_pc' fields.
14273 (target_supports_tracepoints): Define.
14274 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14277 * regcache.h (struct regcache) <registers_owned>: New field.
14278 (init_register_cache, regcache_cpy): Declare.
14279 (regcache_read_pc, regcache_write_pc): Declare.
14280 (register_cache_size): Declare.
14281 (supply_regblock): Declare.
14282 * regcache.c (init_register_cache): New.
14283 (new_register_cache): Use it.
14284 (regcache_cpy): New.
14285 (register_cache_size): New.
14286 (supply_regblock): New.
14287 (regcache_read_pc, regcache_write_pc): New.
14289 * tracepoint.c: New.
14291 * Makefile.in (OBS): Add tracepoint.o.
14292 (tracepoint.o): New rule.
14294 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14296 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14298 (i386-mmx.c): Likewise.
14299 (i386-mmx-linux.o): Likewise.
14300 (i386-mmx-linux.c): Likewise.
14302 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14303 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14304 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14305 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14307 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14308 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14309 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14311 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14313 * Makefile.in (clean): Updated.
14315 (i386-avx.c): Likewise.
14316 (i386-avx-linux.o): Likewise.
14317 (i386-avx-linux.c): Likewise.
14318 (amd64-avx.o): Likewise.
14319 (amd64-avx.c): Likewise.
14320 (amd64-avx-linux.o): Likewise.
14321 (amd64-avx-linux.c): Likewise.
14323 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14324 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14325 (srv_amd64_regobj): Add amd64-avx.o.
14326 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14327 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14328 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14329 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14330 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14331 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14332 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14334 * i387-fp.c: Include "i386-xstate.h".
14336 (i387_cache_to_xsave): Likewise.
14337 (i387_xsave_to_cache): Likewise.
14338 (x86_xcr0): Likewise.
14340 * i387-fp.h (i387_cache_to_xsave): Likewise.
14341 (i387_xsave_to_cache): Likewise.
14342 (x86_xcr0): Likewise.
14344 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14345 * linux-crisv32-low.c (target_regsets): Likewise.
14346 * linux-m68k-low.c (target_regsets): Likewise.
14347 * linux-mips-low.c (target_regsets): Likewise.
14348 * linux-ppc-low.c (target_regsets): Likewise.
14349 * linux-s390-low.c (target_regsets): Likewise.
14350 * linux-sh-low.c (target_regsets): Likewise.
14351 * linux-sparc-low.c (target_regsets): Likewise.
14352 * linux-xtensa-low.c (target_regsets): Likewise.
14354 * linux-low.c: Include <sys/uio.h>.
14355 (regsets_fetch_inferior_registers): Support nt_type.
14356 (regsets_store_inferior_registers): Likewise.
14357 (linux_process_qsupported): New.
14358 (linux_target_ops): Add linux_process_qsupported.
14360 * linux-low.h (regset_info): Add nt_type.
14361 (linux_target_ops): Add process_qsupported.
14363 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14365 (init_registers_i386_avx_linux): New.
14366 (init_registers_amd64_avx_linux): Likewise.
14367 (xmltarget_i386_linux_no_xml): Likewise.
14368 (xmltarget_amd64_linux_no_xml): Likewise.
14369 (PTRACE_GETREGSET): Likewise.
14370 (PTRACE_SETREGSET): Likewise.
14371 (x86_fill_xstateregset): Likewise.
14372 (x86_store_xstateregset): Likewise.
14373 (use_xml): Likewise.
14374 (x86_linux_update_xmltarget): Likewise.
14375 (x86_linux_process_qsupported): Likewise.
14376 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14377 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14378 init_registers_i386_linux here. Call
14379 x86_linux_update_xmltarget.
14380 (the_low_target): Add x86_linux_process_qsupported.
14382 * server.c (handle_query): Call target_process_qsupported.
14384 * target.h (target_ops): Add process_qsupported.
14385 (target_process_qsupported): New.
14387 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14389 * inferiors.c (add_thread): Set last_status kind to
14390 TARGET_WAITKIND_IGNORE.
14391 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14392 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14393 (linux_wait_1): Move `thread' local definition to block that uses
14394 it. Don't NULL initialize `event_child'.
14395 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14396 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14397 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14399 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14401 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14402 an extended waitstatus, or by a watchpoint.
14403 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14404 thread was stepping or has been stopped by a watchpoint.
14406 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14408 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14409 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14410 of another, then delete the previous, and validate all
14412 (validate_inserted_breakpoint): New.
14413 (delete_disabled_breakpoints): New.
14414 (validate_breakpoints): New.
14415 (check_mem_read): Validate breakpoints before trusting their
14416 shadow. Delete disabled breakpoints.
14417 (check_mem_write): Validate breakpoints before trusting they
14418 should be inserted. Delete disabled breakpoints.
14419 * mem-break.h (validate_breakpoints):
14420 * server.c (handle_query): Validate breakpoints when we see a
14423 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14425 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14426 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14427 if we could tell there's a GDB breakpoint at stop_pc.
14428 (need_step_over_p): Don't do a step over if we find a GDB
14429 breakpoint at the resume PC.
14431 * mem-break.c (struct raw_breakpoint): New.
14432 (enum bkpt_type): New type `gdb_breakpoint'.
14433 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14434 fields. New field `raw'.
14435 (find_raw_breakpoint_at): New.
14436 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14437 breakpoint instead.
14438 (set_breakpoint_at): Adjust.
14439 (delete_raw_breakpoint): New.
14440 (release_breakpoint): New.
14441 (delete_breakpoint): Rename to...
14442 (delete_breakpoint_1): ... this. Add proc parameter. Use
14443 release_breakpoint. Return ENOENT.
14444 (delete_breakpoint): Reimplement.
14445 (find_breakpoint_at): Delete.
14446 (find_gdb_breakpoint_at): New.
14447 (delete_breakpoint_at): Delete.
14448 (set_gdb_breakpoint_at): New.
14449 (delete_gdb_breakpoint_at): New.
14450 (gdb_breakpoint_here): New.
14451 (set_reinsert_breakpoint): Use release_breakpoint.
14452 (uninsert_breakpoint): Rename to ...
14453 (uninsert_raw_breakpoint): ... this.
14454 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14455 (reinsert_raw_breakpoint): Change parameter type to
14457 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14459 (check_breakpoints): Adjust. Use release_breakpoint.
14460 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14461 (breakpoint_inserted_here): Ditto.
14462 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14463 Don't trust the breakpoint's shadow if it is not inserted.
14464 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14465 (delete_all_breakpoints): Adjust.
14466 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14467 use delete_breakpoint_1.
14469 * mem-break.h (breakpoints_supported): Delete declaration.
14470 (set_gdb_breakpoint_at): Declare.
14471 (gdb_breakpoint_here): Declare.
14472 (delete_breakpoint_at): Delete.
14473 (delete_gdb_breakpoint_at): Declare.
14475 * server.h (struct raw_breakpoint): Forward declare.
14476 (struct process_info): New field `raw_breakpoints'.
14478 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14481 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14483 * linux-low.c (status_pending_p_callback): Fix comment.
14484 (linux_wait_for_event_1): Move most of the internal breakpoint
14485 handling from here...
14486 (linux_wait_1): ... to here.
14487 (count_events_callback): New.
14488 (select_singlestep_lwp_callback): New.
14489 (select_event_lwp_callback): New.
14490 (cancel_breakpoints_callback): New.
14491 (select_event_lwp): New.
14492 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14493 priority to all LWPs that have had events that should be reported
14494 to the client. Cancel breakpoints when about to reporting the
14495 event to the client, not while stopping lwps. No longer cancel
14496 finished single-steps here.
14497 (cancel_finished_single_step): Delete.
14498 (cancel_finished_single_steps): Delete.
14500 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14502 * mem-break.c (enum bkpt_type): New.
14503 (struct breakpoint): New field `type'.
14504 (set_breakpoint_at): Change return type to struct breakpoint
14505 pointer. Set type to `other_breakpoint' by default.
14506 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14507 in the breakpoint list.
14508 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14509 (reinsert_breakpoint): Rename to ...
14510 (reinsert_raw_breakpoint): ... this.
14511 (reinsert_breakpoints_at): Adjust.
14512 * mem-break.h (struct breakpoint): Declare.
14513 (set_breakpoint_at): Change return type to struct breakpoint
14516 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14518 * server.c (handle_query): Assign, not compare.
14520 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14522 Teach linux gdbserver to step-over-breakpoints.
14524 * linux-low.c (can_hardware_single_step): New.
14525 (supports_breakpoints): New.
14526 (handle_extended_wait): If stopping threads, read the stop pc of
14527 the new cloned LWP.
14529 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14530 low target doesn't support retrieving the PC.
14531 (add_lwp): Set last_resume_kind to resume_continue.
14532 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14533 (linux_attach): Don't clear stop_expected. Set the lwp's
14534 last_resume_kind to resume_stop.
14535 (linux_detach_one_lwp): Don't check for removed breakpoints.
14536 (check_removed_breakpoint): Delete.
14537 (status_pending_p): Rename to ...
14538 (status_pending_p_callback): ... this. Don't check for removed
14539 breakpoints. Don't consider threads that are stopped from GDB's
14541 (linux_wait_for_lwp): Always read the stop_pc here.
14542 (cancel_breakpoint): New.
14543 (step_over_bkpt): New global.
14544 (linux_wait_for_event_1): Implement stepping over breakpoints.
14545 (gdb_wants_lwp_stopped): New.
14546 (gdb_wants_all_stopped): New.
14547 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14548 single-step traps here. Store the thread's last reported target
14550 (send_sigstop): Don't clear stop_expected. Always set it,
14552 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14553 (cancel_finished_single_step): New.
14554 (cancel_finished_single_steps): New.
14555 (wait_for_sigstop): Don't cancel finished single-step traps here.
14556 (linux_resume_one_lwp): Don't check for removed breakpoints.
14557 Don't set `step' on non-hardware step archs.
14558 (linux_set_resume_request): Ignore resume_stop requests if already
14559 stopping or stopped. Set the lwp's last_resume_kind.
14560 (resume_status_pending_p): Don't check for removed breakpoints.
14561 (need_step_over_p): New.
14562 (start_step_over): New.
14563 (finish_step_over): New.
14564 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14565 requests. Clear the thread's last reported target waitstatus.
14566 Don't use the `suspended' flag. Don't consider pending breakpoints.
14567 (linux_resume): Start a step-over if necessary.
14568 (proceed_one_lwp): New.
14569 (proceed_all_lwps): New.
14570 (unstop_all_lwps): New.
14571 * linux-low.h (struct lwp_info): Rewrite comment for the
14572 `suspended' flag. Add the `stop_pc' field. Delete the
14573 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14574 Add `'last_resume_kind' and `need_step_over' fields.
14575 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14576 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14577 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14578 (set_raw_breakpoint_at): New.
14579 (set_breakpoint_at): Rewrite to use it.
14580 (reinsert_breakpoint_handler): Delete.
14581 (set_reinsert_breakpoint): New.
14582 (reinsert_breakpoint_by_bp): Delete.
14583 (delete_reinsert_breakpoints): New.
14584 (uninsert_breakpoint): Rewrite.
14585 (uninsert_breakpoints_at): New.
14586 (reinsert_breakpoint): Rewrite.
14587 (reinsert_breakpoints_at): New.
14588 (check_breakpoints): Rewrite.
14589 (breakpoint_here): New.
14590 (breakpoint_inserted_here): New.
14591 (check_mem_read): Adjust.
14592 * mem-break.h (breakpoints_supported, breakpoint_here)
14593 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14594 (reinsert_breakpoint_by_bp): Delete declaration.
14595 (delete_reinsert_breakpoints): Declare.
14596 (reinsert_breakpoint): Delete declaration.
14597 (reinsert_breakpoints_at): Declare.
14598 (uninsert_breakpoint): Delete declaration.
14599 (uninsert_breakpoints_at): Declare.
14600 (check_breakpoints): Adjust prototype.
14601 * server.h: Adjust include order.
14602 (struct thread_info): Declare here. Add a `last_status' field.
14604 2010-03-23 Michael Snyder <msnyder@vmware.com>
14606 * server.c (crc32): New function.
14607 (handle_query): Add handling for 'qCRC:' request.
14609 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14611 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14612 lwp had been stopped by a watchpoint.
14614 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14616 * server.h (internal_error): Declare.
14617 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14618 * utils.c (internal_error): New function.
14620 2010-03-15 Andreas Schwab <schwab@redhat.com>
14622 * configure.srv: Fix typo setting srv_regobj.
14624 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14626 * linux-low.c (fetch_register): Avoid passing a non string literal
14628 (usr_store_inferior_registers): Ditto.
14630 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14632 * linux-low.c (linux_write_memory): Bail out early if peeking
14635 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14637 * linux-low.h (struct lwp_info): New fields
14638 `stopped_by_watchpoint' and `stopped_data_address'.
14639 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14640 here, and cache them in the lwp object.
14641 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14643 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14645 (linux_stopped_by_watchpoint): Rewrite.
14646 (linux_stopped_data_address): Rewrite.
14648 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14650 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14651 switching the current inferior, not before.
14653 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14655 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14656 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14657 i386-linux.c and amd64-linux.c.
14658 (reg-i386.o): Removed.
14659 (reg-i386.c): Likewise.
14660 (reg-i386-linux.o): Likewise.
14661 (reg-i386-linux.c): Likewise.
14662 (reg-x86-64.o): Likewise.
14663 (reg-x86-64.c): Likewise.
14664 (reg-x86-64-linux.o): Likewise.
14665 (reg-x86-64-linux.c): Likewise.
14667 (i386.c): Likewise.
14668 (i386-linux.o): Likewise.
14669 (i386-linux.c): Likewise.
14670 (amd64.o): Likewise.
14671 (amd64.c): Likewise.
14672 (amd64-linux.o): Likewise.
14673 (amd64-linux.c): Likewise.
14675 * configure.srv (srv_i386_regobj): New.
14676 (srv_i386_linux_regobj): Likewise.
14677 (srv_amd64_regobj): Likewise.
14678 (srv_amd64_linux_regobj): Likewise.
14679 (srv_i386_32bit_xmlfiles): Likewise.
14680 (srv_i386_64bit_xmlfiles): Likewise.
14681 (srv_i386_xmlfiles): Likewise.
14682 (srv_amd64_xmlfiles): Likewise.
14683 (srv_i386_linux_xmlfiles): Likewise.
14684 (srv_amd64_linux_xmlfiles): Likewise.
14685 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14686 srv_xmlfiles to $srv_i386_xmlfiles.
14687 (i[34567]86-*-mingw32ce*): Likewise.
14688 (i[34567]86-*-mingw*): Likewise.
14689 (i[34567]86-*-nto*): Likewise.
14690 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14691 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14692 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14693 (x86_64-*-linux*): Likewise.
14695 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14696 (init_registers_amd64_linux): New.
14697 (x86_arch_setup): Replace init_registers_x86_64_linux with
14698 init_registers_amd64_linux.
14700 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14702 * configure.ac: Check for libdl. If it is not available link against
14703 static libthread_db.
14704 * configure: Regenerate.
14706 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14710 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14711 handing a read watchpoint.
14712 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14714 2010-02-12 Doug Evans <dje@google.com>
14716 * linux-low.c (linux_supports_tracefork_flag): Document.
14717 (linux_look_up_symbols): Add comment.
14719 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14721 * regcache.c (supply_register): Clear regcache if buf is NULL.
14723 2010-02-02 Nicolas Roche <roche@sourceware.org>
14724 Joel Brobecker <brobecker@adacore.com>
14726 * inferiors.c (find_inferior): Add function documentation.
14727 (unloaded_dll): Handle the case where the unloaded dll has not
14728 been previously registered in the dll list.
14730 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14732 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14733 (thumb2_breakpoint): New.
14734 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14736 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14738 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14739 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14742 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14744 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14746 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14748 * linux-s390-low.c (s390_collect_ptrace_register)
14749 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14751 2010-01-21 Doug Evans <dje@google.com>
14753 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14754 (PTRACE_ARG4_TYPE): New macro.
14755 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14756 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14757 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14758 (usr_store_inferior_registers): Ditto.
14759 (linux_read_memory, linux_write_memory): Ditto.
14760 (linux_test_for_tracefork): Ditto.
14762 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14763 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14765 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14767 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14770 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14772 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14773 prototype to take a regcache. Adjust.
14775 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14777 * regcache.h (struct thread_info): Forward declare.
14778 (struct regcache): New.
14779 (new_register_cache): Adjust prototype.
14780 (get_thread_regcache): Declare.
14781 (free_register_cache): Adjust prototype.
14782 (registers_to_string, registers_from_string): Ditto.
14783 (supply_register, supply_register_by_name, collect_register)
14784 (collect_register_as_string, collect_register_by_name): Ditto.
14785 * regcache.c (struct inferior_regcache_data): Delete.
14786 (get_regcache): Rename to ...
14787 (get_thread_regcache): ... this. Adjust. Switch inferior before
14788 fetching registers.
14789 (regcache_invalidate_one): Adjust.
14790 (regcache_invalidate): Fix prototype.
14791 (new_register_cache): Return the new register cache.
14792 (free_register_cache): Change prototype.
14793 (realloc_register_cache): Adjust.
14794 (registers_to_string): Change prototype to take a regcache. Adjust.
14795 (registers_from_string): Ditto.
14796 (register_data): Ditto.
14797 (supply_register): Ditto.
14798 (supply_register_by_name): Ditto.
14799 (collect_register): Ditto.
14800 (collect_register_as_string): Ditto.
14801 (collect_register_by_name): Ditto.
14802 * server.c (process_serial_event): Adjust.
14803 * linux-low.h (regset_fill_func, regset_store_func): Change
14805 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14807 * linux-low.c (get_stop_pc): Adjust.
14808 (check_removed_breakpoint): Adjust.
14809 (linux_wait_for_event): Adjust.
14810 (linux_resume_one_lwp): Adjust.
14811 (fetch_register): Add regcache parameter. Adjust.
14812 (usr_store_inferior_registers): Ditto.
14813 (regsets_fetch_inferior_registers): Ditto.
14814 (regsets_store_inferior_registers): Ditto.
14815 (linux_fetch_registers, linux_store_registers): Ditto.
14816 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14818 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14820 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14821 prototype to take a regcache.
14822 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14823 * remote-utils.c (convert_ascii_to_int, outreg)
14824 (prepare_resume_reply): Change prototype to take a regcache.
14826 * target.h (struct target_ops) <fetch_registers, store_registers>:
14827 Change prototype to take a regcache.
14828 (fetch_inferior_registers, store_inferior_registers): Change
14829 prototype to take a regcache. Adjust.
14830 * proc-service.c (ps_lgetregs): Adjust.
14831 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14832 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14833 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14834 take a regcache. Adjust.
14835 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14836 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14837 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14838 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14839 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14840 (cris_cannot_fetch_register):
14841 (cris_breakpoint_at): Change prototype to take a regcache.
14843 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14844 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14845 to take a regcache. Adjust.
14846 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14848 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14849 take a regcache. Adjust.
14850 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14851 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14852 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14853 * linux-mips-low.c (mips_get_pc):
14854 (mips_set_pc): Change prototype to take a regcache. Adjust.
14855 (mips_reinsert_addr): Adjust.
14856 (mips_collect_register): Change prototype to take a regcache.
14858 (mips_supply_register):
14859 (mips_collect_register_32bit, mips_supply_register_32bit)
14860 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14861 (mips_store_fpregset): Ditto.
14862 * linux-ppc-low.c (ppc_supply_ptrace_register)
14863 (ppc_supply_ptrace_register): Ditto.
14864 (parse_spufs_run): Adjust.
14865 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14866 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14867 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14868 take a regcache. Adjust.
14869 * linux-s390-low.c (s390_collect_ptrace_register)
14870 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14871 (s390_set_pc): Change prototype to take a regcache. Adjust.
14872 (s390_arch_setup): Adjust.
14873 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14874 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14875 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14876 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14877 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14879 (sparc_breakpoint_at): Adjust.
14880 * linux-xtensa-low.c (xtensa_fill_gregset):
14881 (xtensa_store_gregset):
14882 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14883 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14884 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14885 prototype to take a regcache. Adjust.
14886 * win32-arm-low.c (arm_fetch_inferior_register)
14887 (arm_store_inferior_register): Change prototype to take a
14889 * win32-i386-low.c (i386_fetch_inferior_register)
14890 (i386_store_inferior_register): Change prototype to take a
14892 * win32-low.c (child_fetch_inferior_registers)
14893 (child_store_inferior_registers): Change prototype to take a
14895 (win32_wait): Adjust.
14896 (win32_fetch_inferior_registers): Change prototype to take a
14898 (win32_store_inferior_registers): Adjust.
14899 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14900 store_inferior_register>: Change prototype to take a regcache.
14902 2010-01-20 Doug Evans <dje@google.com>
14904 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14906 (linux_wait_for_event1, linux_init_signals): Ditto.
14907 (W_STOPCODE): Provide definition if missing.
14909 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14911 * linux-low.c (linux_core_of_thread): New.
14912 (compare_ints, show_process, list_threads): New.
14913 (linux_qxfer_osdata): Report threads and cores.
14914 (linux_target_op): Register linux_core_of_thread.
14915 * remote-utils.c (prepare_resume_reply): Report the core.
14916 (buffer_xml_printf): Support %d specifier.
14917 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14919 (handle_query): Handle qXfer:threads. Announce availability
14921 * target.h (struct target_ops): New field core_of_thread.
14923 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14925 * Makefile.in (clean): Remove new generated files.
14926 (reg-s390.o, reg-s390.c): Remove rules.
14927 (reg-s390x.o, reg-s390x.c): Likewise.
14928 (s390-linux32.o, s390-linux32.c): Add rules.
14929 (s390-linux64.o, s390-linux64.c): Likewise.
14930 (s390x-linux64.o, s390x-linux64.c): Likewise.
14931 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14932 * linux-s390-low.c: Include <elf.h>.
14933 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14934 (init_registers_s390): Remove prototype.
14935 (init_registers_s390x): Likewise.
14936 (init_registers_s390_linux32): Add prototype.
14937 (init_registers_s390_linux64): Likewise.
14938 (init_registers_s390x_linux64): Likewise.
14939 (s390_num_regs_3264): New define.
14940 (s390_regmap_3264): New global variable.
14941 (s390_cannot_fetch_register): Remove obsolete check.
14942 (s390_cannot_store_register): Likewise.
14943 (s390_collect_ptrace_register): Handle upper/lower register halves.
14944 (s390_supply_ptrace_register): Likewise.
14945 (s390_fill_gregset): Update to register number changes.
14946 (s390_get_hwcap): New routine.
14947 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14948 Install appropriate regmap and register set.
14950 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14952 * server.c (gdbserver_version): Update copyright year to 2010.
14953 * gdbreplay.c (gdbreplay_version): Likewise.
14955 2009-12-28 Doug Evans <dje@google.com>
14957 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14958 elf/external.h. Include <elf.h> instead but only if necessary.
14960 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14962 * linux-low.c (linux_remove_process): Remove `detaching'
14963 parameter. Don't release/detach from thread_db here.
14964 (linux_kill): Release/detach from thread_db here, ...
14965 (linux_detach): ... and here, before actually detaching.
14966 (linux_wait_1): ... and here, when a process exits.
14967 * thread-db.c (any_thread_of): New.
14968 (thread_db_free): Switch the current inferior to a thread of the
14971 2009-12-21 Doug Evans <dje@google.com>
14973 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14975 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14976 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14977 warning ifndef __NR_tkill. Move setting of errno there too.
14978 Delete unnecessary resetting of errno after syscall.
14979 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14981 * configure.ac: Check for dladdr.
14982 * config.in: Regenerate.
14983 * configure: Regenerate.
14984 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14985 (try_thread_db_load): Update.
14987 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14989 2009-12-18 Doug Evans <dje@google.com>
14991 * event-loop.c: Include unistd.h if it exists.
14993 * linux-low.c (my_waitpid): Move definition away from being in
14994 between linux_tracefork_child/linux_test_for_tracefork.
14996 * gdb_proc_service.h (psaddr_t): Fix type.
14997 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14998 signature to match glibc.
15000 2009-12-16 Doug Evans <dje@google.com>
15002 * linux-low.c (linux_read_memory): Fix argument to read.
15004 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15006 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15007 events, don't leave current_inferior pointing at null.
15009 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15011 * win32-low.c (LOG): Delete.
15012 (OUTMSG): Output to stderr.
15013 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15014 on compile time LOG macro.
15015 (win32_wait): Fix debug output.
15017 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15019 * win32-low.c (win32_add_one_solib): If the dll name is
15020 "ntdll.dll", prepend the system directory to the dll path.
15022 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15024 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15026 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15027 Vladimir Prus <vladimir@codesourcery.com>
15029 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15030 * configure.ac: Check for __mcoldfire__ and set
15031 gdb_cv_m68k_is_coldfire.
15032 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15033 reg-cf.o and reg-m68k.o.
15034 * configure: Regenerated.
15036 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15038 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15039 Pass it to thread_db_free.
15040 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15041 proper `detaching' argument to linux_remove_process.
15042 * linux-low.h (thread_db_free): Add `detaching' parameter.
15043 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15045 (thread_db_free): Add `detaching' parameter. Only
15046 call td_ta_clear_event if detaching from process.
15048 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15050 * thread-db.c (thread_db_free): Fix typo.
15052 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15055 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15057 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15059 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15060 with an i686 compiler.
15061 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15063 * configure: Rebuilt.
15065 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15069 * server.c (handle_search_memory_1): Correct read_addr initialization
15070 in loop for searching subsequent chunks.
15072 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15074 * configure.ac: New --with-libthread-db option.
15075 * thread-db.c: Allow direct dependence on libthread_db.
15076 (thread_db_free): Adjust.
15077 * config.in: Regenerate.
15078 * configure: Likewise.
15080 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15083 * thread-db.c (attach_thread): New function.
15084 (maybe_attach_thread): Return success/failure.
15085 (find_new_threads_callback): Adjust.
15086 (thread_db_find_new_threads): Loop until no new threads.
15088 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15090 * proc-service.c (ps_lgetregs): Formatting.
15092 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15094 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15095 * configure.ac: Adjust.
15096 * linux-low.h (struct process_info_private): Move members to struct
15098 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15099 * linux-low.c (linux_remove_process): Adjust.
15100 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15101 * server.c (handle_query): Move code ...
15102 (handle_monitor_command): ... here. New function.
15103 * target.h (struct target_ops): New member.
15104 * thread-db.c (struct thread_db): New.
15105 (libthread_db_search_path): New variable.
15106 (thread_db_create_event, thread_db_enable_reporting)
15107 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15108 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15109 (try_thread_db_load_1, dladdr_to_soname): New functions.
15110 (try_thread_db_load, thread_db_load_search): New functions.
15111 (thread_db_init): Search for libthread_db.
15112 (thread_db_free): New function.
15113 (thread_db_handle_monitor_command): Likewise.
15114 * config.in: Regenerate.
15115 * configure: Regenerate.
15117 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15119 * spu-low.c (spu_kill): Wait for inferior to terminate.
15120 Call clear_inferiors.
15121 (spu_detach): Call clear_inferiors.
15123 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15125 * aclocal.m4: Regenerate.
15126 * config.in: Likewise.
15127 * configure: Likewise.
15129 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15131 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15132 (parse_spufs_run): New function.
15133 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15134 (ppc_breakpoint_at): Handle SPU breakpoints.
15136 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15138 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15139 (SPUFS_MAGIC): Define.
15140 (spu_enumerate_spu_ids): New function.
15141 (linux_qxfer_spu): New function.
15142 (linux_target_ops): Install linux_qxfer_spu.
15144 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15146 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15147 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15148 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15149 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15150 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15151 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15152 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15153 (init_registers_powerpc_cell32l): Add prototype.
15154 (init_registers_powerpc_cell64l): Likewise.
15155 (ppc_arch_setup): Detect Cell/B.E. architecture.
15157 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15159 * Makefile.in (datarootdir): New variable.
15161 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15163 * linux-low.c (linux_write_memory): Update debugging output.
15164 * Makefile.in (clean): Add new descriptions.
15165 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15166 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15167 * configure.srv: Add new files for arm*-*-linux*.
15168 * linux-arm-low.c: Add new declarations.
15169 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15170 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15171 (HWCAP_VFPv3D16): New.
15172 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15173 instead of __IWMMXT__.
15174 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15175 (arm_arch_setup): New.
15176 (target_regsets): Remove #ifdef. Add VFP regset.
15177 (the_low_target): Use arm_arch_setup.
15179 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15181 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15182 the main thread again.
15184 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15186 Adding Neutrino gdbserver.
15187 * configure: Regenerated.
15188 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15189 * configure.srv (i[34567]86-*-nto*): New target.
15190 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15191 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15192 (nto_comctrl) [__QNX__]: New function.
15193 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15195 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15197 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15200 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15201 Pedro Alves <pedro@codesourcery.com>
15203 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15204 don't support CONTEXT_EXTENDED_REGISTERS.
15205 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15206 (the_low_target): Install them.
15207 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15208 failing with ERROR_PIPE_NOT_CONNECTED.
15210 2009-06-30 Doug Evans <dje@google.com>
15211 Pierre Muller <muller@ics.u-strasbg.fr>
15213 Add h/w watchpoint support to x86-linux, win32-i386.
15214 * Makefile.in (SFILES): Add i386-low.c
15215 (i386_low_h): Define.
15216 (i386-low.o): Add dependencies.
15217 (linux-x86-low.o): Add i386-low.h dependency.
15218 (win32-i386-low.o): Ditto.
15219 * i386-low.c: New file.
15220 * i386-low.h: New file.
15221 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15222 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15223 * linux-low.c (linux_add_process): Initialize arch_private.
15224 (linux_remove_process): Free arch_private.
15225 (add_lwp): Initialize arch_private.
15226 (delete_lwp): Free arch_private.
15227 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15229 * linux-low.h (process_info_private): New member arch_private.
15230 (lwp_info): New member arch_private.
15231 (linux_target_ops): New members new_process, new_thread,
15233 (ptid_of): New macro.
15234 * linux-x86-low.c: Include stddef.h, i386-low.h.
15235 (arch_process_info): New struct.
15236 (arch_lwp_info): New struct.
15237 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15238 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15239 (i386_dr_low_get_status): New function.
15240 (x86_insert_point, x86_remove_point): New functions.
15241 (x86_stopped_by_watchpoint): New function.
15242 (x86_stopped_data_address): New function.
15243 (x86_linux_new_process, x86_linux_new_thread): New functions.
15244 (x86_linux_prepare_to_resume): New function.
15245 (the_low_target): Add entries for insert_point, remove_point,
15246 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15248 * server.c (debug_hw_points): New global.
15249 (monitor_show_help): Document set debug-hw-points.
15250 (handle_query): Process "set debug-hw-points".
15251 * server.h (debug_hw_points): Declare.
15252 (paddress): Declare.
15253 * utils.c (NUMCELLS, CELLSIZE): New macros.
15254 (get_sell, xsnprintf, paddress): New functions.
15255 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15256 remove_point, stopped_by_watchpoint, stopped_data_address.
15257 * win32-i386-low.c: Include i386-low.h.
15258 (debug_reg_state): Replaces dr.
15259 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15260 (i386_dr_low_get_status): New function.
15261 (i386_insert_point, i386_remove_point): New functions.
15262 (i386_stopped_by_watchpoint): New function.
15263 (i386_stopped_data_address): New function.
15264 (i386_initial_stuff): Update.
15265 (get_thread_context,set_thread_context,i386_thread_added): Update.
15266 (the_low_target): Add entries for insert_point,
15267 remove_point, stopped_by_watchpoint, stopped_data_address.
15268 * win32-low.c (win32_insert_watchpoint): New function.
15269 (win32_remove_watchpoint): New function.
15270 (win32_stopped_by_watchpoint): New function.
15271 (win32_stopped_data_address): New function.
15272 (win32_target_ops): Add entries for insert_watchpoint,
15273 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15274 * win32-low.h (win32_target_ops): New members insert_point,
15275 remove_point, stopped_by_watchpoint, stopped_data_address.
15277 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15279 * server.c (process_serial_event): Re-return unsupported, not
15280 error, if the type isn't recognized. Re-allow supporting only
15281 insert or remove packets. Also call require_running for
15282 breakpoints. Add missing break statement to default case. Tidy.
15283 * target.h (struct target_ops): Rename insert_watchpoint to
15284 insert_point, and remove_watchpoint to remove_point.
15286 * linux-low.h (struct linux_target_ops): Likewise.
15287 * linux-low.c (linux_insert_watchpoint): Rename to ...
15288 (linux_insert_point): ... this. Adjust.
15289 (linux_remove_watchpoint): Rename to ...
15290 (linux_remove_point): ... this. Adjust.
15291 (linux_target_ops): Adjust.
15292 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15293 (cris_insert_point): ... this.
15294 (cris_remove_watchpoint): Rename to ...
15295 (cris_remove_point): ... this.
15296 (the_low_target): Adjust.
15298 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15300 * server.c (handle_v_kill): Pass signal_pid to
15301 kill_inferior if multi_process is zero.
15303 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15305 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15306 * target.h (target_ops): Comment for *_watchpoint to make it clear
15307 the functions can get types '0' and '1'.
15309 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15311 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15312 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15313 * regcache.c (get_regcache): Likewise.
15314 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15315 * win32-low.c (child_fetch_inferior_registers): Remove check for
15318 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15319 Pedro Alves <pedro@codesourcery.com>
15321 * target.h (struct target_ops) <supports_multi_process>: New
15323 (target_supports_multi_process): New.
15324 * server.c (handle_query): Even if GDB reports support, only
15325 enable multi-process if the target also supports it. Report
15326 multi-process support only if the target backend supports it.
15327 * linux-low.c (linux_supports_multi_process): New function.
15328 (linux_target_ops): Install it as target_supports_multi_process
15331 2009-05-24 Doug Evans <dje@google.com>
15333 Global renaming of find_thread_pid to find_thread_ptid.
15334 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15335 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15336 All callers updated.
15338 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15339 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15342 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15343 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15344 (linux_resume_one_lwp): Ditto.
15346 2009-05-23 Doug Evans <dje@google.com>
15348 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15349 from struct inferior_list_entry * to struct lwp_info *.
15350 All callers updated.
15352 2009-05-13 Doug Evans <dje@google.com>
15354 * linux-x86-low.c: Don't include assert.h.
15355 (x86_siginfo_fixup): Use fatal, not assert.
15356 (x86_arch_setup): Fix comment.
15358 2009-05-12 Doug Evans <dje@google.com>
15360 Biarch support for i386/amd64 gdbserver.
15361 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15362 Add linux-x86-low.c.
15363 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15364 (linux-x86-low.o): Add.
15365 * linux-x86-64-low.c: Delete.
15366 * linux-i386-low.c: Delete.
15367 * linux-x86-low.c: New file.
15368 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15370 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15372 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15373 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15374 (linux_child_pid_to_exec_file): New function.
15375 (elf_64_header_p, elf_64_file_p): New functions.
15376 (siginfo_fixup): New function.
15377 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15378 give target a chance to convert layout.
15379 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15380 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15382 2009-05-07 Doug Evans <dje@google.com>
15384 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15385 (regsets_store_inferior_registers): Ditto.
15387 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15391 * linux-low.c (must_set_ptrace_flags): Delete.
15392 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15394 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15395 `lwp->must_set_ptrace_flags' instead.
15396 (linux_wait_for_event_1): Set ptrace options here.
15397 (linux_wait_1): ... not here.
15399 2009-04-30 Doug Evans <dje@google.com>
15401 * inferiors.c (started_inferior_callback): New function.
15402 (attached_inferior_callback): New function.
15403 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15404 * server.c (print_started_pid, print_attached_pid): New functions.
15405 (detach_or_kill_for_exit): New function.
15406 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15407 * server.h (have_started_inferiors_p): Declare.
15408 (have_attached_inferiors_p): Declare.
15410 * inferiors.c (remove_process): Fix memory leak, free process.
15411 * linux-low.c (linux_remove_process): New function.
15412 (linux_kill): Call it instead of remove_process.
15413 (linux_detach, linux_wait_1): Ditto.
15415 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15417 * configure.srv: Add x86 Windows CE target.
15419 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15421 * inferiors.c (get_thread_process): Make global.
15422 * server.h (get_thread_process): Add prototype.
15423 * thread-db.c (find_one_thread): Use get_thread_process
15424 instead of current_process.
15425 (thread_db_get_tls_address): Do not crash if called when
15426 thread layer is not yet initialized.
15428 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15430 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15431 * spu-low.c (current_tid): Rename to ...
15432 (current_ptid): ... this.
15433 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15434 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15435 ptid_get_lwp (current_ptid) instead of current_tid.
15436 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15437 instead of current_tid. Use find_process_pid to verify pid
15438 argument is valid. Pass proper argument to remove_process.
15439 (spu_thread_alive): Compare current_ptid instead of current_tid.
15440 (spu_resume): Likewise.
15442 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15444 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15447 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15449 Implement the multiprocess extensions, and add linux multiprocess
15452 * server.h (ULONGEST): Declare.
15453 (struct ptid, ptid_t): New.
15454 (minus_one_ptid, null_ptid): Declare.
15455 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15456 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15457 (struct inferior_list_entry): Change `id' type from unsigned from
15459 (struct sym_cache, struct breakpoint, struct
15460 process_info_private): Forward declare.
15461 (struct process_info): Declare.
15462 (current_process): Declare.
15463 (all_processes): Declare.
15464 (initialize_inferiors): Declare.
15465 (add_thread): Adjust to use ptid_t.
15466 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15467 (add_process, remove_process, find_thread_pid): Declare.
15468 (find_inferior_id): Adjust to use ptid_t.
15469 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15470 (multi_process): Declare.
15471 (push_event): Adjust to use ptid_t.
15472 (read_ptid, write_ptid): Declare.
15473 (prepare_resume_reply): Adjust to use ptid_t.
15474 (clear_symbol_cache): Declare.
15475 * inferiors.c (all_processes): New.
15476 (null_ptid, minus_one_ptid): New.
15477 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15478 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15479 (add_thread): Change unsigned long to ptid. Remove gdb_id
15481 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15482 (gdb_id_to_thread): Rename to ...
15483 (find_thread_pid): ... this. Change unsigned long to ptid.
15484 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15485 (loaded_dll, pull_pid_from_list): Adjust.
15486 (add_process, remove_process, find_process_pid)
15487 (get_thread_process, current_process, initialize_inferiors): New.
15488 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15489 (struct target_waitstatus) <related_pid>: Ditto.
15490 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15491 return type to int.
15492 (struct target_ops) <join>: Add `pid' argument.
15493 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15494 (struct target_ops) <wait>: Add `ptid' field. Change return type
15496 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15497 (mywait): Add `ptid' argument. Change return type to ptid_t.
15498 (target_pid_to_str): Declare.
15499 * target.c (set_desired_inferior): Adjust to use ptids.
15500 (mywait): Add new `ptid' argument. Adjust.
15501 (target_pid_to_str): New.
15502 * mem-break.h (free_all_breakpoints): Declare.
15503 * mem-break.c (breakpoints): Delelete.
15504 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15505 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15506 to use per-process breakpoint list.
15507 (free_all_breakpoints): New.
15508 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15509 (symbol_cache, all_symbols_looked_up): Delete.
15511 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15513 (prepare_resume_reply): Change ptid argument's type from unsigned
15514 long to ptid_t. Adjust. Implement W;process and X;process.
15515 (free_sym_cache, clear_symbol_cache): New.
15516 (look_up_one_symbol): Adjust to per-process symbol cache. *
15517 * server.c (cont_thread, general_thread, step_thread): Change type
15519 (attached): Delete.
15520 (multi_process): New.
15521 (last_ptid): Change type to ptid_t.
15522 (struct vstop_notif) <ptid>: Change type to ptid_t.
15523 (queue_stop_reply, push_event): Change `ptid' argument's type to
15525 (discard_queued_stop_replies): Add `pid' argument.
15526 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15527 changes. Don't reference the `attached' global.
15528 (attach_inferior): Adjust to mywait interface changes.
15529 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15530 features. Handle and report "multiprocess+". Handle
15532 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15534 (handle_v_kill): New.
15535 (handle_v_stopped): Adjust to use target_pid_to_str.
15536 (handle_v_requests): Allow multiple attaches and runs when
15537 multiprocess extensions are in effect. Handle "vKill".
15538 (myresume): Adjust to use ptids.
15539 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15540 (handle_status): Adjust to discard_queued_stop_replies interface
15542 (first_thread_of, kill_inferior_callback)
15543 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15544 (main): Call initialize_inferiors. Adjust to use ptids, killing
15545 and detaching from all inferiors. Handle multiprocess packet
15547 * linux-low.h: Include gdb_proc_service.h.
15548 (struct process_info_private): New.
15549 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15550 <lwpid_of>: Use ptid_get_lwp.
15551 (get_lwp_thread): Adjust.
15552 (struct lwp_info): Add `dead' member.
15553 (find_lwp_pid): Declare.
15554 * linux-low.c (thread_db_active): Delete.
15555 (new_inferior): Adjust comment.
15556 (inferior_pid): Delete.
15557 (linux_add_process): New.
15558 (handle_extended_wait): Adjust.
15559 (add_lwp): Change unsigned long to ptid.
15560 (linux_create_inferior): Add process to processes table. Adjust
15561 to use ptids. Don't set new_inferior here.
15562 (linux_attach_lwp): Rename to ...
15563 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15564 it. Adjust to use ptids.
15565 (linux_attach_lwp): New.
15566 (linux_attach): Add process to processes table. Don't set
15568 (struct counter): New.
15569 (second_thread_of_pid_p, last_thread_of_process_p): New.
15570 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15571 multiple processes.
15572 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15573 processes. Remove process from process table.
15574 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15575 to multiple processes.
15576 (any_thread_of): New.
15577 (linux_detach): Add `pid' argument, and handle it. Remove process
15578 from processes table.
15579 (linux_join): Add `pid' argument. Handle it.
15580 (linux_thread_alive): Change unsighed long argument to ptid_t.
15581 Consider dead lwps as not being alive.
15582 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15583 threads we're not interested in.
15584 (same_lwp, find_lwp_pid): New.
15585 (linux_wait_for_lwp): Change `pid' argument's type from int to
15587 (linux_wait_for_event): Rename to ...
15588 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15589 from int to ptid_t. Adjust.
15590 (linux_wait_for_event): New.
15591 (linux_wait_1): Add `ptid' argument. Change return type to
15592 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15593 that exit from the process table.
15594 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15596 (mark_lwp_dead): New.
15597 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15598 stopping all threads, mark its main lwp as dead.
15599 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15601 (fetch_register, usr_store_inferior_registers)
15602 (regsets_fetch_inferior_registers)
15603 (regsets_store_inferior_registers, linux_read_memory)
15604 (linux_write_memory): Inline `inferior_pid'.
15605 (linux_look_up_symbols): Adjust to use per-process
15606 `thread_db_active'.
15607 (linux_request_interrupt): Adjust to use ptids.
15608 (linux_read_auxv): Inline `inferior_pid'.
15609 (initialize_low): Don't reference thread_db_active.
15610 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15611 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15612 (ps_getpid): Return the pid of the current inferior.
15613 * thread-db.c (proc_handle, thread_agent): Delete.
15614 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15616 (find_one_thread): Change argument type to ptid_t. Adjust to
15618 (maybe_attach_thread): Adjust to per-process data and ptids.
15619 (thread_db_find_new_threads): Ditto.
15620 (thread_db_init): Ditto.
15621 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15622 processes table. Adjust to use ptids.
15623 (spu_kill, spu_detach): Adjust interface. Remove process from
15625 (spu_join, spu_thread_alive): Adjust interface.
15626 (spu_wait): Adjust interface. Remove process from processes
15627 table. Adjust to use ptids.
15628 * win32-low.c (current_inferior_tid): Delete.
15629 (current_inferior_ptid): New.
15630 (debug_event_ptid): New.
15631 (thread_rec): Take a ptid. Adjust.
15632 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15633 (child_delete_thread): Ditto.
15634 (do_initial_child_stuff): Add `attached' argument. Add process to
15636 (child_fetch_inferior_registers, child_store_inferior_registers):
15638 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15639 (win32_attach): Pass 1 to do_initial_child_stuff.
15640 (win32_kill): Adjust interface. Remove process from processes
15642 (win32_detach): Ditto.
15643 (win32_join): Adjust interface.
15644 (win32_thread_alive): Take a ptid.
15645 (win32_resume): Adjust to use ptids.
15646 (get_child_debug_event): Ditto.
15647 (win32_wait): Adjust interface. Remove exiting process from
15650 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15652 Non-stop mode support.
15654 * server.h (non_stop): Declare.
15655 (gdb_client_data, handler_func): Declare.
15656 (delete_file_handler, add_file_handler, start_event_loop):
15658 (handle_serial_event, handle_target_event, push_event)
15659 (putpkt_notif): Declare.
15660 * target.h (enum resume_kind): New.
15661 (struct thread_resume): Replace `step' field by `kind' field.
15662 (TARGET_WNOHANG): Define.
15663 (struct target_ops) <wait>: Add `options' argument.
15664 <supports_non_stop, async, start_non_stop>: New fields.
15665 (target_supports_non_stop, target_async): New.
15666 (start_non_stop): Declare.
15667 (mywait): Add `options' argument.
15668 * target.c (mywait): Add `options' argument. Print child exit
15669 notifications here.
15670 (start_non_stop): New.
15671 * server.c (non_stop, own_buf, mem_buf): New globals.
15672 (struct vstop_notif): New.
15673 (notif_queue): New global.
15674 (queue_stop_reply, push_event, discard_queued_stop_replies)
15675 (send_next_stop_reply): New.
15676 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15678 (attach_inferior): In non-stop mode, don't wait for the target
15680 (handle_general_set): Handle QNonStop.
15681 (handle_query): When handling qC, return the current general
15682 thread, instead of the first thread of the list.
15683 (handle_query): If the backend supports non-stop mode, include
15684 QNonStop+ in the qSupported query response.
15685 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15687 (handle_v_attach, handle_v_run): Handle non-stop mode.
15688 (handle_v_stopped): New.
15689 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15690 (myresume): Adjust to use resume_kind. Handle non-stop.
15691 (queue_stop_reply_callback): New.
15692 (handle_status): Handle non-stop mode.
15693 (main): Clear non_stop flag on reconnection. Use the event-loop.
15694 Refactor serial protocol handling from here ...
15695 (process_serial_event): ... to this new function. When GDB
15696 selects any thread, select one here. In non-stop mode, wait until
15697 GDB acks all pending events before exiting.
15698 (handle_serial_event, handle_target_event): New.
15699 * remote-utils.c (remote_open): Install remote_desc in the event
15701 (remote_close): Remove remote_desc from the event loop.
15702 (putpkt_binary): Rename to...
15703 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15704 (putpkt_binary): New as wrapper around putpkt_binary_1.
15705 (putpkt_notif): New.
15706 (prepare_resume_reply): In non-stop mode, don't change the
15708 * event-loop.c: New.
15709 * Makefile.in (OBJ): Add event-loop.o.
15710 (event-loop.o): New rule.
15712 * linux-low.h (pid_of): Moved here.
15714 (get_lwp_thread): Use lwpid_of.
15715 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15716 * linux-low.c (pid_of): Delete.
15717 (inferior_pid): Use lwpid_of.
15718 (linux_event_pipe): New.
15719 (target_is_async_p): New.
15721 (handle_extended_wait): Use lwpid_of.
15722 (add_lwp): Don't set lwpid field.
15723 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15724 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15725 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15726 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15727 first. Adjust to linux_wait_for_event interface changes. Use
15729 (linux_detach): Don't delete the main lwp here.
15730 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15731 (status_pending_p): Don't consider explicitly suspended lwps.
15732 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15733 pointer. Add OPTIONS argument. Change return type to int. Use
15734 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15735 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15736 pointer. Add status pointer argument. Return a pid instead of a
15737 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15738 changes. In non-stop mode, don't switch to a random thread.
15739 (linux_wait): Rename to...
15740 (linux_wait_1): ... this. Add target_options argument, and handle
15741 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15742 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15743 clean exit and signal exit code. Don't stop all threads in
15744 non-stop mode. In all-stop mode, only stop all threads when
15745 reporting a stop to GDB. Handle explicit thread stop requests.
15746 (async_file_flush, async_file_mark): New.
15748 (send_sigstop): Use lwpid_of.
15749 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15750 interface changes. In non-stop mode, don't switch to a random
15752 (linux_resume_one_lwp): Use lwpid_of.
15753 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15754 (linux_resume_one_thread): ... this. Handle resume_stop. In
15755 non-stop mode, don't look for pending flag in all threads.
15756 (resume_status_pending_p): Don't consider explicitly suspended
15758 (my_waitpid): Reimplement. Emulate __WALL.
15759 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15761 (sigchld_handler, linux_supports_non_stop, linux_async)
15762 (linux_start_non_stop): New.
15763 (linux_target_ops): Register linux_supports_non_stop, linux_async
15764 and linux_start_non_stop.
15765 (initialize_low): Install SIGCHLD handler.
15766 * thread-db.c (thread_db_create_event, find_one_thread)
15767 (thread_db_get_tls_address): Use lwpid_of.
15768 * win32-low.c (win32_detach): Adjust to use resume_kind.
15769 (win32_wait): Add `options' argument.
15770 * spu-low.c (spu_resume): Adjust to use resume_kind.
15771 (spu_wait): Add `options' argument.
15773 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15775 Decouple target code from remote protocol.
15777 * target.h (enum target_waitkind): New.
15778 (struct target_waitstatus): New.
15779 (struct target_ops) <wait>: Return an unsigned long. Take a
15780 target_waitstatus pointer instead of a char pointer.
15781 (mywait): Likewise.
15782 * target.c (mywait): Change prototype to return an unsigned long.
15783 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15784 * server.h (thread_from_wait, old_thread_from_wait): Delete
15786 (prepare_resume_reply): Change prototype to take a
15788 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15789 (last_status, last_ptid): New.
15790 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15791 pid instead of a signal.
15792 (attach_inferior): Remove "status" and "signal" parameters.
15794 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15796 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15797 (handle_v_requests, myresume): Remove "status" and "signal"
15798 parameters. Adjust.
15799 (handle_status): New.
15800 (main): Delete local `status'. Adjust.
15801 * remote-utils.c: Include target.h.
15802 (prepare_resume_reply): Change prototype to take a
15803 target_waitstatus. Adjust.
15805 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15807 * spu-low.c (spu_wait): Adjust.
15808 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15810 (win32_wait): Adjust.
15812 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15814 * target.h (struct thread_resume): Delete leave_stopped member.
15815 (struct target_ops): Add a `n' argument to the `resume' callback.
15816 * server.c (start_inferior): Adjust.
15817 (handle_v_cont, myresume): Adjust.
15818 * linux-low.c (check_removed_breakpoint): Adjust to resume
15819 interface change, and to removed leave_stopped field.
15820 (resume_ptr): Delete.
15821 (struct thread_resume_array): New.
15822 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15823 resume interface change.
15824 (linux_continue_one_thread, linux_queue_one_thread)
15825 (resume_status_pending_p): Check if the resume field is NULL
15826 instead of checking the leave_stopped member.
15827 (linux_resume): Adjust to the target resume interface change.
15828 * spu-low.c (spu_resume): Adjust to the target resume interface
15830 * win32-low.c (win32_detach, win32_resume): Ditto.
15832 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15834 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15836 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15838 (linux_continue_one_thread): Only preserve the stepping flag if
15839 there's a pending breakpoint.
15841 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15843 * server.c (main): After the inferior having exited, call
15844 remote_close before exiting gdbserver.
15846 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15848 Fix size of FPSCR in Power 7 processors.
15849 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15850 (PPC_FEATURE_HAS_DFP): New #define.
15851 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15854 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15856 * server.c (handle_query) Whitespace and formatting.
15858 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15860 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15861 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15862 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15863 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15864 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15865 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15866 Makefile.in, configure.ac: Fix whitespace throughout.
15867 * configure: Regenerate.
15869 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15871 * inferiors.c (find_inferior): Make it safe for the callback
15872 function to delete the currently iterated inferior.
15874 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15876 * Makefile.in (linuw_low_h): Move higher.
15877 (thread-db.o): Depend on $(linux_low_h).
15879 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15881 Rename "process" to "lwp" throughout.
15883 * linux-low.c (all_processes): Rename to...
15884 (all_lwps): ... this.
15885 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15886 (add_process): Rename to ...
15887 (add_lwp): ... this. Adjust.
15888 (linux_create_inferior): Adjust.
15889 (linux_attach_lwp): Adjust.
15890 (linux_attach): Adjust.
15891 (linux_kill_one_process): Rename to ...
15892 (linux_kill_one_lwp): ... this. Adjust.
15893 (linux_kill): Adjust.
15894 (linux_detach_one_process): Rename to ...
15895 (linux_detach_one_lwp): ... this. Adjust.
15896 (linux_detach): Adjust.
15897 (check_removed_breakpoint): Adjust.
15898 (status_pending_p): Adjust.
15899 (linux_wait_for_process): Rename to ...
15900 (linux_wait_for_lwp): ... this. Adjust.
15901 (linux_wait_for_event): Adjust.
15902 (send_sigstop): Adjust.
15903 (wait_for_sigstop): Adjust.
15904 (stop_all_processes): Rename to ...
15905 (stop_all_lwps): ... this.
15906 (linux_resume_one_process): Rename to ...
15907 (linux_resume_one_lwp): ... this. Adjust.
15908 (linux_set_resume_request, linux_continue_one_thread)
15909 (linux_queue_one_thread, resume_status_pending_p)
15910 (usr_store_inferior_registers, regsets_store_inferior_registers)
15911 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15913 * linux-low.h (get_process): Rename to ...
15914 (get_lwp): ... this. Adjust.
15915 (get_thread_process): Rename to ...
15916 (get_thread_lwp): ... this. Adjust.
15917 (get_process_thread): Rename to ...
15918 (get_lwp_thread): ... this. Adjust.
15919 (struct process_info): Rename to ...
15920 (struct lwp_info): ... this.
15921 (all_processes): Rename to ...
15922 (all_lwps): ... this.
15923 * proc-service.c (ps_lgetregs): Adjust.
15924 * thread-db.c (thread_db_create_event, find_one_thread)
15925 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15927 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15929 * server.c (handle_query): Handle "qAttached".
15931 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15933 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15934 GPLv3, update license URL.
15936 2009-03-01 Doug Evans <dje@google.com>
15938 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15939 (server_h): Add gdb_signals.h.
15940 (signals.o): Update.
15941 * server.h (target_signal_from_host,target_signal_to_host_p)
15942 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15944 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15946 * remote-utils.c (getpkt): Also generate remote-debug
15947 information if noack_mode is set.
15949 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15951 * server.c (handle_query): Report qXfer:siginfo:read and
15952 qXfer:siginfo:write as supported and handle them.
15953 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15954 * linux-low.c (linux_xfer_siginfo): New.
15955 (linux_target_ops): Set it.
15957 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15959 * server.c (gdbserver_usage): Mention --remote-debug.
15960 (main): Accept '--remote-debug' switch.
15962 2009-01-18 Doug Evans <dje@google.com>
15964 * regcache.c (new_register_cache): No need to check result of xcalloc.
15965 * server.c (handle_search_memory): Back out calls to xmalloc,
15966 result is checked and error is returned to user upon failure.
15967 (handle_query): Ditto. Add more checks for result of malloc.
15968 (handle_v_cont): Check result of malloc, report error back to
15970 (handle_v_run): Ditto. Call freeargv.
15971 * server.h (freeargv): Declare.
15972 * utils.c (freeargv): New fn.
15974 2009-01-15 Doug Evans <dje@google.com>
15976 * gdbreplay.c (perror_with_name): Make arg const char *.
15977 * server.h (target_signal_to_name): Make return type const char *.
15978 * thread-db.c (thread_db_err_str): Make return type const char *.
15979 * utils.c (perror_with_name): Make arg const char *.
15981 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15983 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15984 when handling a EXIT_PROCESS_DEBUG_EVENT.
15986 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15988 * gdbreplay.c (gdbreplay_version): Update copyright year.
15989 * server.c (gdbserver_version): Likewise.
15991 2009-01-05 Doug Evans <dje@google.com>
15993 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15994 (handle_extended_wait): Improve comment.
15996 2008-12-13 Doug Evans <dje@google.com>
15998 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15999 * server.h (ATTR_MALLOC): New macro.
16000 (xmalloc,xcalloc,xstrdup): Declare.
16001 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16002 * inferiors.c: Ditto.
16003 * linux-low.c: Ditto.
16004 * mem-break.c: Ditto.
16005 * regcache.c: Ditto.
16006 * remote-utils.c: Ditto.
16009 * win32-low.c: Ditto.
16011 2008-12-12 Doug Evans <dje@google.com>
16013 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16014 in debugging printf.
16016 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16018 2008-12-09 Doug Evans <dje@google.com>
16020 * linux-low.h (struct process_info): Delete member tid, unused.
16021 * thread-db.c (find_one_thread): Update.
16022 (maybe_attach_thread): Update.
16024 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16026 * target.h (struct target_ops): Add qxfer_osdata member.
16027 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16029 (linux_qxfer_osdata): New functions.
16030 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16032 * server.c (handle_query): Handle "qXfer:osdata:read:".
16033 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16034 (buffer_xml_printf): New functions.
16035 * server.h (struct buffer): New.
16036 (buffer_grow_str, buffer_grow_str0): New macros.
16037 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16038 (buffer_xml_printf): Declare.
16040 2008-11-24 Doug Evans <dje@google.com>
16042 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16044 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16046 * server.c (handle_v_run): Always use the supplied argument list.
16048 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16050 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16051 (xtensa_regmap_table): Add entry for scompare1.
16053 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16055 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16056 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16057 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16058 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16059 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16060 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16061 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16062 XML target descriptions.
16063 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16064 when inferior is running on an ISA 2.05 or later processor. Add
16065 special case to return offset for full 64-bit slot of FPSCR when
16068 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16070 * Makefile.in (SFILES, clean): Added sparc64 files.
16071 (reg-sparc64.o, reg-sparc64.c): New.
16072 * configure.srv (sparc*-*-linux*): New configuration.
16073 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16074 syscall arguments for SPARC.
16075 (regsets_store_inferior_registers): Likewise.
16076 * linux-sparc-low.c: New file.
16078 2008-10-21 Doug Evans <dje@google.com>
16080 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16081 (READLINE_DIR,READLINE_DEP): Delete.
16082 (INTERNAL_CFLAGS): Update.
16083 (LINTFLAGS): Update.
16085 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16087 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16088 whole argv from the last run, not just argv[0].
16090 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16092 * regcache.c (new_register_cache): Return NULL if the register
16093 cache size isn't known yet.
16094 (free_register_cache): Avoid dereferencing a NULL regcache.
16096 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16098 * configure.srv: Merge MIPS and MIPS64.
16100 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16102 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16104 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16106 * Makefile.in: Add required vsx dependencies.
16108 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16109 Declare init_registers_powerpc_vsx32l.
16110 Declare init_registers_powerpc_vsx64l.
16111 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16112 (ppc_arch_setup): Check for VSX in hwcap.
16113 (ppc_fill_vsxregset): New function.
16114 (ppc_store_vsxregset): New function.
16115 Add new VSX entry in regset_info target_regsets.
16117 * configure.srv: Add new VSX dependencies.
16119 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16121 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16122 (remote_open): Set or clear transport_is_reliable.
16123 (putpkt_binary): Don't expect acks in noack mode.
16124 (getpkt): Don't send ack/nac in noack mode.
16125 * server.c (handle_general_set): Handle QStartNoAckMode.
16126 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16128 (main): Reset noack_mode on every connection.
16129 * server.h (noack_mode): Declare.
16131 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16133 * Makefile.in (GDBREPLAY_OBS): New variable.
16134 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16136 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16137 Daniel Jacobowitz <dan@codesourcery.com>
16139 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16140 (usr_store_inferior_registers): Likewise.
16141 (regsets_store_inferior_registers): Likewise.
16143 2008-07-31 Rolf Jansen <rj@surtec.com>
16144 Pedro Alves <pedro@codesourcery.com>
16146 * configure.ac: Check for memmem declaration.
16147 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16148 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16149 (disable_packet_qfThreadInfo): Unconditionally compile.
16150 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16151 * configure, config.in: Regenerate.
16153 2008-07-28 Doug Kwan <dougkwan@google.com>
16155 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16156 (linux_write_memory): Remove declaration of errno.
16158 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16160 * linux-low.c (handle_extended_wait): Do not use "status"
16161 variable uninitialized.
16163 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16165 * server.c (handle_v_attach): Inhibit reporting dll changes.
16167 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16169 * remote-utils.c (prepare_resume_reply): If requested, don't
16170 output "thread:TID" in the T stop reply.
16172 * server.c (disable_packet_vCont, disable_packet_Tthread)
16173 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16174 (handle_query): If requested, disable support for qC, qfThreadInfo
16176 (handle_v_requests): If requested, disable support for vCont.
16177 (gdbserver_show_disableable): New.
16178 (main): Handle --disable-packet and --disable-packet=LIST.
16180 * server.h (disable_packet_vCont, disable_packet_Tthread)
16181 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16183 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16185 * server.c (gdbserver_usage): Mention --version.
16187 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16189 * Makefile.in (gdbreplay.o): New rule.
16191 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16193 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16194 message, not gdbserver.
16196 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16197 Nathan Sidwell <nathan@codesourcery.com>
16198 Joseph Myers <joseph@codesourcery.com>
16200 * acinclude.m4: Include ../../config/acx.m4.
16201 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16202 * configure, config.in: Regenerate.
16203 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16204 * server.c (gdbserver_version): Print PKGVERSION.
16205 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16206 (main): Adjust gdbserver_usage calls.
16207 * gdbreplay.c (version, host_name): Add declarations.
16208 (gdbreplay_version, gdbreplay_usage): New.
16209 (main): Accept --version and --help options.
16211 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16213 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16214 (arm_breakpoint_at): Handle Thumb.
16215 (the_low_target): Add comment.
16217 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16219 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16221 2008-05-09 Doug Evans <dje@google.com>
16223 * server.h (decode_search_memory_packet): Declare.
16224 * remote-utils.c (decode_search_memory_packet): New fn.
16225 * server.c (handle_search_memory_1): New fn.
16226 (handle_search_memory): New fn.
16227 (handle_query): Process qSearch:memory packets.
16229 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16231 * regcache.c (registers_length): Remove.
16232 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16233 full register packet.
16234 * regcache.h (registers_length): Remove prototype.
16235 * server.h (PBUFSIZ): Define to 16384.
16237 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16239 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16240 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16241 powerpc-64l.o, and powerpc-altivec64l.o.
16242 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16243 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16244 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16245 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16246 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16249 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16250 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16251 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16252 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16253 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16254 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16255 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16256 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16257 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16258 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16261 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16262 (init_registers_powerpc_32l): ... this new prototype.
16263 (init_registers_powerpc_32): Remove, replace by ...
16264 (init_registers_powerpc_altivec32l): ... this new prototype.
16265 (init_registers_powerpc_e500): Remove, replace by ...
16266 (init_registers_powerpc_e500l): ... this new prototype.
16267 (init_registers_ppc64): Remove, replace by ...
16268 (init_registers_powerpc_64l): ... this new prototype.
16269 (init_registers_powerpc_64): Remove, replace by ...
16270 (init_registers_powerpc_altivec64l): ... this new prototype.
16271 (ppc_num_regs): Set to 73.
16272 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16273 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16274 (ppc_cannot_store_register): Handle orig_r3 and trap.
16275 (ppc_arch_setup): Update init_registers_... calls.
16276 (ppc_fill_gregset): Handle orig_r3 and trap.
16278 * inferiors.c (clear_inferiors): Reset current_inferior.
16280 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16282 * acinclude.m4: Add override.m4.
16283 * configure: Regenerate.
16285 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16287 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16288 initial call to init_register_ppc64.
16290 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16292 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16293 single powerpc*-*-linux* case.
16294 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16296 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16298 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16299 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16301 * linux-ppc-low.c: Include <elf.h>.
16302 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16303 (ppc_hwcap): New global variable.
16304 (ppc_regmap): Remove __SPE__ #ifdef sections.
16305 (ppc_regmap_e500): New global variable.
16306 (ppc_cannot_store_register): Update __SPE__ special case.
16307 (ppc_get_hwcap): New function.
16308 (ppc_arch_setup): Use it to determine whether inferior supports
16309 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16310 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16311 Do not access registers if target does not support AltiVec.
16312 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16313 Do not access registers if target does not support SPE.
16314 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16316 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16318 * linux-low.c (disabled_regsets, num_regsets): New.
16319 (use_regsets_p): Delete.
16320 (linux_wait_for_process): Clear disabled_regsets.
16321 (regsets_fetch_inferior_registers): Check and set it.
16322 (regsets_store_inferior_registers): Likewise.
16323 (linux_fetch_registers, linux_store_registers): Do not use
16325 (initialize_low): Allocate disabled_regsets.
16327 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16329 * Makefile.in (LIBOBJS): New.
16330 (OBS): Use LIBOBJS.
16331 (memmem.o): New rule.
16332 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16333 * configure: Regenerated.
16335 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16337 * server.c (handle_query): Never return "unsupported" for
16338 qXfer:features:read queries.
16340 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16342 * server.c (get_features_xml): Fix inverted condition.
16343 (handle_query): Always support qXfer:feature:read.
16345 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16347 * server.c (wrapper_argv): New.
16348 (start_inferior): Handle wrapper_argv. If set, expect an extra
16350 (gdbserver_usage): Document --wrapper.
16351 (main): Parse --wrapper.
16353 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16355 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16356 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16357 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16358 (ppc_set_pc): Likewise.
16359 (ppc_arch_setup): New function.
16360 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16361 of collect_register.
16362 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16364 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16366 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16367 instead of linux-ppc64-low.o.
16368 * linux-ppc64-low.c: Remove file.
16369 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16370 (linux-ppc64-low.o): Remove rule.
16372 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16373 (init_registers_powerpc_64): Likewise.
16374 (ppc_regmap): Conditionally define depending on __powerpc64__.
16375 (ppc_cannot_store_register): Do not special-case "fpscr" when
16376 compiled on __powerpc64__.
16377 (ppc_collect_ptrace_register): New function.
16378 (ppc_supply_ptrace_register): New function.
16379 (ppc_breakpoint): Change type to "unsigned int".
16380 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16381 (the_low_target): Conditionally provide initializers for the
16382 arch_setup member depending on __powerpc64__. Install
16383 collect_ptrace_register and supply_ptrace_register members.
16385 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16387 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16388 * server.c (gdbserver_xmltarget): Define.
16389 (get_features_xml): Use it to replace "target.xml" and arch_string.
16391 * configure.srv: Remove srv_xmltarget. Add XML files that were
16392 mentioned there to srv_xmlfiles instead. Remove conditional tests
16393 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16394 srv_xmlfiles and srv_regobj to include all possible choices.
16395 * configure.ac (srv_xmltarget): Remove.
16396 (srv_xmlfiles): Do not add "target.xml".
16397 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16398 checks for supplementary target information.
16399 * configure: Regenerate.
16400 * Makefile.in (XML_TARGET): Remove.
16401 (target.xml): Remove rule.
16402 (clean): Do not clean up target.xml.
16403 (.PRECIOUS): Do not mention target.xml.
16405 * target.h (struct target_ops): Remove arch_string member.
16406 * linux-low.c (linux_arch_string): Remove.
16407 (linux_target_ops): Remove arch_string initializer.
16408 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16409 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16410 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16411 * spu-low.c (spu_arch_string): Remove.
16412 (spu_target_ops): Remove arch_string initializer.
16413 * win32-low.c (win32_arch_string): Remove.
16414 (win32_target_ops): Remove arch_string initializer.
16415 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16416 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16417 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16419 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16421 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16422 by collect_ptrace_register and supply_ptrace_register hooks.
16423 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16424 instead of checking for the_low_target.left_pad_xfer.
16425 (usr_store_inferior_registers): Use collect_ptrace_register callback
16426 instead of checking for the_low_target.left_pad_xfer.
16428 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16429 (s390_supply_ptrace_register): Likewise.
16430 (s390_fill_gregset): Call s390_collect_ptrace_register.
16431 (the_low_target): Update.
16433 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16434 (ppc_supply_ptrace_register): Likewise.
16435 (the_low_target): Update.
16437 * linux-i386-low.c (the_low_target): Update.
16438 * linux-x86-64-low.c (the_low_target): Update.
16440 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16442 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16443 reg-s390.o and reg-s390x.o.
16445 * linux-low.c (new_inferior): New global variable.
16446 (linux_create_inferior, linux_attach): Set it.
16447 (linux_wait_for_process): Call the_low_target.arch_setup after the
16448 target has stopped for the first time.
16449 (initialize_low): Do not call the_low_target.arch_setup.
16451 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16452 (s390_set_pc): Likewise.
16453 (s390_arch_setup): New function.
16454 (the_low_target): Use s390_arch_setup as arch_setup routine.
16456 * regcache.c (realloc_register_cache): New function.
16457 (set_register_cache): Call it for each existing regcache.
16459 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16461 * server.h (init_registers): Remove prototype.
16463 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16464 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16465 instead of init_registers ().
16466 * linux-arm-low.c (init_registers_arm): Add prototype.
16467 (init_registers_arm_with_iwmmxt): Likewise.
16468 (the_low_target): Add initializer for arch_setup field.
16469 * linux-cris-low.c (init_registers_cris): Add prototype.
16470 (the_low_target): Add initializer for arch_setup field.
16471 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16472 (the_low_target): Add initializer for arch_setup field.
16473 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16474 (the_low_target): Add initializer for arch_setup field.
16475 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16476 (the_low_target): Add initializer for arch_setup field.
16477 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16478 (the_low_target): Add initializer for arch_setup field.
16479 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16480 (the_low_target): Add initializer for arch_setup field.
16481 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16482 (init_registers_mips64_linux): Likewise.
16483 (the_low_target): Add initializer for arch_setup field.
16484 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16485 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16486 (the_low_target): Add initializer for arch_setup field.
16487 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16488 (init_registers_powerpc_64): Likewise.
16489 (the_low_target): Add initializer for arch_setup field.
16490 * linux-s390-low.c (init_registers_s390): Add prototype.
16491 (init_registers_s390x): Likewise.
16492 (the_low_target): Add initializer for arch_setup field.
16493 * linux-sh-low.c (init_registers_sh): Add prototype.
16494 (the_low_target): Add initializer for arch_setup field.
16495 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16496 (the_low_target): Add initializer for arch_setup field.
16497 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16498 (the_low_target): Add initializer for arch_setup field.
16500 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16501 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16502 instead of init_registers ().
16503 * win32-arm-low.c (init_registers_arm): Add prototype.
16504 (the_low_target): Add initializer for arch_setup field.
16505 * win32-i386-low.c (init_registers_i386): Add prototype.
16506 (the_low_target): Add initializer for arch_setup field.
16508 * spu-low.c (init_registers_spu): Add prototype.
16509 (initialize_low): Call initialie_registers_spu () instead of
16510 initialize_registers ().
16512 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16514 * server.c (handle_v_requests): When handling the vRun and vAttach
16515 packets, if already debugging a process, don't kill it. Return an
16518 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16520 * server.c (handle_query): Correct length check.
16522 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16524 * win32-low.c (do_initial_child_stuff): Add process handle
16525 parameter. Set current_process_handle and current_process_id from the
16526 parameters. Clear globals.
16527 (win32_create_inferior): Don't set current_process_handle and
16528 current_process_id here. Instead pass them on the call to
16529 do_initial_child_stuff.
16530 (win32_attach): Likewise.
16531 (win32_clear_inferiors): New.
16532 (win32_kill): Don't close the current process handle or the
16533 current thread handle here. Instead call win32_clear_inferiors.
16534 (win32_detach): Don't open a new handle to the process. Call
16535 win32_clear_inferiors.
16536 (win32_join): Don't rely on current_process_handle; open a new
16537 handle using the process id.
16538 (win32_wait): Call win32_clear_inferiors when the inferior process
16541 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16543 * server.c (monitor_show_help): Add "exit".
16545 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16547 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16548 (clean): Add reg-xtensa.c.
16549 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16550 * configure.srv (xtensa*-*-linux*) New target.
16551 * linux-xtensa-low.c: New.
16552 * xtensa-xtregs.c: New.
16554 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16556 * hostio.c: Don't include errno.h.
16557 (errno_to_fileio_errno): Move to hostio-errno.
16558 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16559 error number outputting to the target->hostio_last_error callback.
16560 (hostio_packet_error): Use FILEIO_EINVAL directly.
16561 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16562 calls to hostio_error.
16563 * hostio-errno.c: New.
16564 * server.h (hostio_last_error_from_errno): Declare.
16565 * target.h (target_ops): Add hostio_last_error member.
16566 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16567 as hostio_last_error handler.
16568 * spu-low.c (spu_target_ops): Likewise.
16569 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16570 (wince_hostio_last_error): New functions.
16571 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16572 as hostio_last_error handler.
16573 (win32_target_ops) [!_WIN32_WCE]: Register
16574 hostio_last_error_from_errno as hostio_last_error handler.
16575 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16576 (hostio-errno.o): New rule.
16577 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16578 * configure.srv (srv_hostio_err_objs): New variable. Default to
16580 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16581 * configure: Regenerate.
16583 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16585 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16586 (linux_kill, linux_detach): Clean up the process list.
16587 * remote-utils.c (remote_open): Improve port number parsing.
16588 (putpkt_binary, input_interrupt): Only send interrupts if the target
16590 * server.c (extended_protocol): Make static.
16591 (attached): Define earlier.
16592 (exit_requested, response_needed, program_argv): New variables.
16593 (target_running): New.
16594 (start_inferior): Clear attached here.
16595 (attach_inferior): Set attached here.
16596 (require_running): Define.
16597 (handle_query): Use require_running and target_running. Implement
16599 (handle_v_attach, handle_v_run): New.
16600 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16601 (gdbserver_usage): Update.
16602 (main): Redo argument parsing. Handle --debug and --multi. Handle
16603 --attach along with other options or after the port. Save
16604 program_argv. Support no initial program. Resynchronize
16605 communication with GDB after an error. Handle "monitor exit".
16606 Use require_running and target_running. Always allow the extended
16607 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16608 restart in extended mode.
16609 * README: Refer to the GDB manual. Update --attach usage.
16611 2007-12-20 Andreas Schwab <schwab@suse.de>
16613 * linux-low.c (STACK_SIZE): Define.
16614 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16615 (linux_test_for_tracefork): Likewise.
16617 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16619 * linux-low.c (linux_wait_for_event): Update messages. Do not
16620 reinsert auto-delete breakpoints.
16621 * mem-break.c (struct breakpoint): Change return type of handler to
16623 (set_breakpoint_at): Update handler type.
16624 (reinsert_breakpoint_handler): Return 1 instead of calling
16626 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16628 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16629 * mem-break.h (set_breakpoint_at): Update handler type.
16630 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16631 * win32-low.c (auto_delete_breakpoint): New.
16632 (get_child_debug_event): Use it.
16634 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16636 * configure.ac: Check for pread and pwrite.
16637 * hostio.c (handle_pread): Fall back to lseek and read.
16638 (handle_pwrite): Fall back to lseek and write.
16639 * config.in, configure: Regenerated.
16641 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16643 * server.c (myresume): Add own_buf argument.
16644 (main): Update calls.
16646 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16648 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16649 * remote-utils.c (remote_open): Do not call disable_async_io.
16650 (block_async_io): Delete.
16651 (unblock_async_io): Make static.
16652 (initialize_async_io): New.
16653 * server.c (handle_v_cont): Handle async I/O here.
16654 (myresume): Likewise. Move other common resume tasks here...
16655 (main): ... from here. Call initialize_async_io. Disable async
16656 I/O before the main loop.
16657 * server.h (initialize_async_io): Declare.
16658 (block_async_io, unblock_async_io): Delete prototypes.
16659 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16661 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16663 * remote-utils.c (readchar): Allow binary data in received messages.
16665 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16667 * win32-low.c (attaching): New global.
16668 (win32_create_inferior): Clear the `attaching' global.
16669 (win32_attach): Set the `attaching' global.
16670 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16671 attaching. Only set a breakpoint at the entry point if not
16674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16676 * server.c (main): Don't report dll events on the initial
16677 connection on attaches.
16679 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16681 * server.c (main): Relax numerical bases supported for the pid of
16682 the --attach command line argument.
16684 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16686 * win32-low.c (win32_attach): Call OpenProcess before
16687 DebugActiveProcess, not after. Add last error output to error
16690 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16692 * win32-low.c (win32_get_thread_context)
16693 (win32_set_thread_context): New functions.
16694 (thread_rec): Use win32_get_thread_context.
16695 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16696 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16699 2007-12-03 Leo Zayas
16700 Pedro Alves <pedro_alves@portugalmail.pt>
16702 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16704 (child_add_thread): Minor cleanup.
16705 (child_continue): Resume artificially suspended threads before
16706 calling ContinueDebugEvent.
16707 (suspend_one_thread): New.
16708 (fake_breakpoint_event): New.
16709 (get_child_debug_event): Change return type to int. Check here if
16710 gdb sent an interrupt request. If a soft interrupt was requested,
16711 fake a breakpoint event. Return 0 if there is no event to handle,
16713 (win32_wait): Don't check here if gdb sent an interrupt request.
16714 Ensure there is a valid event to handle.
16715 (win32_request_interrupt): Add soft interruption method as last
16718 2007-12-03 Leo Zayas
16719 Pedro Alves <pedro_alves@portugalmail.pt>
16721 * win32-low.h (win32_thread_info): Add descriptions to the
16722 structure members. Replace `suspend_count' counter by a
16724 * win32-low.c (thread_rec): Update condition of when to get the
16725 context from the inferior. Rely on ContextFlags being set if it
16726 has already been retrieved. Only suspend the inferior thread if
16727 we haven't already. Warn if that fails.
16728 (continue_one_thread): s/suspend_count/suspended/. Only call
16729 ResumeThread once. Warn if that fails.
16731 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16733 * win32-low.c (win32_wait): Don't read from the inferior when it
16734 has already exited.
16736 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16738 * Makefile.in (win32_low_h): New variable.
16739 (win32-low.o): Add dependency on $(win32_low_h).
16740 (win32-arm-low.o, win32-i386-low.o): New rules.
16742 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16744 * hostio.c: Correct copyright year.
16746 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16748 * Makefile.in (OBS): Add hostio.o.
16749 (hostio.o): New rule.
16750 * server.h (handle_vFile): Declare.
16751 * hostio.c: New file.
16752 * server.c (handle_v_requests): Take packet_len and new_packet_len
16753 for binary packets. Call handle_vFile.
16754 (main): Update call to handle_v_requests.
16756 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16758 * linux-low.c: Include <sched.h>.
16760 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16762 * linux-low.c (linux_tracefork_grandchild): New.
16763 (linux_tracefork_child): Use clone.
16764 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16766 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16768 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16770 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16772 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16774 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16776 * inferiors.c (change_inferior_id): Delete.
16777 (add_pid_to_list, pull_pid_from_list): New.
16778 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16779 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16780 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16781 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16782 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16783 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16784 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16785 (using_threads): Always set to 1.
16786 (handle_extended_wait): New.
16787 (add_process): Do not set TID.
16788 (linux_create_inferior): Set must_set_ptrace_flags.
16789 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16790 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16791 (linux_thread_alive): Rename TID argument to LWPID.
16792 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16793 (linux_wait_for_event): Do not use TID or check using_threads. Update
16794 call to dead_thread_notify. Call handle_extended_wait.
16795 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16796 (send_sigstop): Delete sigstop_sent.
16797 (wait_for_sigstop): Avoid TID.
16798 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16799 (linux_test_for_tracefork): New.
16800 (linux_lookup_signals): Use thread_db_active and
16801 linux_supports_tracefork_flag.
16802 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16803 * linux-low.h (get_process_thread): Avoid TID.
16804 (struct process_ifo): Move thread_known and tid to the end. Remove
16806 (linux_attach_lwp, thread_db_init): Update prototypes.
16807 * server.h (change_inferior_id): Delete prototype.
16808 (add_pid_to_list, pull_pid_from_list): New prototypes.
16809 * thread-db.c (thread_db_use_events): New.
16810 (find_first_thread): Rename to...
16811 (find_one_thread): ...this. Update callers and messages. Do not
16812 call fatal. Check thread_db_use_events. Do not call
16813 change_inferior_id or new_thread_notify.
16814 (maybe_attach_thread): Update. Do not call new_thread_notify.
16815 (thread_db_init): Set thread_db_use_events. Check use_events.
16816 * utils.c (fatal, warning): Correct message prefix.
16818 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16820 * Makefile.in (clean): Remove new files.
16821 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16822 (powerpc-64.o, powerpc-64.c): New rules.
16823 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16824 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16826 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16828 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16829 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16830 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16831 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16832 (target_regsets): Add AltiVec and SPE register sets.
16833 * configure.ac: Check for AltiVec and SPE.
16834 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16835 (ppc_fill_vrregset, ppc_store_vrregset): New.
16836 (target_regsets): Add AltiVec register set.
16837 * configure: Regenerated.
16839 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16841 * linux-low.c (O_LARGEFILE): Define.
16842 (linux_read_memory): Use /proc/PID/mem.
16843 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16844 * configure, config.in: Regenerated.
16846 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16848 * linux-low.c (linux_wait_for_event): Do not pass signals while
16851 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16853 * win32-low.c (create_process): New.
16854 (win32_create_inferior): Use create_process instead of
16855 CreateProcess. If create_process failed retry appending an ".exe"
16856 suffix. Store the GetLastError result immediatelly after
16857 create_process calls and use it on the call to error.
16859 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16861 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16863 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16865 * configure.ac: Switch license to GPLv3.
16867 2007-08-01 Michael Snyder <msnyder@access-company.com>
16869 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16871 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16873 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16875 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16876 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16877 CloseToolhelp32Snapshot.
16878 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16879 CloseToolhelp32Snapshot.
16881 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16883 * server.c (main): Check for inferior exit before main loop.
16885 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16887 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16888 instead of on tmp_desc.
16890 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16891 Daniel Jacobowitz <dan@codesourcery.com>
16893 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16894 (add_thread): Minor cleanups.
16895 (clear_inferiors): Move lower in the file. Clear the DLL
16897 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16898 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16899 (xml_escape_text): New.
16900 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16902 (handle_v_cont): Report errors.
16903 (gdbserver_version): Update.
16904 (main): Correct size of own_buf. Do not report initial DLL events.
16905 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16906 (unloaded_dll, xml_escape_text): New.
16907 * win32-low.c (enum target_waitkind): Update comments.
16908 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16909 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16910 (win32_EnumProcessModules, win32_GetModuleInformation)
16911 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16912 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16913 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16914 (win32_Module32First, win32_Module32Next, load_toolhelp)
16915 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16916 (get_child_debug_event): Handle DLL events.
16917 (win32_wait): Likewise.
16919 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16921 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16922 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16924 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16926 * win32-low.c (handle_output_debug_string): Ignore event if not
16929 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16931 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16933 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16935 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16937 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16939 * inferiors.c (change_inferior_id): Add comment.
16940 * linux-low.c (check_removed_breakpoint): Add an early
16941 prototype. Improve debug output.
16942 (linux_attach): Doc update.
16943 (linux_detach_one_process, linux_detach): Clean up before releasing
16945 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16946 * linux-low.h (struct process_info): Doc improvement.
16947 * mem-break.c (delete_all_breakpoints): New.
16948 * mem-break.h (delete_all_breakpoints): New prototype.
16949 * thread-db.c (find_first_thread): New.
16950 (thread_db_create_event): Call it instead of
16951 thread_db_find_new_threads. Clean up unused variables.
16952 (maybe_attach_thread): Remove first thread handling.
16953 (thread_db_find_new_threads): Use find_first_thread.
16954 (thread_db_get_tls_address): Likewise.
16956 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16958 * thread-db.c (thread_db_find_new_threads): Add prototype.
16959 (thread_db_create_event): Check for the main thread before adding
16961 (maybe_attach_thread): Only enable event reporting if TID == 0.
16962 (thread_db_get_tls_address): Check for new threads.
16964 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16966 * linux-low.c (linux_create_inferior): Try execv before execvp.
16967 * spu-low.c (spu_create_inferior): Likewise.
16969 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16971 * linux-low.c (linux_create_inferior): Change execv to execvp.
16972 * spu-low.c (spu_create_inferior): Likewies.
16974 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16976 * Makefile.in (clean): Clean new files instead of deleted ones.
16977 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16978 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16980 * configure.srv: Specify XML files and new regformats for MIPS and
16982 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16983 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16984 an entry for the restart register.
16985 (mips_cannot_fetch_register, mips_cannot_store_register)
16986 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16987 register names to match the XML descriptions.
16988 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16989 restart register instead of $0.
16991 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16992 Markus Deuling <deuling@de.ibm.com>
16994 * remote-utils.c (decode_xfer_write): New function.
16995 * server.h (decode_xfer_write): Add prototype.
16996 * server.c (handle_query): Add PACKET_LEN argument. Support
16997 qXfer:spu:read and qXfer:spu:write packets.
16998 (main): Pass packet_len to handle_query.
16999 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17000 * target.h (target_ops): Add qxfer_spu.
17002 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17004 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17005 accessing non-seekable spufs files.
17007 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17009 * server.c (handle_query): Add reply for qC packet.
17011 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17012 Leo Zayas <lerele@champenstudios@com>
17014 * server.h (check_remote_input_interrupt_request): New function.
17015 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17016 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17017 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17018 (check_remote_input_interrupt_request): New function.
17019 * server.h (check_remote_input_interrupt_request): Declare.
17020 * win32-low.c (winapi_DebugBreakProcess,
17021 winapi_GenerateConsoleCtrlEvent): New typedefs.
17022 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17024 (win32_wait): Check for remote interrupt request
17025 with check_remote_input_interrupt_request.
17026 (win32_request_interrupt): New function.
17027 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17029 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17031 * win32-low.c (debug_registers_changed,
17032 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17033 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17034 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17035 (thread_rec): Get context using the low target.
17036 (child_add_thread): Call thread_added on the low target,
17037 which does the same thing.
17039 (do_initial_child_stuff): Remove debug registers references.
17040 Set context using the low target. Resume threads after
17041 setting the contexts.
17042 (child_continue): Remove dead variable. Remove debug
17043 registers references.
17044 (child_fetch_inferior_registers): Go through the low target.
17045 (do_child_store_inferior_registers): Remove.
17046 (child_store_inferior_registers): Go through the low target.
17047 (win32_resume): Remove debug registers references.
17048 Set context using the low target.
17049 (handle_exception): Change return type to void. Don't record
17050 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17051 first chance exception.
17052 (get_child_debug_event): Change return type to void. Remove
17053 goto loop. Always return after waiting for debug event.
17054 (win32_wait): Convert to switch statement. Handle spurious
17057 * win32-i386-low.c (debug_registers_changed,
17058 debug_registers_used): New.
17059 (initial_stuff): Rename to ...
17060 (i386_initial_stuff): ... this. Clear debug registers
17062 (store_debug_registers): Delete.
17063 (i386_get_thread_context): New.
17064 (load_debug_registers): Delete.
17065 (i386_set_thread_context): New.
17066 (i386_thread_added): New.
17067 (single_step): Rename to ...
17068 (i386_single_step): ... this.
17069 (do_fetch_inferior_registers): Rename to ...
17070 (i386_fetch_inferior_register): ... this.
17071 (i386_store_inferior_register): New.
17072 (the_low_target): Adapt to new interface.
17074 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17075 (arm_get_thread_context): New.
17076 (arm_set_thread_context): New.
17078 (do_fetch_inferior_registers): Rename to ...
17079 (arm_fetch_inferior_register): ... this.
17080 (arm_store_inferior_register): New.
17081 (arm_wince_breakpoint): Reimplement as unsigned long.
17082 (arm_wince_breakpoint_len): Define.
17083 (the_low_target): Adapt to new interface.
17085 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17086 load_debug_registers. Add get_thread_context, set_thread_context,
17087 thread_added and store_inferior_register. Rename
17088 fetch_inferior_registers to fetch_inferior_register.
17089 (regptr): Remove declaration.
17091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17093 * linux-low.c (linux_detach): Change return type to int. Return 0.
17094 * spu-low.c (spu_detach): Likewise.
17096 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17098 * target.h (target_ops): Change return type of detach to int.
17100 (join_inferior): New.
17101 * server.c (main): Don't skip detach support on mingw32.
17102 If the inferior doesn't support detaching return error.
17103 Call join_inferior instead of using waitpid.
17104 * linux-low.c (linux_join): New.
17105 (linux_target_op): Add linux_join.
17106 * spu-low.c (spu_join): New.
17107 (spu_target_ops): Add spu_join.
17108 * win32-low.c (win32_detach): Adapt to new interface.
17109 Reopen current_process_handle before detaching. Issue a child
17110 resume before detaching.
17112 (win32_target_op): Add win32_join.
17114 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17116 * win32-low.c (win32-attach): Fix return value.
17117 * target.h (target_ops): Describe ATTACH return values.
17119 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17121 * win32-low.c (GETPROCADDRESS): Define.
17122 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17123 (winapi_DebugSetProcessKillOnExit): Likewise.
17124 (win32_create_inferior): Force usage of ansi CreateProcessA.
17125 (win32_attach): Use GETPROCADDRESS.
17126 (win32_detach): Likewise.
17128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17130 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17132 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17134 * win32-low.c: Commit leftover changes from 2007-03-29.
17136 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17138 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17139 fields short instead of int. Add explicit padding.
17140 (i387_cache_to_fsave): Remove unnecessary casts.
17141 (i387_fsave_to_cache): Doc fix.
17142 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17144 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17146 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17147 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17149 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17151 * configure.srv (arm*-*-mingw32ce*): Move near the other
17154 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17156 * configure.ac: Add errno checking.
17157 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17158 sys/file.h and malloc.h.
17159 (AC_CHECK_DECLS): Add perror.
17160 (srv_mingwce): Handle.
17161 * configure.srv (i[34567]86-*-cygwin*): Add
17162 win32-i386-low.o to srv_tgtobj.
17163 (i[34567]86-*-mingw*): Likewise.
17164 (arm*-*-mingw32ce*): Add case.
17165 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17166 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17167 [__MINGW32CE__] (strerror): New function.
17168 [__MINGW32CE__] (errno): Define to GetLastError.
17169 [__MINGW32CE__] (COUNTOF): New macro.
17170 (remote_open): Remove extra close call.
17171 * mem-break.c (delete_breakpoint_at): New function.
17172 * mem-break.h (delete_breakpoint_at): Declare.
17173 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17174 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17175 [USE_WIN32API] (read, write): Add char* casts.
17176 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17177 * server.h: Include wincecompat.h on Windows CE.
17178 [HAVE_ERRNO_H]: Check.
17179 (perror): Declare if not declared.
17180 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17181 (perror_with_name): Remove errno declaration.
17182 * wincecompat.h: New.
17183 * wincecompat.c: New.
17184 * win32-low.h: New.
17185 * win32-arm-low.c: New.
17186 * win32-i386-low.c: New.
17187 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17188 (OUTMSG2): Make it safe.
17190 (COUNTOF): New macro.
17191 (NUM_REGS): Get it from the low target.
17192 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17193 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17194 (thread_rec): Let low target handle debug registers.
17195 (child_add_thread): Likewise.
17196 (child_init_thread_list): Likewise.
17197 (continue_one_thread): Likewise.
17199 (do_child_fetch_inferior_registers): Move to ...
17200 * win32-i386-low.c: ... here, and rename to ...
17201 (do_fetch_inferior_registers): ... this.
17202 * win32-low.c (child_fetch_inferior_registers):
17203 Go through the low target.
17204 (do_child_store_inferior_registers): Use regptr.
17205 (strwinerror): New function.
17206 (win32_create_inferior): Handle Windows CE.
17207 Use strwinerror instead of strerror on Windows error
17208 codes. Add program to the error output.
17209 Don't close the main thread handle on Windows CE.
17210 (win32_attach): Use coredll.dll on Windows CE.
17211 (win32_kill): Close current process and current
17213 (win32_detach): Use coredll.dll on Windows CE.
17214 (win32_resume): Let low target handle debug registers, and
17216 (handle_exception): Add/Remove initial breakpoint. Avoid
17217 non-existant WSTOPSIG on Windows CE.
17218 (win32_read_inferior_memory): Cast to remove warning.
17219 (win32_arch_string): Go through the low target.
17220 (initialize_low): Call set_breakpoint_data with the low
17221 target's breakpoint.
17222 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17223 FOP_REGNUM, mappings): Move to ...
17224 * win32-i386-low.c: ... here.
17225 * win32-low.c (win32_thread_info): Move to ...
17226 * win32-low.h: ... here.
17227 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17228 win32-arm-low.c and wincecompat.c.
17229 (all:): Add $EXEEXT.
17230 (install-only:): Likewise.
17231 (gdbserver:): Likewise.
17232 (gdbreplay:): Likewise.
17233 * config.in: Regenerate.
17234 * configure: Regenerate.
17236 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17238 * win32-low.c: Rename typedef thread_info to
17239 win32_thread_info throughout.
17241 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17243 * win32-i386-low.c: Rename to ...
17244 * win32-low.c: ... this.
17245 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17246 * Makefile.in: Likewise.
17248 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17250 * remote-utils.c (monitor_output): Constify msg parameter.
17251 * server.h (monitor_output): Likewise.
17252 * win32-i386-low.c (handle_output_debug_string): New.
17253 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17254 handle_output_debug_string.
17255 (get_child_debug_event): Likewise.
17257 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17259 * server.c (main): Correct strtoul check.
17261 2007-03-27 Jon Ringle <jon@ringle.org>
17263 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17265 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17267 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17269 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17271 * terminal.h: Check HAVE_SGTTY_H.
17273 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17275 * remote-utils.c (remote_open): Print out the assigned port number.
17277 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17279 * remote-utils.c (monitor_output): New function.
17280 * server.c (debug_threads): Define here.
17281 (monitor_show_help): New function.
17282 (handle_query): Handle qRcmd.
17283 (main): Do not handle 'd' packet.
17284 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17285 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17288 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17290 * Makefile.in (EXEEXT): New.
17291 (clean): Use $(EXEEXT).
17293 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17295 * target.h (target_ops): Rename send_signal to request_interrupt,
17296 and remove enum target_signal parameter.
17297 * linux-low.c (linux_request_interrupt): Rename from
17298 linux_send_signal, and always send SIGINT.
17299 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17300 and always send SIGINT.
17301 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17303 (input_interrupt): Likewise.
17305 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17307 * server.c (get_features_xml): Check if target implemented
17309 * win32-i386-low.c (win32_arch_string): New.
17310 (win32_target_ops): Add win32_arch_string as arch_string member.
17312 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17314 * spu-low.c (spu_arch_string): New.
17315 (spu_target_ops): Add spu_arch_string.
17317 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17319 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17320 * configure.ac: Do not check for terminal.h.
17321 * configure, config.in: Regenerated.
17323 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17325 * Makefile.in (OBS): Add $(XML_BUILTIN).
17326 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17328 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17329 (arm-with-iwmmxt.c): New.
17330 * config.in, configure: Regenerate.
17331 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17332 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17333 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17334 (arm*-*-linux*): Add iWMMXt and regset support.
17335 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17336 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17337 (arm_store_wmmxregset, target_regsets): New.
17338 * server.c (get_features_xml): Take annex argument. Check builtin
17340 (handle_query): Handle multiple annexes.
17342 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17344 * remote-utils.c [USE_WIN32API] (read, write): Define.
17345 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17348 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17350 * linux-i386-low.c (the_low_target): Set arch_string.
17351 * linux-x86-64-low.c (the_low_target): Likewise.
17352 * linux-low.c (linux_arch_string): New.
17353 (linux_target_ops): Add it.
17354 * linux-low.h (struct linux_target_ops): Add arch_string.
17355 * server.c (write_qxfer_response): Use const void * for DATA.
17356 (get_features_xml): New.
17357 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17358 * target.h (struct target_ops): Add arch_string method.
17360 2007-01-03 Denis Pilat <denis.pilat@st.com>
17361 Daniel Jacobowitz <dan@codesourcery.com>
17363 * linux-low.c (linux_kill): Handle being called with no threads.
17364 * win32-i386-low.c (win32_kill): Likewise.
17365 (get_child_debug_event): Clear current_process_handle.
17367 2006-12-30 Denis PILAT <denis.pilat@st.com>
17368 Daniel Jacobowitz <dan@codesourcery.com>
17370 * remote-utils.c (remote_open): Check the type of specified
17371 serial port devices before opening them.
17372 * server.c (main): Kill the inferior if an error occurs during
17373 the first remote_open.
17375 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17377 * README: Update supported targets.
17379 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17381 * Makefile.in (clean): Remove reg-mips64.c.
17382 (reg-mips64.c, reg-mips64.o): New rules.
17383 * configure.srv: Handle mips64. Include regset support for mips.
17384 * linux-mips-low.c (union mips_register): New.
17385 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17386 (mips_breakpoint, mips_breakpoint_at): Use int.
17387 (mips_collect_register, mips_supply_register)
17388 (mips_collect_register_32bit, mips_supply_register_32bit)
17389 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17390 (mips_store_fpregset, target_regsets): New.
17391 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17393 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17395 * configure.srv: Add target "spu*-*-*".
17396 * Makefile.in (clean): Remove reg-spu.c.
17397 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17398 * spu-low.c: New file.
17400 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17402 * configure.ac: Correct td_thr_tls_get_addr test.
17403 * configure: Regenerated.
17405 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17407 * linux-low.c (linux_wait_for_event): Reformat. Use the
17408 pass_signals array.
17409 * remote-utils.c (decode_address_to_semicolon): New.
17410 * server.c (pass_signals, handle_general_set): New.
17411 (handle_query): Mention QPassSignals for qSupported.
17412 (main): Call handle_general_set.
17413 * server.h (pass_signals, decode_address_to_semicolon): New.
17415 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17417 * server.c (handle_query): Correct error handling for read_auxv.
17419 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17421 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17422 and srv_linux_thread_db to yes.
17423 * linux-s390-low.c (s390_fill_gregset): New function.
17424 (target_regsets): Define data structure.
17426 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17428 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17429 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17430 * config.in, configure: Regenerated.
17431 * inferiors.c (gdb_id_to_thread): New function.
17432 (gdb_id_to_thread_id): Use it.
17433 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17434 * linux-low.h (struct process_info): Add th member.
17435 (thread_db_get_tls_address): New prototype.
17436 * remote-utils.c (decode_address): Make non-static.
17437 * server.c (handle_query): Handle qGetTLSAddr.
17438 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17439 * target.h (struct target_ops): Add get_tls_address.
17440 * thread-db.c (maybe_attach_thread): Save the thread handle.
17441 (thread_db_get_tls_address): New.
17443 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17445 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17446 (linux_resume_one_process): Take a siginfo_t *. Update all
17447 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17448 (struct pending_signals): Add a siginfo_t.
17449 (linux_wait_for_process): Always set last_status.
17450 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17451 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17452 * linux-low.h (struct process_info): Add last_status.
17454 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17456 * remote-utils.c (try_rle): New function.
17457 (putpkt_binary): Use it.
17459 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17461 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17462 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17463 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17464 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17465 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17468 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17470 * server.c (terminal_fd): New variable.
17471 (old_foreground_pgrp): Likewise.
17472 (restore_old_foreground_pgrp): New function.
17473 (start_inferior): Record the terminal file descriptor in terminal_fd
17474 and its original foreground group in old_foreground_pgrp. Register
17475 restore_old_foreground_pgrp with atexit().
17477 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17479 * server.c (handle_query): Correct qPart to qXfer.
17481 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17483 * configure.ac: Check for more headers which are missing on
17484 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17485 * configure.srv: Add Cygwin and mingw32.
17486 * remote-utils.c: Don't include headers unconditionally which
17487 are missing on mingw32. Include <winsock.h> for mingw32.
17488 (remote_open): Adjust for mingw32 support. Flush
17489 standard error after writing to it.
17490 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17491 (unblock_async_io, enable_async_io, disable_async_io)
17492 (readchar, getpkt): Update for Winsock support.
17493 (prepare_resume_reply): Expect a protocol signal number.
17494 * server.c: Disable <sys/wait.h> on mingw32.
17495 (start_inferior): Adjust for mingw32 support. Flush
17496 standard error after writing to it.
17497 (attach_inferior): Likewise. Use protocol signal
17499 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17501 * win32-i386-low.c: New file.
17502 * Makefile.in (XM_CLIBS): Set.
17503 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17504 (win32-i386-low.o): New dependency rule.
17505 * linux-low.c (linux_wait): Use target signal numbers.
17506 * target.h (struct target_ops): Doc fix.
17507 * server.h (target_signal_to_name): New prototype.
17508 * gdbreplay.c: Don't include headers unconditionally which
17509 are missing on mingw32. Include <winsock.h> for mingw32.
17510 (remote_close, remote_open): Adjust for Winsock support.
17511 * configure, config.in: Regenerated.
17513 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17515 * server.c (decode_xfer_read, write_qxfer_response): New.
17516 (handle_query): Take a packet length argument. Handle
17517 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17518 the qSupported response.
17519 (main): Update call to handle_query.
17521 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17523 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17524 (putpkt_binary): Renamed from putpkt and adjusted for binary
17526 (putpkt): New wrapper for putpkt_binary.
17527 (readchar): Don't mask off the high bit.
17528 (decode_X_packet): New function.
17529 * server.c (main): Call putpkt_binary if a handler sets the packet
17530 length. Save the length of the incoming packet. Handle 'X'.
17531 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17533 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17535 * server.c (handle_query): Handle qSupported.
17537 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17539 * remote-utils.c (all_symbols_looked_up): New variable.
17540 (look_up_one_symbol): Check it.
17541 * server.h (look_up_one_symbol): New declaration.
17542 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17544 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17546 * Makefile.in (linux-arm-low.o): Update dependencies.
17547 * linux-arm-low.c: Include "gdb_proc_service.h".
17548 (PTRACE_GET_THREAD_AREA): Define.
17549 (ps_get_thread_area): New function.
17551 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17553 * configure.srv (m68k*-*-uclinux*): New target.
17554 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17555 (linux_resume_one_process): Remove extraneous cast.
17556 (linux_read_offsets): New.
17557 (linux_target_op): Add linux_read_offsets on mmuless systems.
17558 * server.c (handle_query): Add qOffsets logic.
17559 * target.h (struct target_ops): Add read_offsets.
17561 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17563 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17564 (PTRACE_GET_THREAD_AREA): Define.
17565 (ps_get_thread_area): New function.
17566 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17567 (linux-x86-64-low.o): Update.
17569 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17571 * configure.ac: Remove checks for prfpregset_t.
17572 * gdb_proc_service.h: New file.
17573 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17574 new "gdb_proc_service.h".
17575 * proc-service.c: Likewise.
17576 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17577 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17578 * Makefile.in (gdb_proc_service_h): Updated.
17579 * configure, config.in: Regenerated.
17581 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17583 * remote-utils.c (prepare_resume_reply): Move declaration
17584 of gdb_id_from_wait to the top of the block.
17586 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17588 * linux-low.c (regsets_store_inferior_registers): Read the regset
17589 from the target before filling it.
17591 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17593 * server.c (attach_inferior): Return SIGTRAP for a successful
17596 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17598 * Makefile.in (OBS): Add version.o.
17599 (STAGESTUFF): Delete.
17600 (version.o): Add dependencies.
17601 (version.c): Replace rule.
17602 (clean): Remove version.c.
17603 * server.c (gdbserver_version): New.
17604 (gdbserver_usage): Use printf.
17605 (main): Handle --version and --help.
17606 * server.h (version, host_name): Add declarations.
17608 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17620 * linux-x86-64-low.c:
17622 * linux-s390-low.c:
17623 * linux-ppc64-low.c:
17625 * linux-mips-low.c:
17626 * linux-m68k-low.c:
17627 * linux-m32r-low.c:
17630 * linux-ia64-low.c:
17631 * linux-i386-low.c:
17632 * linux-crisv32-low.c:
17644 * gdbserver.1: Add (C) after Copyright. Update the FSF
17647 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17649 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17650 (arm_breakpoint_at): Recognize both breakpoints.
17651 (the_low_target): Use the correct breakpoint instruction.
17653 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17655 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17656 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17657 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17658 (the_low_target): Update.
17660 2005-10-25 Andreas Schwab <schwab@suse.de>
17662 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17664 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17665 (ia64_num_regs): Reduce to 462.
17667 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17669 * acinclude.m4: Correct quoting.
17670 * aclocal.m4: Regenerated.
17672 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17673 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17674 (thread_db_init): Call thread_db_err_str.
17675 * configure.ac: Check for TD_VERSION.
17676 * config.in, configure: Regenerated.
17678 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17680 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17682 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17684 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17685 is not available. Define HAVE_PTRACE_GETREGS if it is.
17686 * config.in, configure: Regenerated.
17687 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17688 * linux-i386-low.c, linux-m68k-low.c: Update to use
17689 HAVE_PTRACE_GETREGS.
17690 * linux-low.c (regsets_fetch_inferior_registers)
17691 (regsets_store_inferior_registers): Only return 0 if we processed
17693 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17694 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17696 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17698 * inferiors.c (struct thread_info): Add gdb_id.
17699 (add_thread): Add gdb_id argument.
17700 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17701 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17702 calls to add_thread.
17703 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17704 * server.c (handle_query): Use thread_to_gdb_id.
17705 (handle_v_cont, main): Use gdb_id_to_thread_id.
17706 * server.h (add_thread): Update prototype.
17707 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17710 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17712 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17713 left-padded registers.
17714 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17715 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17717 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17719 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17720 * configure: Regenerate.
17721 * config.in: Regenerate.
17722 * server.h (NEED_DECLARATION_STRERROR):
17723 Replace with !HAVE_DECL_STRERROR.
17725 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17727 * linux-low.c (linux_wait, linux_send_signal): Don't test
17728 an unsigned long variable for > 0 if it could be MAX_ULONG.
17729 * server.c (myresume): Likewise.
17730 * target.c (set_desired_inferior): Likewise.
17732 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17734 * configure.ac: Simplify and improve check for socklen_t.
17735 * configure, config.in: Regenerate.
17737 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17739 * acconfig.h: Remove.
17740 * configure.ac: Add a test for socklen_t. Use three-argument
17741 AC_DEFINE throughout.
17742 * config.in: Regenerated using autoheader 2.59.
17743 * configure: Regenerated.
17745 * gdbreplay.c (socklen_t): Provide a default.
17746 (remote_open): Use socklen_t.
17747 * remote-utils.c (socklen_t): Provide a default.
17748 (remote_open): Use socklen_t.
17749 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17752 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17754 * linux-low.c (linux_read_memory, linux_write_memory)
17755 (linux_read_auxv): Likewise.
17756 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17757 (check_mem_write): Likewise.
17758 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17760 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17761 (registers_from_string, register_data): Likewise.
17762 * server.c (handle_query, main): Likewise.
17763 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17764 (decode_M_packet): Likewise.
17765 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17766 * target.h (struct target_ops): Update read_memory, write_memory,
17768 (read_inferior_memory, write_inferior_memory): Update.
17769 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17770 to unsigned char *.
17771 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17772 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17773 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17774 linux-s390-low.c, linux-sh-low.c: Update for changes in
17775 read_inferior_memory and the_low_target->breakpoint.
17777 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17779 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17780 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17781 * configure.srv: Add powerpc64-*-linux*.
17782 * linux-ppc64-low.c: New file.
17784 2005-05-23 Orjan Friberg <orjanf@axis.com>
17786 * linux-cris-low.c: New file with support for CRIS.
17787 * linux-crisv32-low.c: Ditto for CRISv32.
17788 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17789 (clean): Add reg-cris.c and reg-crisv32.c.
17790 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17791 reg-crisv32.o, and reg-crisv32.c to make rules.
17792 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17793 recognized targets.
17795 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17797 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17798 of sizeof (PTRACE_XFER_TYPE).
17799 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17801 2005-05-12 Orjan Friberg <orjanf@axis.com>
17803 * target.h (struct target_ops): Add insert_watchpoint,
17804 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17805 pointers for hardware watchpoint support.
17806 * linux-low.h (struct linux_target_ops): Ditto.
17807 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17808 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17809 to linux_target_ops.
17810 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17812 * server.c (main): Recognize 'Z' and 'z' packets.
17814 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17816 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17817 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17818 (the_low_target): Add new members.
17820 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17822 * proc-service.c (ps_lgetregs): Search all_processes instead of
17825 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17827 * server.c (start_inferior): Change return type to int.
17828 (attach_inferior): Change sigptr to int *.
17829 (handle_v_cont, handle_v_requests): Change signal to int *.
17830 (main): Change signal to int.
17832 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17834 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17835 * configure.srv: Add m32r*-*-linux*.
17836 * linux-m32r-low.c: New file.
17838 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17840 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17842 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17844 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17845 Take unsigned long arguments for PIDs.
17846 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17847 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17848 (wait_for_sigstop, linux_resume_one_process)
17849 (regsets_fetch_inferior_registers, linux_send_signal)
17850 (linux_read_auxv): Likewise. Update the types of variables holding
17851 PIDs. Update format string specifiers.
17852 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17853 * remote-utils.c (prepare_resume_reply): Likewise.
17854 * server.c (cont_thread, general_thread, step_thread)
17855 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17857 (handle_query): Update format specifiers.
17858 (handle_v_cont, main): Use strtoul for thread IDs.
17859 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17860 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17861 (general_thread, step_thread, thread_from_wait)
17862 (old_thread_from_wait): Update.
17863 * target.h (struct thread_resume): Use unsigned long for THREAD.
17864 (struct target_ops): Use unsigned long for arguments to attach and
17867 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17869 * acinclude.m4: Include bfd/bfd.m4 directly.
17870 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17871 <agriffis@toolchain.org>.
17872 * aclocal.m4, configure: Regenerated.
17874 2005-01-07 Andrew Cagney <cagney@gnu.org>
17876 * configure.ac: Rename configure.in, require autoconf 2.59.
17877 * configure: Re-generate.
17879 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17881 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17882 LIBS when finished.
17883 * aclocal.m4: Regenerated.
17884 * configure: Regenerated.
17886 2004-11-21 Andreas Schwab <schwab@suse.de>
17888 * linux-m68k-low.c (m68k_num_gregs): Define.
17889 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17890 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17891 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17892 (m68k_breakpoint_at): New. Add to the_low_target.
17894 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17895 srv_linux_thread_db to yes.
17897 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17899 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17900 (ARCH_SET_FS): Likewise.
17901 (ARCH_GET_FS): Likewise.
17902 (ARCH_GET_GS): Likewise.
17904 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17906 * linux-i386-low.c (ps_get_thread_area): New.
17907 * linux-x86-64-low.c (ps_get_thread_area): New.
17908 * linux-low.c: Include <sys/syscall.h>.
17909 (linux_kill_one_process): Don't kill the first thread here.
17910 (linux_kill): Kill the first thread here.
17911 (kill_lwp): New function.
17912 (send_sigstop, linux_send_signal): Use it.
17913 * proc-service.c: Clean up #ifdefs.
17914 (fpregset_info): Delete.
17915 (ps_lgetregs): Update and enable implementation.
17916 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17918 * remote-utils.c (struct sym_cache, symbol_cache): New.
17919 (input_interrupt): Print a clearer message.
17920 (async_io_enabled): New variable.
17921 (enable_async_io, disable_async_io): Use it. Update comments.
17922 (look_up_one_symbol): Use the symbol cache.
17923 * thread-db.c (thread_db_look_up_symbols): New function.
17924 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17926 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17928 * configure.in: Test for -rdynamic.
17929 * configure: Regenerated.
17930 * Makefile (INTERNAL_LDFLAGS): New.
17931 (gdbserver, gdbreplay): Use it.
17933 2004-09-02 Andrew Cagney <cagney@gnu.org>
17935 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17937 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17939 * linux-low.c (linux_wait): Clear all_processes list also.
17941 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17943 * linux-low.c: Include <errno.h>. Remove extern declaration of
17946 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17948 * gdbreplay.c, server.h, utils.c: Update copyright years.
17950 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17952 * server.c (main): Print child status or termination signal from
17953 variable 'signal', not 'sig'.
17955 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17957 * linux-low.c (linux_read_memory): Change return type to
17958 int. Check for and return error from ptrace().
17959 * target.c (read_inferior_memory): Change return type to int. Pass
17960 back return status from the_target->read_memory().
17961 * target.h (struct target_ops): Adapt *read_memory() prototype.
17963 (read_inferior_memory): Adapt prototype.
17964 * server.c (main): Return an error packet if
17965 read_inferior_memory() returns an error.
17967 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17969 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17970 Unify with other clean targets.
17972 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17974 * server.c (handle_v_cont): Call set_desired_inferior.
17976 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17978 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17980 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17982 * linux-low.c (linux_wait): Unblock async I/O.
17983 (linux_resume): Block and enable async I/O.
17984 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17985 * server.h (block_async_io, unblock_async_io): Add prototypes.
17987 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17989 * remote-utils.c (remote_open): Print a status notice after
17990 opening a TCP port.
17991 * server.c (attach_inferior): Print a status notice after
17994 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17996 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17998 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18000 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18002 * server.c, target.h: Update copyright years.
18004 2004-02-25 Roland McGrath <roland@redhat.com>
18006 * target.h (struct target_ops): New member `read_auxv'.
18007 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18008 * linux-low.c (linux_read_auxv): New function.
18009 (linux_target_ops): Initialize `read_auxv' member to that.
18011 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18013 Committed by Jim Blandy <jimb@redhat.com>.
18015 * linux-s390-low.c (s390_num_regs): Update.
18016 (s390_regmap): Remove control registers. Use __s390x__ predefine
18017 instead of GPR_SIZE to distiguish s390 and s390x targets.
18019 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18021 * linux-low.c: Update copyright year.
18022 (check_removed_breakpoint): Clear pending_is_breakpoint.
18023 (linux_set_resume_request, linux_queue_one_thread)
18024 (resume_status_pending_p): New functions.
18025 (linux_continue_one_thread): Use process->resume.
18026 (linux_resume): Only resume threads if there are no pending events.
18027 * linux-low.h (struct process_info): Add resume request
18030 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18032 * regcache.c (new_register_cache): Clear the allocated register
18033 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18035 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18037 * linux-low.c (linux_resume): Take a struct thread_resume *
18039 (linux_wait): Update call.
18040 (resume_ptr): New static variable.
18041 (linux_continue_one_thread): Renamed from
18042 linux_continue_one_process. Use resume_ptr.
18043 (linux_resume): Use linux_continue_one_thread.
18044 * server.c (handle_v_cont, handle_v_requests): New functions.
18045 (myresume): New function.
18046 (main): Handle 'v' case.
18047 * target.h (struct thread_resume): New type.
18048 (struct target_ops): Change argument of "resume" to struct
18050 (myresume): Delete macro.
18052 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18054 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18055 (uninstall): Support DESTDIR.
18057 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18059 * configure.srv: Add xscale*linux copy of arm*linux entry.
18061 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18063 * linux-arm-low.c (arm_reinsert_addr): New function.
18064 (the_low_target): Add arm_reinsert_addr.
18066 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18068 * mem-break.c: Remove whitespace at end of file.
18070 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18072 * configure.in: Check whether we need to prototype strerror.
18073 * server.h: Optionally prototype strerror.
18074 * gdbreplay.c (perror_with_name): Use strerror.
18075 * linux-low.c (linux_attach_lwp): Use strerror.
18076 * utils.c (perror_with_name): Use strerror.
18077 * config.in, configure: Regenerated.
18079 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18081 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18082 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18084 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18086 * Makefile.in (SFILES): Update.
18087 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18088 low-sun3.c: Remove files.
18090 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18092 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18093 (linux_detach_one_process, linux_detach): New functions.
18094 (linux_target_ops): Add linux_detach.
18095 * server.c (main): Handle 'D' packet.
18096 * target.h (struct target_ops): Add "detach" member.
18097 (detach_inferior): Define.
18099 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18101 From Kelley Cook <kelleycook@wideopenwest.com>:
18102 * configure.srv: Accept i[34567]86 variants.
18104 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18106 * linux-low.c (linux_wait_for_event): Correct comment typos.
18107 (linux_resume_one_process): Call check_removed_breakpoint.
18108 (linux_send_signal): New function.
18109 (linux_target_ops): Add linux_send_signal.
18110 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18112 * target.h (struct target_ops): Add send_signal.
18114 2003-05-29 Jim Blandy <jimb@redhat.com>
18116 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18117 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18118 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18119 away part of the register's value.
18121 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18123 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18124 (linux_wait_for_event, linux_init_signals): Likewise.
18126 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18128 * configure.in: Check for stdlib.h.
18129 * configure: Regenerated.
18130 * config.in: Regenerated.
18132 2003-01-04 Andreas Schwab <schwab@suse.de>
18134 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18136 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18138 * Makefile.in: Remove obsolete code.
18140 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18142 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18143 defined(PT_FPR0_HI).
18145 2002-11-17 Stuart Hughes <seh@zee2.com>
18147 * linux-arm-low.c (arm_num_regs): Increase.
18148 (arm_regmap): Include status register.
18150 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18152 * linux-low.c (register_addr): Remove incorrect -1 check.
18154 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18156 * linux-low.c (linux_create_inferior): Call setpgid. Return
18158 (unstopped_p, linux_signal_pid): Remove.
18159 (linux_target_ops): Remove linux_signal_pid.
18160 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18161 global instead of target method.
18162 * target.h (struct target_ops): Remove signal_pid. Update comment
18163 for create_inferior.
18164 * server.c (signal_pid): New variable.
18165 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18166 gdbserver. Set the child to be the foreground process group.
18167 (attach_inferior): Set signal_pid.
18169 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18171 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18173 2002-08-20 Jim Blandy <jimb@redhat.com>
18175 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18178 2002-08-01 Andrew Cagney <cagney@redhat.com>
18180 * Makefile.in: Make chill references obsolete.
18182 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18184 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18185 * configure: Regenerate.
18186 * config.in: Regenerate.
18188 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18190 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18191 (perror_with_name, remote_close, remote_open, expect, play): Static.
18193 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18195 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18196 byte offsets instead of an array of indexes.
18197 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18199 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18201 * regcache.c: Add comment.
18203 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18205 * thread-db.c: New file.
18206 * proc-service.c: New file.
18207 * acinclude.m4: New file.
18208 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18209 proc-service.o, and thread-db.o.
18210 (linux-low.o): Add USE_THREAD_DB.
18211 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18212 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18213 * aclocal.m4: Regenerated.
18214 * config.in: Regenerated.
18215 * configure: Regenerated.
18216 * configure.in: Check for proc_service.h, sys/procfs.h,
18217 thread_db.h, and linux/elf.h headrs.
18218 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18219 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18220 Check for -lthread_db and thread support.
18221 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18222 PowerPC, and SuperH.
18223 * i387-fp.c: Constify arguments.
18224 * i387-fp.h: Likewise.
18225 * inferiors.c: (struct thread_info): Renamed from
18226 `struct inferior_info'. Remove PID member. Use generic inferior
18227 list header. All uses updated.
18228 (inferiors, signal_pid): Removed.
18229 (all_threads): New variable.
18230 (get_thread): Define.
18231 (add_inferior_to_list): New function.
18232 (for_each_inferior): New function.
18233 (change_inferior_id): New function.
18234 (add_inferior): Removed.
18235 (remove_inferior): New function.
18236 (add_thread): New function.
18237 (free_one_thread): New function.
18238 (remove_thread): New function.
18239 (clear_inferiors): Use for_each_inferior and free_one_thread.
18240 (find_inferior): New function.
18241 (find_inferior_id): New function.
18242 (inferior_target_data): Update argument type.
18243 (set_inferior_target_data): Likewise.
18244 (inferior_regcache_data): Likewise.
18245 (set_inferior_regcache_data): Likewise.
18246 * linux-low.c (linux_bp_reinsert): Remove.
18247 (all_processes, stopping_threads, using_thrads)
18248 (struct pending_signals, debug_threads, pid_of): New.
18249 (inferior_pid): Replace with macro.
18250 (struct inferior_linux_data): Remove.
18251 (get_stop_pc, add_process): New functions.
18252 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18253 Use add_process and add_thread.
18254 (linux_attach_lwp): New function, based on old linux_attach. Use
18255 add_process and add_thread. Set stop_expected for new threads.
18256 (linux_attach): New function.
18257 (linux_kill_one_process): New function.
18258 (linux_kill): Kill all LWPs.
18259 (linux_thread_alive): Use find_inferior_id.
18260 (check_removed_breakpoints, status_pending_p): New functions.
18261 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18262 Update. Use WNOHANG. Wait for cloned processes also. Update process
18263 struct for the found process.
18264 (linux_wait_for_event): New function.
18265 (linux_wait): Use it. Support LWPs.
18266 (send_sigstop, wait_for_sigstop, stop_all_processes)
18267 (linux_resume_one_process, linux_continue_one_process): New functions.
18268 (linux_resume): Support LWPs.
18269 (REGISTER_RAW_SIZE): Remove.
18270 (fetch_register): Use register_size instead. Call supply_register.
18271 (usr_store_inferior_registers): Likewise. Call collect_register.
18272 Fix recursive case.
18273 (regsets_fetch_inferior_registers): Improve error message.
18274 (regsets_store_inferior_registers): Add debugging.
18275 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18276 (unstopped_p, linux_signal_pid): New functions.
18277 (linux_target_ops): Add linux_signal_pid.
18278 (linux_init_signals): New function.
18279 (initialize_low): Call it. Initialize using_threads.
18280 * regcache.c (inferior_regcache_data): Add valid
18282 (get_regcache): Fetch registers lazily. Add fetch argument
18283 and update all callers.
18284 (regcache_invalidate_one, regcache_invalidate): New
18286 (new_register_cache): Renamed from create_register_cache.
18287 Return the new regcache.
18288 (free_register_cache): Change argument to a void *.
18289 (registers_to_string, registers_from_string): Call get_regcache
18290 with fetch flag set.
18291 (register_data): Make static. Pass fetch flag to get_regcache.
18292 (supply_register): Call get_regcache with fetch flag clear.
18293 (collect_register): Call get_regcache with fetch flag set.
18294 (collect_register_as_string): New function.
18295 * regcache.h: Update.
18296 * remote-utils.c (putpkt): Flush after debug output and use
18298 Handle input interrupts while waiting for an ACK.
18299 (input_interrupt): Use signal_pid method.
18300 (getpkt): Flush after debug output and use stderr.
18301 (outreg): Use collect_register_as_string.
18302 (new_thread_notify, dead_thread_notify): New functions.
18303 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18304 and general_thread.
18305 (look_up_one_symbol): Flush after debug output.
18306 * server.c (step_thread, server_waiting): New variables.
18307 (start_inferior): Don't use signal_pid. Update call to mywait.
18308 (attach_inferior): Update call to mywait.
18309 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18310 (main): Don't fetch/store registers explicitly. Use
18311 set_desired_inferior. Support proposed ``Hs'' packet. Update
18313 * server.h: Update.
18314 (struct inferior_list, struct_inferior_list_entry): New.
18315 * target.c (set_desired_inferior): New.
18316 (write_inferior_memory): Constify.
18317 (mywait): New function.
18318 * target.h: Update.
18319 (struct target_ops): New signal_pid method.
18320 (mywait): Removed macro, added prototype.
18322 * linux-low.h (regset_func): Removed.
18323 (regset_fill_func, regset_store_func): New.
18324 (enum regset_type): New.
18325 (struct regset_info): Add type field. Use new operation types.
18326 (struct linux_target_ops): stop_pc renamed to get_pc.
18327 Add decr_pc_after_break and breakpoint_at.
18328 (get_process, get_thread_proess, get_process_thread)
18329 (strut process_info, all_processes, linux_attach_lwp)
18330 (thread_db_init): New.
18332 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18333 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18334 (the_low_target): Add new members.
18335 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18336 (i386_store_fpxregset): Constify.
18337 (target_regsets): Add new kind identifier.
18338 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18339 (i386_set_pc): Add debugging.
18340 (i386_breakpoint_at): New function.
18341 (the_low_target): Add new members.
18342 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18343 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18344 (mips_breakpoint_at): New.
18345 (the_low_target): Add new members.
18346 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18347 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18348 (the_low_target): Add new members.
18349 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18350 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18351 (the_low_target): Add new members.
18352 * linux-x86-64-low.c (target_regsets): Add new kind
18355 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18357 From Martin Pool <mbp@samba.org>:
18358 * server.c (gdbserver_usage): New function.
18361 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18363 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18364 stop_at -> stop_pc.
18366 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18368 * Makefile.in: Remove obsolete code.
18370 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18372 * linux-low.c (regsets_fetch_inferior_registers),
18373 (regsets_store_inferior_registers): Removed cast to int from
18375 * regcache.h: Added declaration of struct inferior_info.
18377 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18379 * inferiors.c (struct inferior_info): Add regcache_data.
18380 (add_inferior): Call create_register_cache.
18381 (clear_inferiors): Call free_register_cache.
18382 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18383 * regcache.c (struct inferior_regcache_data): New.
18384 (registers): Remove.
18385 (get_regcache): New function.
18386 (create_register_cache, free_register_cache): New functions.
18387 (set_register_cache): Don't initialize the register cache here.
18388 (registers_to_string, registers_from_string, register_data): Call
18390 * regcache.h: Add prototypes.
18391 * server.h: Likewise.
18393 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18395 * mem-break.c: New file.
18396 * mem-break.h: New file.
18397 * Makefile.in: Add mem-break.o rule; update server.h
18399 * inferiors.c (struct inferior_info): Add target_data
18401 (clear_inferiors): Free target_data member if set.
18402 (inferior_target_data, set_inferior_target_data): New functions.
18403 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18404 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18405 * linux-low.c (linux_bp_reinsert): New variable.
18406 (struct inferior_linux_data): New.
18407 (linux_create_inferior): Use set_inferior_target_data.
18408 (linux_attach): Likewise. Call add_inferior.
18409 (linux_wait_for_one_inferior): New function.
18410 (linux_wait): Call it.
18411 (linux_write_memory): Add const.
18412 (initialize_low): Call set_breakpoint_data.
18413 * linux-low.h (struct linux_target_ops): Add breakpoint
18415 * server.c (attach_inferior): Remove extra add_inferior
18417 * server.h: Include mem-break.h. Update inferior.c
18419 * target.c (read_inferior_memory)
18420 (write_inferior_memory): New functions.
18421 * target.h (read_inferior_memory)
18422 (write_inferior_memory): Change macros to prototypes.
18423 (struct target_ops): Update comments. Add const to write_memory
18426 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18428 * linux-low.c (usr_store_inferior_registers): Support
18429 registers which are allowed to fail to store.
18430 * linux-low.h (linux_target_ops): Likewise.
18431 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18432 (ppc_cannot_store_register): FPSCR may not be storable.
18434 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18436 * server.h: Include <string.h> if HAVE_STRING_H.
18437 * ChangeLog: Correct paths in last ChangeLog entry.
18439 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18441 * linux-low.h: Remove obsolete prototypes.
18442 (struct linux_target_ops): New.
18443 (extern the_low_target): New.
18444 * linux-low.c (num_regs, regmap): Remove declarations.
18445 (register_addr): Use the_low_target explicitly.
18446 (fetch_register): Likewise.
18447 (usr_fetch_inferior_registers): Likewise.
18448 (usr_store_inferior_registers): Likewise.
18449 * linux-arm-low.c (num_regs): Remove.
18450 (arm_num_regs): Define.
18451 (arm_regmap): Renamed from regmap, made static.
18452 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18454 (arm_cannot_store_register): Renamed from cannot_store_register,
18456 (the_low_target): New.
18457 * linux-i386-low.c (num_regs): Remove.
18458 (i386_num_regs): Define.
18459 (i386_regmap): Renamed from regmap, made static.
18460 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18462 (i386_cannot_store_register): Renamed from cannot_store_register,
18464 (the_low_target): New.
18465 * linux-ia64-low.c (num_regs): Remove.
18466 (ia64_num_regs): Define.
18467 (ia64_regmap): Renamed from regmap, made static.
18468 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18470 (ia64_cannot_store_register): Renamed from cannot_store_register,
18472 (the_low_target): New.
18473 * linux-m68k-low.c (num_regs): Remove.
18474 (m68k_num_regs): Define.
18475 (m68k_regmap): Renamed from regmap, made static.
18476 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18478 (m68k_cannot_store_register): Renamed from cannot_store_register,
18480 (the_low_target): New.
18481 * linux-mips-low.c (num_regs): Remove.
18482 (mips_num_regs): Define.
18483 (mips_regmap): Renamed from regmap, made static.
18484 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18486 (mips_cannot_store_register): Renamed from cannot_store_register,
18488 (the_low_target): New.
18489 * linux-ppc-low.c (num_regs): Remove.
18490 (ppc_num_regs): Define.
18491 (ppc_regmap): Renamed from regmap, made static.
18492 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18494 (ppc_cannot_store_register): Renamed from cannot_store_register,
18496 (the_low_target): New.
18497 * linux-s390-low.c (num_regs): Remove.
18498 (s390_num_regs): Define.
18499 (s390_regmap): Renamed from regmap, made static.
18500 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18502 (s390_cannot_store_register): Renamed from cannot_store_register,
18504 (the_low_target): New.
18505 * linux-sh-low.c (num_regs): Remove.
18506 (sh_num_regs): Define.
18507 (sh_regmap): Renamed from regmap, made static.
18508 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18510 (sh_cannot_store_register): Renamed from cannot_store_register,
18512 (the_low_target): New.
18513 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18514 (the_low_target): New.
18516 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18518 * Makefile.in: Add stamp-h target.
18519 * configure.in: Create stamp-h.
18520 * configure: Regenerated.
18522 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18524 * inferiors.c: New file.
18525 * target.c: New file.
18526 * target.h: New file.
18527 * Makefile.in: Add target.o and inferiors.o. Update
18529 * linux-low.c (inferior_pid): New static variable,
18530 moved from server.c.
18531 (linux_create_inferior): Renamed from create_inferior.
18532 Call add_inferior. Return 0 on success instead of a PID.
18533 (linux_attach): Renamed from myattach.
18534 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18535 (linux_thread_alive): Renamed from mythread_alive.
18536 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18538 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18539 (regsets_store_inferior_registers): Correct error message.
18540 Add missing ``return 0''.
18541 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18542 (linux_store_registers): Renamed from store_inferior_registers.
18543 (linux_read_memory): Renamed from read_inferior_memory.
18544 (linux_write_memory): Renamed from write_inferior_memory.
18545 (linux_target_ops): New structure.
18546 (initialize_low): Call set_target_ops ().
18547 * remote-utils.c (unhexify): New function.
18548 (hexify): New function.
18549 (input_interrupt): Send signals to ``signal_pid''.
18550 * server.c (inferior_pid): Remove.
18551 (start_inferior): Update create_inferior call.
18552 (attach_inferior): Call add_inferior.
18553 (handle_query): New function.
18554 (main): Call handle_query for `q' packets.
18555 * server.h: Include "target.h". Remove obsolete prototypes.
18556 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18558 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18560 * Makefile.in: Add WARN_CFLAGS. Update configury
18562 * configure.in: Check for <string.h>
18563 * configure: Regenerate.
18564 * config.in: Regenerate.
18565 * gdbreplay.c: Include needed system headers.
18566 (remote_open): Remove strchr prototype.
18567 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18568 * regcache.c (supply_register): Change buf argument to const void *.
18569 (supply_register_by_name): Likewise.
18570 (collect_register): Change buf argument to void *.
18571 (collect_register_by_name): Likewise.
18572 * regcache.h: Add missing prototypes.
18573 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18574 * server.c (handle_query): New function.
18575 (attached): New static variable, moved out of main.
18576 (main): Quiet longjmp clobber warnings.
18577 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18578 * utils.c (error): Remove NORETURN.