1 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3 * linux-low.c (status_pending_p_callback): Fix comment.
4 (linux_wait_for_event_1): Move most of the internal breakpoint
6 (linux_wait_1): ... to here.
7 (count_events_callback): New.
8 (select_singlestep_lwp_callback): New.
9 (select_event_lwp_callback): New.
10 (cancel_breakpoints_callback): New.
11 (select_event_lwp): New.
12 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13 priority to all LWPs that have had events that should be reported
14 to the client. Cancel breakpoints when about to reporting the
15 event to the client, not while stopping lwps. No longer cancel
16 finished single-steps here.
17 (cancel_finished_single_step): Delete.
18 (cancel_finished_single_steps): Delete.
20 2010-03-24 Pedro Alves <pedro@codesourcery.com>
22 * mem-break.c (enum bkpt_type): New.
23 (struct breakpoint): New field `type'.
24 (set_breakpoint_at): Change return type to struct breakpoint
25 pointer. Set type to `other_breakpoint' by default.
26 (delete_breakpoint): Rewrite, supporting more than one breakpoint
27 in the breakpoint list.
28 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
29 (reinsert_breakpoint): Rename to ...
30 (reinsert_raw_breakpoint): ... this.
31 (reinsert_breakpoints_at): Adjust.
32 * mem-break.h (struct breakpoint): Declare.
33 (set_breakpoint_at): Change return type to struct breakpoint
36 2010-03-24 Pedro Alves <pedro@codesourcery.com>
38 * server.c (handle_query): Assign, not compare.
40 2010-03-24 Pedro Alves <pedro@codesourcery.com>
42 Teach linux gdbserver to step-over-breakpoints.
44 * linux-low.c (can_hardware_single_step): New.
45 (supports_breakpoints): New.
46 (handle_extended_wait): If stopping threads, read the stop pc of
49 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
50 low target doesn't support retrieving the PC.
51 (add_lwp): Set last_resume_kind to resume_continue.
52 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
53 (linux_attach): Don't clear stop_expected. Set the lwp's
54 last_resume_kind to resume_stop.
55 (linux_detach_one_lwp): Don't check for removed breakpoints.
56 (check_removed_breakpoint): Delete.
57 (status_pending_p): Rename to ...
58 (status_pending_p_callback): ... this. Don't check for removed
59 breakpoints. Don't consider threads that are stopped from GDB's
61 (linux_wait_for_lwp): Always read the stop_pc here.
62 (cancel_breakpoint): New.
63 (step_over_bkpt): New global.
64 (linux_wait_for_event_1): Implement stepping over breakpoints.
65 (gdb_wants_lwp_stopped): New.
66 (gdb_wants_all_stopped): New.
67 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
68 single-step traps here. Store the thread's last reported target
70 (send_sigstop): Don't clear stop_expected. Always set it,
72 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
73 (cancel_finished_single_step): New.
74 (cancel_finished_single_steps): New.
75 (wait_for_sigstop): Don't cancel finished single-step traps here.
76 (linux_resume_one_lwp): Don't check for removed breakpoints.
77 Don't set `step' on non-hardware step archs.
78 (linux_set_resume_request): Ignore resume_stop requests if already
79 stopping or stopped. Set the lwp's last_resume_kind.
80 (resume_status_pending_p): Don't check for removed breakpoints.
81 (need_step_over_p): New.
82 (start_step_over): New.
83 (finish_step_over): New.
84 (linux_resume_one_thread): Always queue a sigstop for resume_stop
85 requests. Clear the thread's last reported target waitstatus.
86 Don't use the `suspended' flag. Don't consider pending breakpoints.
87 (linux_resume): Start a step-over if necessary.
88 (proceed_one_lwp): New.
89 (proceed_all_lwps): New.
90 (unstop_all_lwps): New.
91 * linux-low.h (struct lwp_info): Rewrite comment for the
92 `suspended' flag. Add the `stop_pc' field. Delete the
93 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
94 Add `'last_resume_kind' and `need_step_over' fields.
95 * inferiors.c (struct thread_info): Delete, moved elsewhere.
96 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
97 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
98 (set_raw_breakpoint_at): New.
99 (set_breakpoint_at): Rewrite to use it.
100 (reinsert_breakpoint_handler): Delete.
101 (set_reinsert_breakpoint): New.
102 (reinsert_breakpoint_by_bp): Delete.
103 (delete_reinsert_breakpoints): New.
104 (uninsert_breakpoint): Rewrite.
105 (uninsert_breakpoints_at): New.
106 (reinsert_breakpoint): Rewrite.
107 (reinsert_breakpoints_at): New.
108 (check_breakpoints): Rewrite.
109 (breakpoint_here): New.
110 (breakpoint_inserted_here): New.
111 (check_mem_read): Adjust.
112 * mem-break.h (breakpoints_supported, breakpoint_here)
113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
114 (reinsert_breakpoint_by_bp): Delete declaration.
115 (delete_reinsert_breakpoints): Declare.
116 (reinsert_breakpoint): Delete declaration.
117 (reinsert_breakpoints_at): Declare.
118 (uninsert_breakpoint): Delete declaration.
119 (uninsert_breakpoints_at): Declare.
120 (check_breakpoints): Adjust prototype.
121 * server.h: Adjust include order.
122 (struct thread_info): Declare here. Add a `last_status' field.
124 2010-03-23 Michael Snyder <msnyder@vmware.com>
126 * server.c (crc32): New function.
127 (handle_query): Add handling for 'qCRC:' request.
129 2010-03-23 Pedro Alves <pedro@codesourcery.com>
131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
132 lwp had been stopped by a watchpoint.
134 2010-03-16 Pedro Alves <pedro@codesourcery.com>
136 * server.h (internal_error): Declare.
137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
138 * utils.c (internal_error): New function.
140 2010-03-15 Andreas Schwab <schwab@redhat.com>
142 * configure.srv: Fix typo setting srv_regobj.
144 2010-03-15 Pedro Alves <pedro@codesourcery.com>
146 * linux-low.c (fetch_register): Avoid passing a non string literal
148 (usr_store_inferior_registers): Ditto.
150 2010-03-14 Pedro Alves <pedro@codesourcery.com>
152 * linux-low.c (linux_write_memory): Bail out early if peeking
155 2010-03-14 Pedro Alves <pedro@codesourcery.com>
157 * linux-low.h (struct lwp_info): New fields
158 `stopped_by_watchpoint' and `stopped_data_address'.
159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
160 here, and cache them in the lwp object.
161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
165 (linux_stopped_by_watchpoint): Rewrite.
166 (linux_stopped_data_address): Rewrite.
168 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
171 switching the current inferior, not before.
173 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
177 i386-linux.c and amd64-linux.c.
178 (reg-i386.o): Removed.
179 (reg-i386.c): Likewise.
180 (reg-i386-linux.o): Likewise.
181 (reg-i386-linux.c): Likewise.
182 (reg-x86-64.o): Likewise.
183 (reg-x86-64.c): Likewise.
184 (reg-x86-64-linux.o): Likewise.
185 (reg-x86-64-linux.c): Likewise.
188 (i386-linux.o): Likewise.
189 (i386-linux.c): Likewise.
192 (amd64-linux.o): Likewise.
193 (amd64-linux.c): Likewise.
195 * configure.srv (srv_i386_regobj): New.
196 (srv_i386_linux_regobj): Likewise.
197 (srv_amd64_regobj): Likewise.
198 (srv_amd64_linux_regobj): Likewise.
199 (srv_i386_32bit_xmlfiles): Likewise.
200 (srv_i386_64bit_xmlfiles): Likewise.
201 (srv_i386_xmlfiles): Likewise.
202 (srv_amd64_xmlfiles): Likewise.
203 (srv_i386_linux_xmlfiles): Likewise.
204 (srv_amd64_linux_xmlfiles): Likewise.
205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
206 srv_xmlfiles to $srv_i386_xmlfiles.
207 (i[34567]86-*-mingw32ce*): Likewise.
208 (i[34567]86-*-mingw*): Likewise.
209 (i[34567]86-*-nto*): Likewise.
210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
213 (x86_64-*-linux*): Likewise.
215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
216 (init_registers_amd64_linux): New.
217 (x86_arch_setup): Replace init_registers_x86_64_linux with
218 init_registers_amd64_linux.
220 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
222 * configure.ac: Check for libdl. If it is not available link against
224 * configure: Regenerate.
226 2010-02-22 Pedro Alves <pedro@codesourcery.com>
230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
231 handing a read watchpoint.
232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
234 2010-02-12 Doug Evans <dje@google.com>
236 * linux-low.c (linux_supports_tracefork_flag): Document.
237 (linux_look_up_symbols): Add comment.
239 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
241 * regcache.c (supply_register): Clear regcache if buf is NULL.
243 2010-02-02 Nicolas Roche <roche@sourceware.org>
244 Joel Brobecker <brobecker@adacore.com>
246 * inferiors.c (find_inferior): Add function documentation.
247 (unloaded_dll): Handle the case where the unloaded dll has not
248 been previously registered in the dll list.
250 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
253 (thumb2_breakpoint): New.
254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
256 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
266 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
268 * linux-s390-low.c (s390_collect_ptrace_register)
269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
271 2010-01-21 Doug Evans <dje@google.com>
273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
274 (PTRACE_ARG4_TYPE): New macro.
275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
278 (usr_store_inferior_registers): Ditto.
279 (linux_read_memory, linux_write_memory): Ditto.
280 (linux_test_for_tracefork): Ditto.
282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
285 2010-01-21 Pedro Alves <pedro@codesourcery.com>
287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
290 2010-01-21 Pedro Alves <pedro@codesourcery.com>
292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
293 prototype to take a regcache. Adjust.
295 2010-01-20 Pedro Alves <pedro@codesourcery.com>
297 * regcache.h (struct thread_info): Forward declare.
298 (struct regcache): New.
299 (new_register_cache): Adjust prototype.
300 (get_thread_regcache): Declare.
301 (free_register_cache): Adjust prototype.
302 (registers_to_string, registers_from_string): Ditto.
303 (supply_register, supply_register_by_name, collect_register)
304 (collect_register_as_string, collect_register_by_name): Ditto.
305 * regcache.c (struct inferior_regcache_data): Delete.
306 (get_regcache): Rename to ...
307 (get_thread_regcache): ... this. Adjust. Switch inferior before
309 (regcache_invalidate_one): Adjust.
310 (regcache_invalidate): Fix prototype.
311 (new_register_cache): Return the new register cache.
312 (free_register_cache): Change prototype.
313 (realloc_register_cache): Adjust.
314 (registers_to_string): Change prototype to take a regcache. Adjust.
315 (registers_from_string): Ditto.
316 (register_data): Ditto.
317 (supply_register): Ditto.
318 (supply_register_by_name): Ditto.
319 (collect_register): Ditto.
320 (collect_register_as_string): Ditto.
321 (collect_register_by_name): Ditto.
322 * server.c (process_serial_event): Adjust.
323 * linux-low.h (regset_fill_func, regset_store_func): Change
325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
327 * linux-low.c (get_stop_pc): Adjust.
328 (check_removed_breakpoint): Adjust.
329 (linux_wait_for_event): Adjust.
330 (linux_resume_one_lwp): Adjust.
331 (fetch_register): Add regcache parameter. Adjust.
332 (usr_store_inferior_registers): Ditto.
333 (regsets_fetch_inferior_registers): Ditto.
334 (regsets_store_inferior_registers): Ditto.
335 (linux_fetch_registers, linux_store_registers): Ditto.
336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
339 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
340 prototype to take a regcache.
341 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
342 * remote-utils.c (convert_ascii_to_int, outreg)
343 (prepare_resume_reply): Change prototype to take a regcache.
345 * target.h (struct target_ops) <fetch_registers, store_registers>:
346 Change prototype to take a regcache.
347 (fetch_inferior_registers, store_inferior_registers): Change
348 prototype to take a regcache. Adjust.
349 * proc-service.c (ps_lgetregs): Adjust.
350 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
351 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
352 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
353 take a regcache. Adjust.
354 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
355 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
356 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
357 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
358 * linux-cris-low.c (cris_get_pc, cris_set_pc)
359 (cris_cannot_fetch_register):
360 (cris_breakpoint_at): Change prototype to take a regcache.
362 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
363 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
364 to take a regcache. Adjust.
365 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
367 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
368 take a regcache. Adjust.
369 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
370 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
371 (m68k_set_pc): Change prototype to take a regcache. Adjust.
372 * linux-mips-low.c (mips_get_pc):
373 (mips_set_pc): Change prototype to take a regcache. Adjust.
374 (mips_reinsert_addr): Adjust.
375 (mips_collect_register): Change prototype to take a regcache.
377 (mips_supply_register):
378 (mips_collect_register_32bit, mips_supply_register_32bit)
379 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
380 (mips_store_fpregset): Ditto.
381 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
383 (parse_spufs_run): Adjust.
384 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
385 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
386 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
387 take a regcache. Adjust.
388 * linux-s390-low.c (s390_collect_ptrace_register)
389 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
390 (s390_set_pc): Change prototype to take a regcache. Adjust.
391 (s390_arch_setup): Adjust.
392 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
393 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
394 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
395 (sparc_fill_gregset, sparc_store_gregset_from_stack)
396 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
398 (sparc_breakpoint_at): Adjust.
399 * linux-xtensa-low.c (xtensa_fill_gregset):
400 (xtensa_store_gregset):
401 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
402 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
403 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
404 prototype to take a regcache. Adjust.
405 * win32-arm-low.c (arm_fetch_inferior_register)
406 (arm_store_inferior_register): Change prototype to take a
408 * win32-i386-low.c (i386_fetch_inferior_register)
409 (i386_store_inferior_register): Change prototype to take a
411 * win32-low.c (child_fetch_inferior_registers)
412 (child_store_inferior_registers): Change prototype to take a
414 (win32_wait): Adjust.
415 (win32_fetch_inferior_registers): Change prototype to take a
417 (win32_store_inferior_registers): Adjust.
418 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
419 store_inferior_register>: Change prototype to take a regcache.
421 2010-01-20 Doug Evans <dje@google.com>
423 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
425 (linux_wait_for_event1, linux_init_signals): Ditto.
426 (W_STOPCODE): Provide definition if missing.
428 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
430 * linux-low.c (linux_core_of_thread): New.
431 (compare_ints, show_process, list_threads): New.
432 (linux_qxfer_osdata): Report threads and cores.
433 (linux_target_op): Register linux_core_of_thread.
434 * remote-utils.c (prepare_resume_reply): Report the core.
435 (buffer_xml_printf): Support %d specifier.
436 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
438 (handle_query): Handle qXfer:threads. Announce availability
440 * target.h (struct target_ops): New field core_of_thread.
442 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
444 * Makefile.in (clean): Remove new generated files.
445 (reg-s390.o, reg-s390.c): Remove rules.
446 (reg-s390x.o, reg-s390x.c): Likewise.
447 (s390-linux32.o, s390-linux32.c): Add rules.
448 (s390-linux64.o, s390-linux64.c): Likewise.
449 (s390x-linux64.o, s390x-linux64.c): Likewise.
450 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
451 * linux-s390-low.c: Include <elf.h>.
452 (HWCAP_S390_HIGH_GPRS): Define if undefined.
453 (init_registers_s390): Remove prototype.
454 (init_registers_s390x): Likewise.
455 (init_registers_s390_linux32): Add prototype.
456 (init_registers_s390_linux64): Likewise.
457 (init_registers_s390x_linux64): Likewise.
458 (s390_num_regs_3264): New define.
459 (s390_regmap_3264): New global variable.
460 (s390_cannot_fetch_register): Remove obsolete check.
461 (s390_cannot_store_register): Likewise.
462 (s390_collect_ptrace_register): Handle upper/lower register halves.
463 (s390_supply_ptrace_register): Likewise.
464 (s390_fill_gregset): Update to register number changes.
465 (s390_get_hwcap): New routine.
466 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
467 Install appropriate regmap and register set.
469 2010-01-01 Joel Brobecker <brobecker@adacore.com>
471 * server.c (gdbserver_version): Update copyright year to 2010.
472 * gdbreplay.c (gdbreplay_version): Likewise.
474 2009-12-28 Doug Evans <dje@google.com>
476 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
477 elf/external.h. Include <elf.h> instead but only if necessary.
479 2009-12-28 Pedro Alves <pedro@codesourcery.com>
481 * linux-low.c (linux_remove_process): Remove `detaching'
482 parameter. Don't release/detach from thread_db here.
483 (linux_kill): Release/detach from thread_db here, ...
484 (linux_detach): ... and here, before actually detaching.
485 (linux_wait_1): ... and here, when a process exits.
486 * thread-db.c (any_thread_of): New.
487 (thread_db_free): Switch the current inferior to a thread of the
490 2009-12-21 Doug Evans <dje@google.com>
492 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
494 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
495 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
496 warning ifndef __NR_tkill. Move setting of errno there too.
497 Delete unnecessary resetting of errno after syscall.
498 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
500 * configure.ac: Check for dladdr.
501 * config.in: Regenerate.
502 * configure: Regenerate.
503 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
504 (try_thread_db_load): Update.
506 * linux-low.c (my_waitpid): Delete unnecessary prototype.
508 2009-12-18 Doug Evans <dje@google.com>
510 * event-loop.c: Include unistd.h if it exists.
512 * linux-low.c (my_waitpid): Move definition away from being in
513 between linux_tracefork_child/linux_test_for_tracefork.
515 * gdb_proc_service.h (psaddr_t): Fix type.
516 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
517 signature to match glibc.
519 2009-12-16 Doug Evans <dje@google.com>
521 * linux-low.c (linux_read_memory): Fix argument to read.
523 2009-11-26 Pedro Alves <pedro@codesourcery.com>
525 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
526 events, don't leave current_inferior pointing at null.
528 2009-11-26 Pedro Alves <pedro@codesourcery.com>
530 * win32-low.c (LOG): Delete.
531 (OUTMSG): Output to stderr.
532 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
533 on compile time LOG macro.
534 (win32_wait): Fix debug output.
536 2009-11-26 Pedro Alves <pedro@codesourcery.com>
538 * win32-low.c (win32_add_one_solib): If the dll name is
539 "ntdll.dll", prepend the system directory to the dll path.
541 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
543 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
545 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
546 Vladimir Prus <vladimir@codesourcery.com>
548 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
549 * configure.ac: Check for __mcoldfire__ and set
550 gdb_cv_m68k_is_coldfire.
551 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
552 reg-cf.o and reg-m68k.o.
553 * configure: Regenerated.
555 2009-11-16 Pedro Alves <pedro@codesourcery.com>
557 * linux-low.c (linux_remove_process): Add `detaching' parameter.
558 Pass it to thread_db_free.
559 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
560 proper `detaching' argument to linux_remove_process.
561 * linux-low.h (thread_db_free): Add `detaching' parameter.
562 * thread-db.c (thread_db_init): Pass false as `detaching' argument
564 (thread_db_free): Add `detaching' parameter. Only
565 call td_ta_clear_event if detaching from process.
567 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
569 * thread-db.c (thread_db_free): Fix typo.
571 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
574 * thread-db.c (thread_db_free): Call td_ta_clear_event.
576 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
578 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
579 with an i686 compiler.
580 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
582 * configure: Rebuilt.
584 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
588 * server.c (handle_search_memory_1): Correct read_addr initialization
589 in loop for searching subsequent chunks.
591 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
593 * configure.ac: New --with-libthread-db option.
594 * thread-db.c: Allow direct dependence on libthread_db.
595 (thread_db_free): Adjust.
596 * config.in: Regenerate.
597 * configure: Likewise.
599 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
602 * thread-db.c (attach_thread): New function.
603 (maybe_attach_thread): Return success/failure.
604 (find_new_threads_callback): Adjust.
605 (thread_db_find_new_threads): Loop until no new threads.
607 2009-10-13 Pedro Alves <pedro@codesourcery.com>
609 * proc-service.c (ps_lgetregs): Formatting.
611 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
613 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
614 * configure.ac: Adjust.
615 * linux-low.h (struct process_info_private): Move members to struct
617 (thread_db_free, thread_db_handle_monitor_command): New prototype.
618 * linux-low.c (linux_remove_process): Adjust.
619 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
620 * server.c (handle_query): Move code ...
621 (handle_monitor_command): ... here. New function.
622 * target.h (struct target_ops): New member.
623 * thread-db.c (struct thread_db): New.
624 (libthread_db_search_path): New variable.
625 (thread_db_create_event, thread_db_enable_reporting)
626 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
627 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
628 (try_thread_db_load_1, dladdr_to_soname): New functions.
629 (try_thread_db_load, thread_db_load_search): New functions.
630 (thread_db_init): Search for libthread_db.
631 (thread_db_free): New function.
632 (thread_db_handle_monitor_command): Likewise.
633 * config.in: Regenerate.
634 * configure: Regenerate.
636 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
638 * spu-low.c (spu_kill): Wait for inferior to terminate.
639 Call clear_inferiors.
640 (spu_detach): Call clear_inferiors.
642 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
644 * aclocal.m4: Regenerate.
645 * config.in: Likewise.
646 * configure: Likewise.
648 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
650 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
651 (parse_spufs_run): New function.
652 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
653 (ppc_breakpoint_at): Handle SPU breakpoints.
655 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
657 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
658 (SPUFS_MAGIC): Define.
659 (spu_enumerate_spu_ids): New function.
660 (linux_qxfer_spu): New function.
661 (linux_target_ops): Install linux_qxfer_spu.
663 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
665 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
666 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
667 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
668 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
669 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
670 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
671 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
672 (init_registers_powerpc_cell32l): Add prototype.
673 (init_registers_powerpc_cell64l): Likewise.
674 (ppc_arch_setup): Detect Cell/B.E. architecture.
676 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
678 * Makefile.in (datarootdir): New variable.
680 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
682 * linux-low.c (linux_write_memory): Update debugging output.
683 * Makefile.in (clean): Add new descriptions.
684 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
685 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
686 * configure.srv: Add new files for arm*-*-linux*.
687 * linux-arm-low.c: Add new declarations.
688 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
689 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
690 (HWCAP_VFPv3D16): New.
691 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
692 instead of __IWMMXT__.
693 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
694 (arm_arch_setup): New.
695 (target_regsets): Remove #ifdef. Add VFP regset.
696 (the_low_target): Use arm_arch_setup.
698 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
700 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
701 the main thread again.
703 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
705 Adding Neutrino gdbserver.
706 * configure: Regenerated.
707 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
708 * configure.srv (i[34567]86-*-nto*): New target.
709 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
710 * remote-utils.c [__QNX__]: Include sys/iomgr.h
711 (nto_comctrl) [__QNX__]: New function.
712 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
714 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
716 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
719 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
720 Pedro Alves <pedro@codesourcery.com>
722 * win32-i386-low.c (i386_get_thread_context): Handle systems that
723 don't support CONTEXT_EXTENDED_REGISTERS.
724 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
725 (the_low_target): Install them.
726 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
727 failing with ERROR_PIPE_NOT_CONNECTED.
729 2009-06-30 Doug Evans <dje@google.com>
730 Pierre Muller <muller@ics.u-strasbg.fr>
732 Add h/w watchpoint support to x86-linux, win32-i386.
733 * Makefile.in (SFILES): Add i386-low.c
734 (i386_low_h): Define.
735 (i386-low.o): Add dependencies.
736 (linux-x86-low.o): Add i386-low.h dependency.
737 (win32-i386-low.o): Ditto.
738 * i386-low.c: New file.
739 * i386-low.h: New file.
740 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
741 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
742 * linux-low.c (linux_add_process): Initialize arch_private.
743 (linux_remove_process): Free arch_private.
744 (add_lwp): Initialize arch_private.
745 (delete_lwp): Free arch_private.
746 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
748 * linux-low.h (process_info_private): New member arch_private.
749 (lwp_info): New member arch_private.
750 (linux_target_ops): New members new_process, new_thread,
752 (ptid_of): New macro.
753 * linux-x86-low.c: Include stddef.h, i386-low.h.
754 (arch_process_info): New struct.
755 (arch_lwp_info): New struct.
756 (x86_linux_dr_get, x86_linux_dr_set): New functions.
757 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
758 (i386_dr_low_get_status): New function.
759 (x86_insert_point, x86_remove_point): New functions.
760 (x86_stopped_by_watchpoint): New function.
761 (x86_stopped_data_address): New function.
762 (x86_linux_new_process, x86_linux_new_thread): New functions.
763 (x86_linux_prepare_to_resume): New function.
764 (the_low_target): Add entries for insert_point, remove_point,
765 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
767 * server.c (debug_hw_points): New global.
768 (monitor_show_help): Document set debug-hw-points.
769 (handle_query): Process "set debug-hw-points".
770 * server.h (debug_hw_points): Declare.
772 * utils.c (NUMCELLS, CELLSIZE): New macros.
773 (get_sell, xsnprintf, paddress): New functions.
774 * win32-arm-low.c (the_low_target): Add entries for insert_point,
775 remove_point, stopped_by_watchpoint, stopped_data_address.
776 * win32-i386-low.c: Include i386-low.h.
777 (debug_reg_state): Replaces dr.
778 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
779 (i386_dr_low_get_status): New function.
780 (i386_insert_point, i386_remove_point): New functions.
781 (i386_stopped_by_watchpoint): New function.
782 (i386_stopped_data_address): New function.
783 (i386_initial_stuff): Update.
784 (get_thread_context,set_thread_context,i386_thread_added): Update.
785 (the_low_target): Add entries for insert_point,
786 remove_point, stopped_by_watchpoint, stopped_data_address.
787 * win32-low.c (win32_insert_watchpoint): New function.
788 (win32_remove_watchpoint): New function.
789 (win32_stopped_by_watchpoint): New function.
790 (win32_stopped_data_address): New function.
791 (win32_target_ops): Add entries for insert_watchpoint,
792 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
793 * win32-low.h (win32_target_ops): New members insert_point,
794 remove_point, stopped_by_watchpoint, stopped_data_address.
796 2009-06-25 Pedro Alves <pedro@codesourcery.com>
798 * server.c (process_serial_event): Re-return unsupported, not
799 error, if the type isn't recognized. Re-allow supporting only
800 insert or remove packets. Also call require_running for
801 breakpoints. Add missing break statement to default case. Tidy.
802 * target.h (struct target_ops): Rename insert_watchpoint to
803 insert_point, and remove_watchpoint to remove_point.
805 * linux-low.h (struct linux_target_ops): Likewise.
806 * linux-low.c (linux_insert_watchpoint): Rename to ...
807 (linux_insert_point): ... this. Adjust.
808 (linux_remove_watchpoint): Rename to ...
809 (linux_remove_point): ... this. Adjust.
810 (linux_target_ops): Adjust.
811 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
812 (cris_insert_point): ... this.
813 (cris_remove_watchpoint): Rename to ...
814 (cris_remove_point): ... this.
815 (the_low_target): Adjust.
817 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
819 * server.c (handle_v_kill): Pass signal_pid to
820 kill_inferior if multi_process is zero.
822 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
824 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
825 * target.h (target_ops): Comment for *_watchpoint to make it clear
826 the functions can get types '0' and '1'.
828 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
830 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
831 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
832 * regcache.c (get_regcache): Likewise.
833 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
834 * win32-low.c (child_fetch_inferior_registers): Remove check for
837 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
838 Pedro Alves <pedro@codesourcery.com>
840 * target.h (struct target_ops) <supports_multi_process>: New
842 (target_supports_multi_process): New.
843 * server.c (handle_query): Even if GDB reports support, only
844 enable multi-process if the target also supports it. Report
845 multi-process support only if the target backend supports it.
846 * linux-low.c (linux_supports_multi_process): New function.
847 (linux_target_ops): Install it as target_supports_multi_process
850 2009-05-24 Doug Evans <dje@google.com>
852 Global renaming of find_thread_pid to find_thread_ptid.
853 * server.h (find_thread_ptid): Renamed from find_thread_pid.
854 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
857 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
858 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
861 * linux-low.c (get_stop_pc): Print pc if debug_threads.
862 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
863 (linux_resume_one_lwp): Ditto.
865 2009-05-23 Doug Evans <dje@google.com>
867 * linux-low.c (linux_resume_one_lwp): Change type of first arg
868 from struct inferior_list_entry * to struct lwp_info *.
871 2009-05-13 Doug Evans <dje@google.com>
873 * linux-x86-low.c: Don't include assert.h.
874 (x86_siginfo_fixup): Use fatal, not assert.
875 (x86_arch_setup): Fix comment.
877 2009-05-12 Doug Evans <dje@google.com>
879 Biarch support for i386/amd64 gdbserver.
880 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
882 (linux-i386-low.o, linux-x86-64-low.o): Delete.
883 (linux-x86-low.o): Add.
884 * linux-x86-64-low.c: Delete.
885 * linux-i386-low.c: Delete.
886 * linux-x86-low.c: New file.
887 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
889 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
891 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
892 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
893 (linux_child_pid_to_exec_file): New function.
894 (elf_64_header_p, elf_64_file_p): New functions.
895 (siginfo_fixup): New function.
896 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
897 give target a chance to convert layout.
898 * linux-low.h (linux_target_ops): New member siginfo_fixup.
899 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
901 2009-05-07 Doug Evans <dje@google.com>
903 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
904 (regsets_store_inferior_registers): Ditto.
906 2009-05-06 Pedro Alves <pedro@codesourcery.com>
910 * linux-low.c (must_set_ptrace_flags): Delete.
911 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
913 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
914 `lwp->must_set_ptrace_flags' instead.
915 (linux_wait_for_event_1): Set ptrace options here.
916 (linux_wait_1): ... not here.
918 2009-04-30 Doug Evans <dje@google.com>
920 * inferiors.c (started_inferior_callback): New function.
921 (attached_inferior_callback): New function.
922 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
923 * server.c (print_started_pid, print_attached_pid): New functions.
924 (detach_or_kill_for_exit): New function.
925 (main): Call it instead of for_each_inferior (kill_inferior_callback).
926 * server.h (have_started_inferiors_p): Declare.
927 (have_attached_inferiors_p): Declare.
929 * inferiors.c (remove_process): Fix memory leak, free process.
930 * linux-low.c (linux_remove_process): New function.
931 (linux_kill): Call it instead of remove_process.
932 (linux_detach, linux_wait_1): Ditto.
934 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
936 * configure.srv: Add x86 Windows CE target.
938 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
940 * inferiors.c (get_thread_process): Make global.
941 * server.h (get_thread_process): Add prototype.
942 * thread-db.c (find_one_thread): Use get_thread_process
943 instead of current_process.
944 (thread_db_get_tls_address): Do not crash if called when
945 thread layer is not yet initialized.
947 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
949 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
950 * spu-low.c (current_tid): Rename to ...
951 (current_ptid): ... this.
952 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
953 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
954 ptid_get_lwp (current_ptid) instead of current_tid.
955 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
956 instead of current_tid. Use find_process_pid to verify pid
957 argument is valid. Pass proper argument to remove_process.
958 (spu_thread_alive): Compare current_ptid instead of current_tid.
959 (spu_resume): Likewise.
961 2009-04-02 Pedro Alves <pedro@codesourcery.com>
963 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
966 2009-04-01 Pedro Alves <pedro@codesourcery.com>
968 Implement the multiprocess extensions, and add linux multiprocess
971 * server.h (ULONGEST): Declare.
972 (struct ptid, ptid_t): New.
973 (minus_one_ptid, null_ptid): Declare.
974 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
975 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
976 (struct inferior_list_entry): Change `id' type from unsigned from
978 (struct sym_cache, struct breakpoint, struct
979 process_info_private): Forward declare.
980 (struct process_info): Declare.
981 (current_process): Declare.
982 (all_processes): Declare.
983 (initialize_inferiors): Declare.
984 (add_thread): Adjust to use ptid_t.
985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
986 (add_process, remove_process, find_thread_pid): Declare.
987 (find_inferior_id): Adjust to use ptid_t.
988 (cont_thread, general_thread, step_thread): Change type to ptid_t.
989 (multi_process): Declare.
990 (push_event): Adjust to use ptid_t.
991 (read_ptid, write_ptid): Declare.
992 (prepare_resume_reply): Adjust to use ptid_t.
993 (clear_symbol_cache): Declare.
994 * inferiors.c (all_processes): New.
995 (null_ptid, minus_one_ptid): New.
996 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
997 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
998 (add_thread): Change unsigned long to ptid. Remove gdb_id
1000 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1001 (gdb_id_to_thread): Rename to ...
1002 (find_thread_pid): ... this. Change unsigned long to ptid.
1003 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1004 (loaded_dll, pull_pid_from_list): Adjust.
1005 (add_process, remove_process, find_process_pid)
1006 (get_thread_process, current_process, initialize_inferiors): New.
1007 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1008 (struct target_waitstatus) <related_pid>: Ditto.
1009 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1011 (struct target_ops) <join>: Add `pid' argument.
1012 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1013 (struct target_ops) <wait>: Add `ptid' field. Change return type
1015 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1016 (mywait): Add `ptid' argument. Change return type to ptid_t.
1017 (target_pid_to_str): Declare.
1018 * target.c (set_desired_inferior): Adjust to use ptids.
1019 (mywait): Add new `ptid' argument. Adjust.
1020 (target_pid_to_str): New.
1021 * mem-break.h (free_all_breakpoints): Declare.
1022 * mem-break.c (breakpoints): Delelete.
1023 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1024 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1025 to use per-process breakpoint list.
1026 (free_all_breakpoints): New.
1027 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1028 (symbol_cache, all_symbols_looked_up): Delete.
1030 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1032 (prepare_resume_reply): Change ptid argument's type from unsigned
1033 long to ptid_t. Adjust. Implement W;process and X;process.
1034 (free_sym_cache, clear_symbol_cache): New.
1035 (look_up_one_symbol): Adjust to per-process symbol cache. *
1036 * server.c (cont_thread, general_thread, step_thread): Change type
1039 (multi_process): New.
1040 (last_ptid): Change type to ptid_t.
1041 (struct vstop_notif) <ptid>: Change type to ptid_t.
1042 (queue_stop_reply, push_event): Change `ptid' argument's type to
1044 (discard_queued_stop_replies): Add `pid' argument.
1045 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1046 changes. Don't reference the `attached' global.
1047 (attach_inferior): Adjust to mywait interface changes.
1048 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1049 features. Handle and report "multiprocess+". Handle
1051 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1053 (handle_v_kill): New.
1054 (handle_v_stopped): Adjust to use target_pid_to_str.
1055 (handle_v_requests): Allow multiple attaches and runs when
1056 multiprocess extensions are in effect. Handle "vKill".
1057 (myresume): Adjust to use ptids.
1058 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1059 (handle_status): Adjust to discard_queued_stop_replies interface
1061 (first_thread_of, kill_inferior_callback)
1062 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1063 (main): Call initialize_inferiors. Adjust to use ptids, killing
1064 and detaching from all inferiors. Handle multiprocess packet
1066 * linux-low.h: Include gdb_proc_service.h.
1067 (struct process_info_private): New.
1068 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1069 <lwpid_of>: Use ptid_get_lwp.
1070 (get_lwp_thread): Adjust.
1071 (struct lwp_info): Add `dead' member.
1072 (find_lwp_pid): Declare.
1073 * linux-low.c (thread_db_active): Delete.
1074 (new_inferior): Adjust comment.
1075 (inferior_pid): Delete.
1076 (linux_add_process): New.
1077 (handle_extended_wait): Adjust.
1078 (add_lwp): Change unsigned long to ptid.
1079 (linux_create_inferior): Add process to processes table. Adjust
1080 to use ptids. Don't set new_inferior here.
1081 (linux_attach_lwp): Rename to ...
1082 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1083 it. Adjust to use ptids.
1084 (linux_attach_lwp): New.
1085 (linux_attach): Add process to processes table. Don't set
1087 (struct counter): New.
1088 (second_thread_of_pid_p, last_thread_of_process_p): New.
1089 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1091 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1092 processes. Remove process from process table.
1093 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1094 to multiple processes.
1095 (any_thread_of): New.
1096 (linux_detach): Add `pid' argument, and handle it. Remove process
1097 from processes table.
1098 (linux_join): Add `pid' argument. Handle it.
1099 (linux_thread_alive): Change unsighed long argument to ptid_t.
1100 Consider dead lwps as not being alive.
1101 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1102 threads we're not interested in.
1103 (same_lwp, find_lwp_pid): New.
1104 (linux_wait_for_lwp): Change `pid' argument's type from int to
1106 (linux_wait_for_event): Rename to ...
1107 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1108 from int to ptid_t. Adjust.
1109 (linux_wait_for_event): New.
1110 (linux_wait_1): Add `ptid' argument. Change return type to
1111 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1112 that exit from the process table.
1113 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1115 (mark_lwp_dead): New.
1116 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1117 stopping all threads, mark its main lwp as dead.
1118 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1120 (fetch_register, usr_store_inferior_registers)
1121 (regsets_fetch_inferior_registers)
1122 (regsets_store_inferior_registers, linux_read_memory)
1123 (linux_write_memory): Inline `inferior_pid'.
1124 (linux_look_up_symbols): Adjust to use per-process
1126 (linux_request_interrupt): Adjust to use ptids.
1127 (linux_read_auxv): Inline `inferior_pid'.
1128 (initialize_low): Don't reference thread_db_active.
1129 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1130 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1131 (ps_getpid): Return the pid of the current inferior.
1132 * thread-db.c (proc_handle, thread_agent): Delete.
1133 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1135 (find_one_thread): Change argument type to ptid_t. Adjust to
1137 (maybe_attach_thread): Adjust to per-process data and ptids.
1138 (thread_db_find_new_threads): Ditto.
1139 (thread_db_init): Ditto.
1140 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1141 processes table. Adjust to use ptids.
1142 (spu_kill, spu_detach): Adjust interface. Remove process from
1144 (spu_join, spu_thread_alive): Adjust interface.
1145 (spu_wait): Adjust interface. Remove process from processes
1146 table. Adjust to use ptids.
1147 * win32-low.c (current_inferior_tid): Delete.
1148 (current_inferior_ptid): New.
1149 (debug_event_ptid): New.
1150 (thread_rec): Take a ptid. Adjust.
1151 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1152 (child_delete_thread): Ditto.
1153 (do_initial_child_stuff): Add `attached' argument. Add process to
1155 (child_fetch_inferior_registers, child_store_inferior_registers):
1157 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1158 (win32_attach): Pass 1 to do_initial_child_stuff.
1159 (win32_kill): Adjust interface. Remove process from processes
1161 (win32_detach): Ditto.
1162 (win32_join): Adjust interface.
1163 (win32_thread_alive): Take a ptid.
1164 (win32_resume): Adjust to use ptids.
1165 (get_child_debug_event): Ditto.
1166 (win32_wait): Adjust interface. Remove exiting process from
1169 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1171 Non-stop mode support.
1173 * server.h (non_stop): Declare.
1174 (gdb_client_data, handler_func): Declare.
1175 (delete_file_handler, add_file_handler, start_event_loop):
1177 (handle_serial_event, handle_target_event, push_event)
1178 (putpkt_notif): Declare.
1179 * target.h (enum resume_kind): New.
1180 (struct thread_resume): Replace `step' field by `kind' field.
1181 (TARGET_WNOHANG): Define.
1182 (struct target_ops) <wait>: Add `options' argument.
1183 <supports_non_stop, async, start_non_stop>: New fields.
1184 (target_supports_non_stop, target_async): New.
1185 (start_non_stop): Declare.
1186 (mywait): Add `options' argument.
1187 * target.c (mywait): Add `options' argument. Print child exit
1189 (start_non_stop): New.
1190 * server.c (non_stop, own_buf, mem_buf): New globals.
1191 (struct vstop_notif): New.
1192 (notif_queue): New global.
1193 (queue_stop_reply, push_event, discard_queued_stop_replies)
1194 (send_next_stop_reply): New.
1195 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1197 (attach_inferior): In non-stop mode, don't wait for the target
1199 (handle_general_set): Handle QNonStop.
1200 (handle_query): When handling qC, return the current general
1201 thread, instead of the first thread of the list.
1202 (handle_query): If the backend supports non-stop mode, include
1203 QNonStop+ in the qSupported query response.
1204 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1206 (handle_v_attach, handle_v_run): Handle non-stop mode.
1207 (handle_v_stopped): New.
1208 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1209 (myresume): Adjust to use resume_kind. Handle non-stop.
1210 (queue_stop_reply_callback): New.
1211 (handle_status): Handle non-stop mode.
1212 (main): Clear non_stop flag on reconnection. Use the event-loop.
1213 Refactor serial protocol handling from here ...
1214 (process_serial_event): ... to this new function. When GDB
1215 selects any thread, select one here. In non-stop mode, wait until
1216 GDB acks all pending events before exiting.
1217 (handle_serial_event, handle_target_event): New.
1218 * remote-utils.c (remote_open): Install remote_desc in the event
1220 (remote_close): Remove remote_desc from the event loop.
1221 (putpkt_binary): Rename to...
1222 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1223 (putpkt_binary): New as wrapper around putpkt_binary_1.
1224 (putpkt_notif): New.
1225 (prepare_resume_reply): In non-stop mode, don't change the
1227 * event-loop.c: New.
1228 * Makefile.in (OBJ): Add event-loop.o.
1229 (event-loop.o): New rule.
1231 * linux-low.h (pid_of): Moved here.
1233 (get_lwp_thread): Use lwpid_of.
1234 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1235 * linux-low.c (pid_of): Delete.
1236 (inferior_pid): Use lwpid_of.
1237 (linux_event_pipe): New.
1238 (target_is_async_p): New.
1240 (handle_extended_wait): Use lwpid_of.
1241 (add_lwp): Don't set lwpid field.
1242 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1243 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1244 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1245 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1246 first. Adjust to linux_wait_for_event interface changes. Use
1248 (linux_detach): Don't delete the main lwp here.
1249 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1250 (status_pending_p): Don't consider explicitly suspended lwps.
1251 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1252 pointer. Add OPTIONS argument. Change return type to int. Use
1253 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1254 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1255 pointer. Add status pointer argument. Return a pid instead of a
1256 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1257 changes. In non-stop mode, don't switch to a random thread.
1258 (linux_wait): Rename to...
1259 (linux_wait_1): ... this. Add target_options argument, and handle
1260 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1261 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1262 clean exit and signal exit code. Don't stop all threads in
1263 non-stop mode. In all-stop mode, only stop all threads when
1264 reporting a stop to GDB. Handle explicit thread stop requests.
1265 (async_file_flush, async_file_mark): New.
1267 (send_sigstop): Use lwpid_of.
1268 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1269 interface changes. In non-stop mode, don't switch to a random
1271 (linux_resume_one_lwp): Use lwpid_of.
1272 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1273 (linux_resume_one_thread): ... this. Handle resume_stop. In
1274 non-stop mode, don't look for pending flag in all threads.
1275 (resume_status_pending_p): Don't consider explicitly suspended
1277 (my_waitpid): Reimplement. Emulate __WALL.
1278 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1280 (sigchld_handler, linux_supports_non_stop, linux_async)
1281 (linux_start_non_stop): New.
1282 (linux_target_ops): Register linux_supports_non_stop, linux_async
1283 and linux_start_non_stop.
1284 (initialize_low): Install SIGCHLD handler.
1285 * thread-db.c (thread_db_create_event, find_one_thread)
1286 (thread_db_get_tls_address): Use lwpid_of.
1287 * win32-low.c (win32_detach): Adjust to use resume_kind.
1288 (win32_wait): Add `options' argument.
1289 * spu-low.c (spu_resume): Adjust to use resume_kind.
1290 (spu_wait): Add `options' argument.
1292 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1294 Decouple target code from remote protocol.
1296 * target.h (enum target_waitkind): New.
1297 (struct target_waitstatus): New.
1298 (struct target_ops) <wait>: Return an unsigned long. Take a
1299 target_waitstatus pointer instead of a char pointer.
1301 * target.c (mywait): Change prototype to return an unsigned long.
1302 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1303 * server.h (thread_from_wait, old_thread_from_wait): Delete
1305 (prepare_resume_reply): Change prototype to take a
1307 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1308 (last_status, last_ptid): New.
1309 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1310 pid instead of a signal.
1311 (attach_inferior): Remove "status" and "signal" parameters.
1313 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1315 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1316 (handle_v_requests, myresume): Remove "status" and "signal"
1318 (handle_status): New.
1319 (main): Delete local `status'. Adjust.
1320 * remote-utils.c: Include target.h.
1321 (prepare_resume_reply): Change prototype to take a
1322 target_waitstatus. Adjust.
1324 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1326 * spu-low.c (spu_wait): Adjust.
1327 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1329 (win32_wait): Adjust.
1331 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1333 * target.h (struct thread_resume): Delete leave_stopped member.
1334 (struct target_ops): Add a `n' argument to the `resume' callback.
1335 * server.c (start_inferior): Adjust.
1336 (handle_v_cont, myresume): Adjust.
1337 * linux-low.c (check_removed_breakpoint): Adjust to resume
1338 interface change, and to removed leave_stopped field.
1339 (resume_ptr): Delete.
1340 (struct thread_resume_array): New.
1341 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1342 resume interface change.
1343 (linux_continue_one_thread, linux_queue_one_thread)
1344 (resume_status_pending_p): Check if the resume field is NULL
1345 instead of checking the leave_stopped member.
1346 (linux_resume): Adjust to the target resume interface change.
1347 * spu-low.c (spu_resume): Adjust to the target resume interface
1349 * win32-low.c (win32_detach, win32_resume): Ditto.
1351 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1353 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1355 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1357 (linux_continue_one_thread): Only preserve the stepping flag if
1358 there's a pending breakpoint.
1360 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1362 * server.c (main): After the inferior having exited, call
1363 remote_close before exiting gdbserver.
1365 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1367 Fix size of FPSCR in Power 7 processors.
1368 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1369 (PPC_FEATURE_HAS_DFP): New #define.
1370 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1373 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1375 * server.c (handle_query) Whitespace and formatting.
1377 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1379 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1380 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1381 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1382 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1383 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1384 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1385 Makefile.in, configure.ac: Fix whitespace throughout.
1386 * configure: Regenerate.
1388 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1390 * inferiors.c (find_inferior): Make it safe for the callback
1391 function to delete the currently iterated inferior.
1393 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1395 * Makefile.in (linuw_low_h): Move higher.
1396 (thread-db.o): Depend on $(linux_low_h).
1398 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1400 Rename "process" to "lwp" throughout.
1402 * linux-low.c (all_processes): Rename to...
1403 (all_lwps): ... this.
1404 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1405 (add_process): Rename to ...
1406 (add_lwp): ... this. Adjust.
1407 (linux_create_inferior): Adjust.
1408 (linux_attach_lwp): Adjust.
1409 (linux_attach): Adjust.
1410 (linux_kill_one_process): Rename to ...
1411 (linux_kill_one_lwp): ... this. Adjust.
1412 (linux_kill): Adjust.
1413 (linux_detach_one_process): Rename to ...
1414 (linux_detach_one_lwp): ... this. Adjust.
1415 (linux_detach): Adjust.
1416 (check_removed_breakpoint): Adjust.
1417 (status_pending_p): Adjust.
1418 (linux_wait_for_process): Rename to ...
1419 (linux_wait_for_lwp): ... this. Adjust.
1420 (linux_wait_for_event): Adjust.
1421 (send_sigstop): Adjust.
1422 (wait_for_sigstop): Adjust.
1423 (stop_all_processes): Rename to ...
1424 (stop_all_lwps): ... this.
1425 (linux_resume_one_process): Rename to ...
1426 (linux_resume_one_lwp): ... this. Adjust.
1427 (linux_set_resume_request, linux_continue_one_thread)
1428 (linux_queue_one_thread, resume_status_pending_p)
1429 (usr_store_inferior_registers, regsets_store_inferior_registers)
1430 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1432 * linux-low.h (get_process): Rename to ...
1433 (get_lwp): ... this. Adjust.
1434 (get_thread_process): Rename to ...
1435 (get_thread_lwp): ... this. Adjust.
1436 (get_process_thread): Rename to ...
1437 (get_lwp_thread): ... this. Adjust.
1438 (struct process_info): Rename to ...
1439 (struct lwp_info): ... this.
1440 (all_processes): Rename to ...
1441 (all_lwps): ... this.
1442 * proc-service.c (ps_lgetregs): Adjust.
1443 * thread-db.c (thread_db_create_event, find_one_thread)
1444 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1446 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1448 * server.c (handle_query): Handle "qAttached".
1450 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1452 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1453 GPLv3, update license URL.
1455 2009-03-01 Doug Evans <dje@google.com>
1457 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1458 (server_h): Add gdb_signals.h.
1459 (signals.o): Update.
1460 * server.h (target_signal_from_host,target_signal_to_host_p)
1461 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1463 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1465 * remote-utils.c (getpkt): Also generate remote-debug
1466 information if noack_mode is set.
1468 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1470 * server.c (handle_query): Report qXfer:siginfo:read and
1471 qXfer:siginfo:write as supported and handle them.
1472 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1473 * linux-low.c (linux_xfer_siginfo): New.
1474 (linux_target_ops): Set it.
1476 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1478 * server.c (gdbserver_usage): Mention --remote-debug.
1479 (main): Accept '--remote-debug' switch.
1481 2009-01-18 Doug Evans <dje@google.com>
1483 * regcache.c (new_register_cache): No need to check result of xcalloc.
1484 * server.c (handle_search_memory): Back out calls to xmalloc,
1485 result is checked and error is returned to user upon failure.
1486 (handle_query): Ditto. Add more checks for result of malloc.
1487 (handle_v_cont): Check result of malloc, report error back to
1489 (handle_v_run): Ditto. Call freeargv.
1490 * server.h (freeargv): Declare.
1491 * utils.c (freeargv): New fn.
1493 2009-01-15 Doug Evans <dje@google.com>
1495 * gdbreplay.c (perror_with_name): Make arg const char *.
1496 * server.h (target_signal_to_name): Make return type const char *.
1497 * thread-db.c (thread_db_err_str): Make return type const char *.
1498 * utils.c (perror_with_name): Make arg const char *.
1500 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1502 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1503 when handling a EXIT_PROCESS_DEBUG_EVENT.
1505 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1507 * gdbreplay.c (gdbreplay_version): Update copyright year.
1508 * server.c (gdbserver_version): Likewise.
1510 2009-01-05 Doug Evans <dje@google.com>
1512 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1513 (handle_extended_wait): Improve comment.
1515 2008-12-13 Doug Evans <dje@google.com>
1517 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1518 * server.h (ATTR_MALLOC): New macro.
1519 (xmalloc,xcalloc,xstrdup): Declare.
1520 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1521 * inferiors.c: Ditto.
1522 * linux-low.c: Ditto.
1523 * mem-break.c: Ditto.
1524 * regcache.c: Ditto.
1525 * remote-utils.c: Ditto.
1528 * win32-low.c: Ditto.
1530 2008-12-12 Doug Evans <dje@google.com>
1532 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1533 in debugging printf.
1535 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1537 2008-12-09 Doug Evans <dje@google.com>
1539 * linux-low.h (struct process_info): Delete member tid, unused.
1540 * thread-db.c (find_one_thread): Update.
1541 (maybe_attach_thread): Update.
1543 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1545 * target.h (struct target_ops): Add qxfer_osdata member.
1546 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1548 (linux_qxfer_osdata): New functions.
1549 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1551 * server.c (handle_query): Handle "qXfer:osdata:read:".
1552 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1553 (buffer_xml_printf): New functions.
1554 * server.h (struct buffer): New.
1555 (buffer_grow_str, buffer_grow_str0): New macros.
1556 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1557 (buffer_xml_printf): Declare.
1559 2008-11-24 Doug Evans <dje@google.com>
1561 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1563 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1565 * server.c (handle_v_run): Always use the supplied argument list.
1567 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1569 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1570 (xtensa_regmap_table): Add entry for scompare1.
1572 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1574 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1575 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1576 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1577 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1578 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1579 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1580 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1581 XML target descriptions.
1582 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1583 when inferior is running on an ISA 2.05 or later processor. Add
1584 special case to return offset for full 64-bit slot of FPSCR when
1587 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1589 * Makefile.in (SFILES, clean): Added sparc64 files.
1590 (reg-sparc64.o, reg-sparc64.c): New.
1591 * configure.srv (sparc*-*-linux*): New configuration.
1592 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1593 syscall arguments for SPARC.
1594 (regsets_store_inferior_registers): Likewise.
1595 * linux-sparc-low.c: New file.
1597 2008-10-21 Doug Evans <dje@google.com>
1599 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1600 (READLINE_DIR,READLINE_DEP): Delete.
1601 (INTERNAL_CFLAGS): Update.
1602 (LINTFLAGS): Update.
1604 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1606 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1607 whole argv from the last run, not just argv[0].
1609 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1611 * regcache.c (new_register_cache): Return NULL if the register
1612 cache size isn't known yet.
1613 (free_register_cache): Avoid dereferencing a NULL regcache.
1615 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1617 * configure.srv: Merge MIPS and MIPS64.
1619 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1621 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1623 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1625 * Makefile.in: Add required vsx dependencies.
1627 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1628 Declare init_registers_powerpc_vsx32l.
1629 Declare init_registers_powerpc_vsx64l.
1630 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1631 (ppc_arch_setup): Check for VSX in hwcap.
1632 (ppc_fill_vsxregset): New function.
1633 (ppc_store_vsxregset): New function.
1634 Add new VSX entry in regset_info target_regsets.
1636 * configure.srv: Add new VSX dependencies.
1638 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1640 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1641 (remote_open): Set or clear transport_is_reliable.
1642 (putpkt_binary): Don't expect acks in noack mode.
1643 (getpkt): Don't send ack/nac in noack mode.
1644 * server.c (handle_general_set): Handle QStartNoAckMode.
1645 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1647 (main): Reset noack_mode on every connection.
1648 * server.h (noack_mode): Declare.
1650 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1652 * Makefile.in (GDBREPLAY_OBS): New variable.
1653 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1655 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1656 Daniel Jacobowitz <dan@codesourcery.com>
1658 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1659 (usr_store_inferior_registers): Likewise.
1660 (regsets_store_inferior_registers): Likewise.
1662 2008-07-31 Rolf Jansen <rj@surtec.com>
1663 Pedro Alves <pedro@codesourcery.com>
1665 * configure.ac: Check for memmem declaration.
1666 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1667 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1668 (disable_packet_qfThreadInfo): Unconditionally compile.
1669 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1670 * configure, config.in: Regenerate.
1672 2008-07-28 Doug Kwan <dougkwan@google.com>
1674 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1675 (linux_write_memory): Remove declaration of errno.
1677 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1679 * linux-low.c (handle_extended_wait): Do not use "status"
1680 variable uninitialized.
1682 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1684 * server.c (handle_v_attach): Inhibit reporting dll changes.
1686 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1688 * remote-utils.c (prepare_resume_reply): If requested, don't
1689 output "thread:TID" in the T stop reply.
1691 * server.c (disable_packet_vCont, disable_packet_Tthread)
1692 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1693 (handle_query): If requested, disable support for qC, qfThreadInfo
1695 (handle_v_requests): If requested, disable support for vCont.
1696 (gdbserver_show_disableable): New.
1697 (main): Handle --disable-packet and --disable-packet=LIST.
1699 * server.h (disable_packet_vCont, disable_packet_Tthread)
1700 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1702 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1704 * server.c (gdbserver_usage): Mention --version.
1706 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1708 * Makefile.in (gdbreplay.o): New rule.
1710 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1712 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1713 message, not gdbserver.
1715 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1716 Nathan Sidwell <nathan@codesourcery.com>
1717 Joseph Myers <joseph@codesourcery.com>
1719 * acinclude.m4: Include ../../config/acx.m4.
1720 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1721 * configure, config.in: Regenerate.
1722 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1723 * server.c (gdbserver_version): Print PKGVERSION.
1724 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1725 (main): Adjust gdbserver_usage calls.
1726 * gdbreplay.c (version, host_name): Add declarations.
1727 (gdbreplay_version, gdbreplay_usage): New.
1728 (main): Accept --version and --help options.
1730 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1732 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1733 (arm_breakpoint_at): Handle Thumb.
1734 (the_low_target): Add comment.
1736 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1738 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1740 2008-05-09 Doug Evans <dje@google.com>
1742 * server.h (decode_search_memory_packet): Declare.
1743 * remote-utils.c (decode_search_memory_packet): New fn.
1744 * server.c (handle_search_memory_1): New fn.
1745 (handle_search_memory): New fn.
1746 (handle_query): Process qSearch:memory packets.
1748 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1750 * regcache.c (registers_length): Remove.
1751 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1752 full register packet.
1753 * regcache.h (registers_length): Remove prototype.
1754 * server.h (PBUFSIZ): Define to 16384.
1756 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1758 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1759 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1760 powerpc-64l.o, and powerpc-altivec64l.o.
1761 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1762 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1763 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1764 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1765 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1768 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1769 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1770 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1771 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1772 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1773 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1774 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1775 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1776 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1777 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1780 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1781 (init_registers_powerpc_32l): ... this new prototype.
1782 (init_registers_powerpc_32): Remove, replace by ...
1783 (init_registers_powerpc_altivec32l): ... this new prototype.
1784 (init_registers_powerpc_e500): Remove, replace by ...
1785 (init_registers_powerpc_e500l): ... this new prototype.
1786 (init_registers_ppc64): Remove, replace by ...
1787 (init_registers_powerpc_64l): ... this new prototype.
1788 (init_registers_powerpc_64): Remove, replace by ...
1789 (init_registers_powerpc_altivec64l): ... this new prototype.
1790 (ppc_num_regs): Set to 73.
1791 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1792 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1793 (ppc_cannot_store_register): Handle orig_r3 and trap.
1794 (ppc_arch_setup): Update init_registers_... calls.
1795 (ppc_fill_gregset): Handle orig_r3 and trap.
1797 * inferiors.c (clear_inferiors): Reset current_inferior.
1799 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1801 * acinclude.m4: Add override.m4.
1802 * configure: Regenerate.
1804 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1806 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1807 initial call to init_register_ppc64.
1809 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1811 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1812 powerpc*-*-linux* case.
1813 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1815 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1817 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1818 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1820 * linux-ppc-low.c: Include <elf.h>.
1821 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1822 (ppc_hwcap): New global variable.
1823 (ppc_regmap): Remove __SPE__ #ifdef sections.
1824 (ppc_regmap_e500): New global variable.
1825 (ppc_cannot_store_register): Update __SPE__ special case.
1826 (ppc_get_hwcap): New function.
1827 (ppc_arch_setup): Use it to determine whether inferior supports
1828 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1829 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1830 Do not access registers if target does not support AltiVec.
1831 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1832 Do not access registers if target does not support SPE.
1833 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1835 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1837 * linux-low.c (disabled_regsets, num_regsets): New.
1838 (use_regsets_p): Delete.
1839 (linux_wait_for_process): Clear disabled_regsets.
1840 (regsets_fetch_inferior_registers): Check and set it.
1841 (regsets_store_inferior_registers): Likewise.
1842 (linux_fetch_registers, linux_store_registers): Do not use
1844 (initialize_low): Allocate disabled_regsets.
1846 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1848 * Makefile.in (LIBOBJS): New.
1850 (memmem.o): New rule.
1851 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1852 * configure: Regenerated.
1854 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1856 * server.c (handle_query): Never return "unsupported" for
1857 qXfer:features:read queries.
1859 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1861 * server.c (get_features_xml): Fix inverted condition.
1862 (handle_query): Always support qXfer:feature:read.
1864 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1866 * server.c (wrapper_argv): New.
1867 (start_inferior): Handle wrapper_argv. If set, expect an extra
1869 (gdbserver_usage): Document --wrapper.
1870 (main): Parse --wrapper.
1872 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1874 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1875 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1876 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1877 (ppc_set_pc): Likewise.
1878 (ppc_arch_setup): New function.
1879 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1880 of collect_register.
1881 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1883 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1885 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1886 instead of linux-ppc64-low.o.
1887 * linux-ppc64-low.c: Remove file.
1888 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1889 (linux-ppc64-low.o): Remove rule.
1891 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1892 (init_registers_powerpc_64): Likewise.
1893 (ppc_regmap): Conditionally define depending on __powerpc64__.
1894 (ppc_cannot_store_register): Do not special-case "fpscr" when
1895 compiled on __powerpc64__.
1896 (ppc_collect_ptrace_register): New function.
1897 (ppc_supply_ptrace_register): New function.
1898 (ppc_breakpoint): Change type to "unsigned int".
1899 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1900 (the_low_target): Conditionally provide initializers for the
1901 arch_setup member depending on __powerpc64__. Install
1902 collect_ptrace_register and supply_ptrace_register members.
1904 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1906 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1907 * server.c (gdbserver_xmltarget): Define.
1908 (get_features_xml): Use it to replace "target.xml" and arch_string.
1910 * configure.srv: Remove srv_xmltarget. Add XML files that were
1911 mentioned there to srv_xmlfiles instead. Remove conditional tests
1912 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1913 srv_xmlfiles and srv_regobj to include all possible choices.
1914 * configure.ac (srv_xmltarget): Remove.
1915 (srv_xmlfiles): Do not add "target.xml".
1916 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1917 checks for supplementary target information.
1918 * configure: Regenerate.
1919 * Makefile.in (XML_TARGET): Remove.
1920 (target.xml): Remove rule.
1921 (clean): Do not clean up target.xml.
1922 (.PRECIOUS): Do not mention target.xml.
1924 * target.h (struct target_ops): Remove arch_string member.
1925 * linux-low.c (linux_arch_string): Remove.
1926 (linux_target_ops): Remove arch_string initializer.
1927 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1928 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1929 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1930 * spu-low.c (spu_arch_string): Remove.
1931 (spu_target_ops): Remove arch_string initializer.
1932 * win32-low.c (win32_arch_string): Remove.
1933 (win32_target_ops): Remove arch_string initializer.
1934 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1935 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1936 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1938 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1940 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1941 by collect_ptrace_register and supply_ptrace_register hooks.
1942 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1943 instead of checking for the_low_target.left_pad_xfer.
1944 (usr_store_inferior_registers): Use collect_ptrace_register callback
1945 instead of checking for the_low_target.left_pad_xfer.
1947 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1948 (s390_supply_ptrace_register): Likewise.
1949 (s390_fill_gregset): Call s390_collect_ptrace_register.
1950 (the_low_target): Update.
1952 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1953 (ppc_supply_ptrace_register): Likewise.
1954 (the_low_target): Update.
1956 * linux-i386-low.c (the_low_target): Update.
1957 * linux-x86-64-low.c (the_low_target): Update.
1959 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1961 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1962 reg-s390.o and reg-s390x.o.
1964 * linux-low.c (new_inferior): New global variable.
1965 (linux_create_inferior, linux_attach): Set it.
1966 (linux_wait_for_process): Call the_low_target.arch_setup after the
1967 target has stopped for the first time.
1968 (initialize_low): Do not call the_low_target.arch_setup.
1970 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1971 (s390_set_pc): Likewise.
1972 (s390_arch_setup): New function.
1973 (the_low_target): Use s390_arch_setup as arch_setup routine.
1975 * regcache.c (realloc_register_cache): New function.
1976 (set_register_cache): Call it for each existing regcache.
1978 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1980 * server.h (init_registers): Remove prototype.
1982 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1983 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1984 instead of init_registers ().
1985 * linux-arm-low.c (init_registers_arm): Add prototype.
1986 (init_registers_arm_with_iwmmxt): Likewise.
1987 (the_low_target): Add initializer for arch_setup field.
1988 * linux-cris-low.c (init_registers_cris): Add prototype.
1989 (the_low_target): Add initializer for arch_setup field.
1990 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1991 (the_low_target): Add initializer for arch_setup field.
1992 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1993 (the_low_target): Add initializer for arch_setup field.
1994 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1995 (the_low_target): Add initializer for arch_setup field.
1996 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1997 (the_low_target): Add initializer for arch_setup field.
1998 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1999 (the_low_target): Add initializer for arch_setup field.
2000 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2001 (init_registers_mips64_linux): Likewise.
2002 (the_low_target): Add initializer for arch_setup field.
2003 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2004 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2005 (the_low_target): Add initializer for arch_setup field.
2006 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2007 (init_registers_powerpc_64): Likewise.
2008 (the_low_target): Add initializer for arch_setup field.
2009 * linux-s390-low.c (init_registers_s390): Add prototype.
2010 (init_registers_s390x): Likewise.
2011 (the_low_target): Add initializer for arch_setup field.
2012 * linux-sh-low.c (init_registers_sh): Add prototype.
2013 (the_low_target): Add initializer for arch_setup field.
2014 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2015 (the_low_target): Add initializer for arch_setup field.
2016 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2017 (the_low_target): Add initializer for arch_setup field.
2019 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2020 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2021 instead of init_registers ().
2022 * win32-arm-low.c (init_registers_arm): Add prototype.
2023 (the_low_target): Add initializer for arch_setup field.
2024 * win32-i386-low.c (init_registers_i386): Add prototype.
2025 (the_low_target): Add initializer for arch_setup field.
2027 * spu-low.c (init_registers_spu): Add prototype.
2028 (initialize_low): Call initialie_registers_spu () instead of
2029 initialize_registers ().
2031 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2033 * server.c (handle_v_requests): When handling the vRun and vAttach
2034 packets, if already debugging a process, don't kill it. Return an
2037 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2039 * server.c (handle_query): Correct length check.
2041 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2043 * win32-low.c (do_initial_child_stuff): Add process handle
2044 parameter. Set current_process_handle and current_process_id from the
2045 parameters. Clear globals.
2046 (win32_create_inferior): Don't set current_process_handle and
2047 current_process_id here. Instead pass them on the call to
2048 do_initial_child_stuff.
2049 (win32_attach): Likewise.
2050 (win32_clear_inferiors): New.
2051 (win32_kill): Don't close the current process handle or the
2052 current thread handle here. Instead call win32_clear_inferiors.
2053 (win32_detach): Don't open a new handle to the process. Call
2054 win32_clear_inferiors.
2055 (win32_join): Don't rely on current_process_handle; open a new
2056 handle using the process id.
2057 (win32_wait): Call win32_clear_inferiors when the inferior process
2060 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2062 * server.c (monitor_show_help): Add "exit".
2064 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2066 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2067 (clean): Add reg-xtensa.c.
2068 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2069 * configure.srv (xtensa*-*-linux*) New target.
2070 * linux-xtensa-low.c: New.
2071 * xtensa-xtregs.c: New.
2073 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2075 * hostio.c: Don't include errno.h.
2076 (errno_to_fileio_errno): Move to hostio-errno.
2077 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2078 error number outputting to the target->hostio_last_error callback.
2079 (hostio_packet_error): Use FILEIO_EINVAL directly.
2080 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2081 calls to hostio_error.
2082 * hostio-errno.c: New.
2083 * server.h (hostio_last_error_from_errno): Declare.
2084 * target.h (target_ops): Add hostio_last_error member.
2085 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2086 as hostio_last_error handler.
2087 * spu-low.c (spu_target_ops): Likewise.
2088 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2089 (wince_hostio_last_error): New functions.
2090 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2091 as hostio_last_error handler.
2092 (win32_target_ops) [!_WIN32_WCE]: Register
2093 hostio_last_error_from_errno as hostio_last_error handler.
2094 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2095 (hostio-errno.o): New rule.
2096 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2097 * configure.srv (srv_hostio_err_objs): New variable. Default to
2099 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2100 * configure: Regenerate.
2102 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2104 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2105 (linux_kill, linux_detach): Clean up the process list.
2106 * remote-utils.c (remote_open): Improve port number parsing.
2107 (putpkt_binary, input_interrupt): Only send interrupts if the target
2109 * server.c (extended_protocol): Make static.
2110 (attached): Define earlier.
2111 (exit_requested, response_needed, program_argv): New variables.
2112 (target_running): New.
2113 (start_inferior): Clear attached here.
2114 (attach_inferior): Set attached here.
2115 (require_running): Define.
2116 (handle_query): Use require_running and target_running. Implement
2118 (handle_v_attach, handle_v_run): New.
2119 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2120 (gdbserver_usage): Update.
2121 (main): Redo argument parsing. Handle --debug and --multi. Handle
2122 --attach along with other options or after the port. Save
2123 program_argv. Support no initial program. Resynchronize
2124 communication with GDB after an error. Handle "monitor exit".
2125 Use require_running and target_running. Always allow the extended
2126 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2127 restart in extended mode.
2128 * README: Refer to the GDB manual. Update --attach usage.
2130 2007-12-20 Andreas Schwab <schwab@suse.de>
2132 * linux-low.c (STACK_SIZE): Define.
2133 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2134 (linux_test_for_tracefork): Likewise.
2136 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2138 * linux-low.c (linux_wait_for_event): Update messages. Do not
2139 reinsert auto-delete breakpoints.
2140 * mem-break.c (struct breakpoint): Change return type of handler to
2142 (set_breakpoint_at): Update handler type.
2143 (reinsert_breakpoint_handler): Return 1 instead of calling
2145 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2147 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2148 * mem-break.h (set_breakpoint_at): Update handler type.
2149 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2150 * win32-low.c (auto_delete_breakpoint): New.
2151 (get_child_debug_event): Use it.
2153 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2155 * configure.ac: Check for pread and pwrite.
2156 * hostio.c (handle_pread): Fall back to lseek and read.
2157 (handle_pwrite): Fall back to lseek and write.
2158 * config.in, configure: Regenerated.
2160 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2162 * server.c (myresume): Add own_buf argument.
2163 (main): Update calls.
2165 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2167 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2168 * remote-utils.c (remote_open): Do not call disable_async_io.
2169 (block_async_io): Delete.
2170 (unblock_async_io): Make static.
2171 (initialize_async_io): New.
2172 * server.c (handle_v_cont): Handle async I/O here.
2173 (myresume): Likewise. Move other common resume tasks here...
2174 (main): ... from here. Call initialize_async_io. Disable async
2175 I/O before the main loop.
2176 * server.h (initialize_async_io): Declare.
2177 (block_async_io, unblock_async_io): Delete prototypes.
2178 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2180 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2182 * remote-utils.c (readchar): Allow binary data in received messages.
2184 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2186 * win32-low.c (attaching): New global.
2187 (win32_create_inferior): Clear the `attaching' global.
2188 (win32_attach): Set the `attaching' global.
2189 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2190 attaching. Only set a breakpoint at the entry point if not
2193 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2195 * server.c (main): Don't report dll events on the initial
2196 connection on attaches.
2198 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2200 * server.c (main): Relax numerical bases supported for the pid of
2201 the --attach command line argument.
2203 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2205 * win32-low.c (win32_attach): Call OpenProcess before
2206 DebugActiveProcess, not after. Add last error output to error
2209 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2211 * win32-low.c (win32_get_thread_context)
2212 (win32_set_thread_context): New functions.
2213 (thread_rec): Use win32_get_thread_context.
2214 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2215 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2218 2007-12-03 Leo Zayas
2219 Pedro Alves <pedro_alves@portugalmail.pt>
2221 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2223 (child_add_thread): Minor cleanup.
2224 (child_continue): Resume artificially suspended threads before
2225 calling ContinueDebugEvent.
2226 (suspend_one_thread): New.
2227 (fake_breakpoint_event): New.
2228 (get_child_debug_event): Change return type to int. Check here if
2229 gdb sent an interrupt request. If a soft interrupt was requested,
2230 fake a breakpoint event. Return 0 if there is no event to handle,
2232 (win32_wait): Don't check here if gdb sent an interrupt request.
2233 Ensure there is a valid event to handle.
2234 (win32_request_interrupt): Add soft interruption method as last
2237 2007-12-03 Leo Zayas
2238 Pedro Alves <pedro_alves@portugalmail.pt>
2240 * win32-low.h (win32_thread_info): Add descriptions to the
2241 structure members. Replace `suspend_count' counter by a
2243 * win32-low.c (thread_rec): Update condition of when to get the
2244 context from the inferior. Rely on ContextFlags being set if it
2245 has already been retrieved. Only suspend the inferior thread if
2246 we haven't already. Warn if that fails.
2247 (continue_one_thread): s/suspend_count/suspended/. Only call
2248 ResumeThread once. Warn if that fails.
2250 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2252 * win32-low.c (win32_wait): Don't read from the inferior when it
2255 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2257 * Makefile.in (win32_low_h): New variable.
2258 (win32-low.o): Add dependency on $(win32_low_h).
2259 (win32-arm-low.o, win32-i386-low.o): New rules.
2261 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2263 * hostio.c: Correct copyright year.
2265 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2267 * Makefile.in (OBS): Add hostio.o.
2268 (hostio.o): New rule.
2269 * server.h (handle_vFile): Declare.
2270 * hostio.c: New file.
2271 * server.c (handle_v_requests): Take packet_len and new_packet_len
2272 for binary packets. Call handle_vFile.
2273 (main): Update call to handle_v_requests.
2275 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2277 * linux-low.c: Include <sched.h>.
2279 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2281 * linux-low.c (linux_tracefork_grandchild): New.
2282 (linux_tracefork_child): Use clone.
2283 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2285 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2287 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2289 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2291 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2293 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2295 * inferiors.c (change_inferior_id): Delete.
2296 (add_pid_to_list, pull_pid_from_list): New.
2297 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2298 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2299 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2300 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2301 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2302 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2303 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2304 (using_threads): Always set to 1.
2305 (handle_extended_wait): New.
2306 (add_process): Do not set TID.
2307 (linux_create_inferior): Set must_set_ptrace_flags.
2308 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2309 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2310 (linux_thread_alive): Rename TID argument to LWPID.
2311 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2312 (linux_wait_for_event): Do not use TID or check using_threads. Update
2313 call to dead_thread_notify. Call handle_extended_wait.
2314 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2315 (send_sigstop): Delete sigstop_sent.
2316 (wait_for_sigstop): Avoid TID.
2317 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2318 (linux_test_for_tracefork): New.
2319 (linux_lookup_signals): Use thread_db_active and
2320 linux_supports_tracefork_flag.
2321 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2322 * linux-low.h (get_process_thread): Avoid TID.
2323 (struct process_ifo): Move thread_known and tid to the end. Remove
2325 (linux_attach_lwp, thread_db_init): Update prototypes.
2326 * server.h (change_inferior_id): Delete prototype.
2327 (add_pid_to_list, pull_pid_from_list): New prototypes.
2328 * thread-db.c (thread_db_use_events): New.
2329 (find_first_thread): Rename to...
2330 (find_one_thread): ...this. Update callers and messages. Do not
2331 call fatal. Check thread_db_use_events. Do not call
2332 change_inferior_id or new_thread_notify.
2333 (maybe_attach_thread): Update. Do not call new_thread_notify.
2334 (thread_db_init): Set thread_db_use_events. Check use_events.
2335 * utils.c (fatal, warning): Correct message prefix.
2337 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2339 * Makefile.in (clean): Remove new files.
2340 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2341 (powerpc-64.o, powerpc-64.c): New rules.
2342 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2343 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2345 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2347 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2348 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2349 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2350 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2351 (target_regsets): Add AltiVec and SPE register sets.
2352 * configure.ac: Check for AltiVec and SPE.
2353 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2354 (ppc_fill_vrregset, ppc_store_vrregset): New.
2355 (target_regsets): Add AltiVec register set.
2356 * configure: Regenerated.
2358 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2360 * linux-low.c (O_LARGEFILE): Define.
2361 (linux_read_memory): Use /proc/PID/mem.
2362 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2363 * configure, config.in: Regenerated.
2365 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2367 * linux-low.c (linux_wait_for_event): Do not pass signals while
2370 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2372 * win32-low.c (create_process): New.
2373 (win32_create_inferior): Use create_process instead of
2374 CreateProcess. If create_process failed retry appending an ".exe"
2375 suffix. Store the GetLastError result immediatelly after
2376 create_process calls and use it on the call to error.
2378 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2380 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2382 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2384 * configure.ac: Switch license to GPLv3.
2386 2007-08-01 Michael Snyder <msnyder@access-company.com>
2388 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2390 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2392 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2394 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2395 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2396 CloseToolhelp32Snapshot.
2397 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2398 CloseToolhelp32Snapshot.
2400 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2402 * server.c (main): Check for inferior exit before main loop.
2404 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2406 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2407 instead of on tmp_desc.
2409 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2410 Daniel Jacobowitz <dan@codesourcery.com>
2412 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2413 (add_thread): Minor cleanups.
2414 (clear_inferiors): Move lower in the file. Clear the DLL
2416 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2417 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2418 (xml_escape_text): New.
2419 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2421 (handle_v_cont): Report errors.
2422 (gdbserver_version): Update.
2423 (main): Correct size of own_buf. Do not report initial DLL events.
2424 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2425 (unloaded_dll, xml_escape_text): New.
2426 * win32-low.c (enum target_waitkind): Update comments.
2427 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2428 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2429 (win32_EnumProcessModules, win32_GetModuleInformation)
2430 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2431 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2432 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2433 (win32_Module32First, win32_Module32Next, load_toolhelp)
2434 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2435 (get_child_debug_event): Handle DLL events.
2436 (win32_wait): Likewise.
2438 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2440 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2441 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2443 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2445 * win32-low.c (handle_output_debug_string): Ignore event if not
2448 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2450 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2452 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2454 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2456 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2458 * inferiors.c (change_inferior_id): Add comment.
2459 * linux-low.c (check_removed_breakpoint): Add an early
2460 prototype. Improve debug output.
2461 (linux_attach): Doc update.
2462 (linux_detach_one_process, linux_detach): Clean up before releasing
2464 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2465 * linux-low.h (struct process_info): Doc improvement.
2466 * mem-break.c (delete_all_breakpoints): New.
2467 * mem-break.h (delete_all_breakpoints): New prototype.
2468 * thread-db.c (find_first_thread): New.
2469 (thread_db_create_event): Call it instead of
2470 thread_db_find_new_threads. Clean up unused variables.
2471 (maybe_attach_thread): Remove first thread handling.
2472 (thread_db_find_new_threads): Use find_first_thread.
2473 (thread_db_get_tls_address): Likewise.
2475 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2477 * thread-db.c (thread_db_find_new_threads): Add prototype.
2478 (thread_db_create_event): Check for the main thread before adding
2480 (maybe_attach_thread): Only enable event reporting if TID == 0.
2481 (thread_db_get_tls_address): Check for new threads.
2483 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2485 * linux-low.c (linux_create_inferior): Try execv before execvp.
2486 * spu-low.c (spu_create_inferior): Likewise.
2488 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2490 * linux-low.c (linux_create_inferior): Change execv to execvp.
2491 * spu-low.c (spu_create_inferior): Likewies.
2493 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2495 * Makefile.in (clean): Clean new files instead of deleted ones.
2496 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2497 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2499 * configure.srv: Specify XML files and new regformats for MIPS and
2501 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2502 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2503 an entry for the restart register.
2504 (mips_cannot_fetch_register, mips_cannot_store_register)
2505 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2506 register names to match the XML descriptions.
2507 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2508 restart register instead of $0.
2510 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2511 Markus Deuling <deuling@de.ibm.com>
2513 * remote-utils.c (decode_xfer_write): New function.
2514 * server.h (decode_xfer_write): Add prototype.
2515 * server.c (handle_query): Add PACKET_LEN argument. Support
2516 qXfer:spu:read and qXfer:spu:write packets.
2517 (main): Pass packet_len to handle_query.
2518 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2519 * target.h (target_ops): Add qxfer_spu.
2521 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2523 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2524 accessing non-seekable spufs files.
2526 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2528 * server.c (handle_query): Add reply for qC packet.
2530 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2531 Leo Zayas <lerele@champenstudios@com>
2533 * server.h (check_remote_input_interrupt_request): New function.
2534 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2535 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2536 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2537 (check_remote_input_interrupt_request): New function.
2538 * server.h (check_remote_input_interrupt_request): Declare.
2539 * win32-low.c (winapi_DebugBreakProcess,
2540 winapi_GenerateConsoleCtrlEvent): New typedefs.
2541 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2543 (win32_wait): Check for remote interrupt request
2544 with check_remote_input_interrupt_request.
2545 (win32_request_interrupt): New function.
2546 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2548 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2550 * win32-low.c (debug_registers_changed,
2551 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2552 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2553 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2554 (thread_rec): Get context using the low target.
2555 (child_add_thread): Call thread_added on the low target,
2556 which does the same thing.
2558 (do_initial_child_stuff): Remove debug registers references.
2559 Set context using the low target. Resume threads after
2560 setting the contexts.
2561 (child_continue): Remove dead variable. Remove debug
2562 registers references.
2563 (child_fetch_inferior_registers): Go through the low target.
2564 (do_child_store_inferior_registers): Remove.
2565 (child_store_inferior_registers): Go through the low target.
2566 (win32_resume): Remove debug registers references.
2567 Set context using the low target.
2568 (handle_exception): Change return type to void. Don't record
2569 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2570 first chance exception.
2571 (get_child_debug_event): Change return type to void. Remove
2572 goto loop. Always return after waiting for debug event.
2573 (win32_wait): Convert to switch statement. Handle spurious
2576 * win32-i386-low.c (debug_registers_changed,
2577 debug_registers_used): New.
2578 (initial_stuff): Rename to ...
2579 (i386_initial_stuff): ... this. Clear debug registers
2581 (store_debug_registers): Delete.
2582 (i386_get_thread_context): New.
2583 (load_debug_registers): Delete.
2584 (i386_set_thread_context): New.
2585 (i386_thread_added): New.
2586 (single_step): Rename to ...
2587 (i386_single_step): ... this.
2588 (do_fetch_inferior_registers): Rename to ...
2589 (i386_fetch_inferior_register): ... this.
2590 (i386_store_inferior_register): New.
2591 (the_low_target): Adapt to new interface.
2593 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2594 (arm_get_thread_context): New.
2595 (arm_set_thread_context): New.
2597 (do_fetch_inferior_registers): Rename to ...
2598 (arm_fetch_inferior_register): ... this.
2599 (arm_store_inferior_register): New.
2600 (arm_wince_breakpoint): Reimplement as unsigned long.
2601 (arm_wince_breakpoint_len): Define.
2602 (the_low_target): Adapt to new interface.
2604 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2605 load_debug_registers. Add get_thread_context, set_thread_context,
2606 thread_added and store_inferior_register. Rename
2607 fetch_inferior_registers to fetch_inferior_register.
2608 (regptr): Remove declaration.
2610 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2612 * linux-low.c (linux_detach): Change return type to int. Return 0.
2613 * spu-low.c (spu_detach): Likewise.
2615 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2617 * target.h (target_ops): Change return type of detach to int.
2619 (join_inferior): New.
2620 * server.c (main): Don't skip detach support on mingw32.
2621 If the inferior doesn't support detaching return error.
2622 Call join_inferior instead of using waitpid.
2623 * linux-low.c (linux_join): New.
2624 (linux_target_op): Add linux_join.
2625 * spu-low.c (spu_join): New.
2626 (spu_target_ops): Add spu_join.
2627 * win32-low.c (win32_detach): Adapt to new interface.
2628 Reopen current_process_handle before detaching. Issue a child
2629 resume before detaching.
2631 (win32_target_op): Add win32_join.
2633 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2635 * win32-low.c (win32-attach): Fix return value.
2636 * target.h (target_ops): Describe ATTACH return values.
2638 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2640 * win32-low.c (GETPROCADDRESS): Define.
2641 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2642 (winapi_DebugSetProcessKillOnExit): Likewise.
2643 (win32_create_inferior): Force usage of ansi CreateProcessA.
2644 (win32_attach): Use GETPROCADDRESS.
2645 (win32_detach): Likewise.
2647 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2649 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2651 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2653 * win32-low.c: Commit leftover changes from 2007-03-29.
2655 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2657 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2658 fields short instead of int. Add explicit padding.
2659 (i387_cache_to_fsave): Remove unnecessary casts.
2660 (i387_fsave_to_cache): Doc fix.
2661 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2663 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2665 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2666 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2668 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2670 * configure.srv (arm*-*-mingw32ce*): Move near the other
2673 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2675 * configure.ac: Add errno checking.
2676 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2677 sys/file.h and malloc.h.
2678 (AC_CHECK_DECLS): Add perror.
2679 (srv_mingwce): Handle.
2680 * configure.srv (i[34567]86-*-cygwin*): Add
2681 win32-i386-low.o to srv_tgtobj.
2682 (i[34567]86-*-mingw*): Likewise.
2683 (arm*-*-mingw32ce*): Add case.
2684 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2685 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2686 [__MINGW32CE__] (strerror): New function.
2687 [__MINGW32CE__] (errno): Define to GetLastError.
2688 [__MINGW32CE__] (COUNTOF): New macro.
2689 (remote_open): Remove extra close call.
2690 * mem-break.c (delete_breakpoint_at): New function.
2691 * mem-break.h (delete_breakpoint_at): Declare.
2692 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2693 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2694 [USE_WIN32API] (read, write): Add char* casts.
2695 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2696 * server.h: Include wincecompat.h on Windows CE.
2697 [HAVE_ERRNO_H]: Check.
2698 (perror): Declare if not declared.
2699 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2700 (perror_with_name): Remove errno declaration.
2701 * wincecompat.h: New.
2702 * wincecompat.c: New.
2704 * win32-arm-low.c: New.
2705 * win32-i386-low.c: New.
2706 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2707 (OUTMSG2): Make it safe.
2709 (COUNTOF): New macro.
2710 (NUM_REGS): Get it from the low target.
2711 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2712 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2713 (thread_rec): Let low target handle debug registers.
2714 (child_add_thread): Likewise.
2715 (child_init_thread_list): Likewise.
2716 (continue_one_thread): Likewise.
2718 (do_child_fetch_inferior_registers): Move to ...
2719 * win32-i386-low.c: ... here, and rename to ...
2720 (do_fetch_inferior_registers): ... this.
2721 * win32-low.c (child_fetch_inferior_registers):
2722 Go through the low target.
2723 (do_child_store_inferior_registers): Use regptr.
2724 (strwinerror): New function.
2725 (win32_create_inferior): Handle Windows CE.
2726 Use strwinerror instead of strerror on Windows error
2727 codes. Add program to the error output.
2728 Don't close the main thread handle on Windows CE.
2729 (win32_attach): Use coredll.dll on Windows CE.
2730 (win32_kill): Close current process and current
2732 (win32_detach): Use coredll.dll on Windows CE.
2733 (win32_resume): Let low target handle debug registers, and
2735 (handle_exception): Add/Remove initial breakpoint. Avoid
2736 non-existant WSTOPSIG on Windows CE.
2737 (win32_read_inferior_memory): Cast to remove warning.
2738 (win32_arch_string): Go through the low target.
2739 (initialize_low): Call set_breakpoint_data with the low
2740 target's breakpoint.
2741 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2742 FOP_REGNUM, mappings): Move to ...
2743 * win32-i386-low.c: ... here.
2744 * win32-low.c (win32_thread_info): Move to ...
2745 * win32-low.h: ... here.
2746 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2747 win32-arm-low.c and wincecompat.c.
2748 (all:): Add $EXEEXT.
2749 (install-only:): Likewise.
2750 (gdbserver:): Likewise.
2751 (gdbreplay:): Likewise.
2752 * config.in: Regenerate.
2753 * configure: Regenerate.
2755 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2757 * win32-low.c: Rename typedef thread_info to
2758 win32_thread_info throughout.
2760 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2762 * win32-i386-low.c: Rename to ...
2763 * win32-low.c: ... this.
2764 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2765 * Makefile.in: Likewise.
2767 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2769 * remote-utils.c (monitor_output): Constify msg parameter.
2770 * server.h (monitor_output): Likewise.
2771 * win32-i386-low.c (handle_output_debug_string): New.
2772 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2773 handle_output_debug_string.
2774 (get_child_debug_event): Likewise.
2776 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2778 * server.c (main): Correct strtoul check.
2780 2007-03-27 Jon Ringle <jon@ringle.org>
2782 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2784 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2786 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2788 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2790 * terminal.h: Check HAVE_SGTTY_H.
2792 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2794 * remote-utils.c (remote_open): Print out the assigned port number.
2796 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2798 * remote-utils.c (monitor_output): New function.
2799 * server.c (debug_threads): Define here.
2800 (monitor_show_help): New function.
2801 (handle_query): Handle qRcmd.
2802 (main): Do not handle 'd' packet.
2803 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2804 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2807 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2809 * Makefile.in (EXEEXT): New.
2810 (clean): Use $(EXEEXT).
2812 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2814 * target.h (target_ops): Rename send_signal to request_interrupt,
2815 and remove enum target_signal parameter.
2816 * linux-low.c (linux_request_interrupt): Rename from
2817 linux_send_signal, and always send SIGINT.
2818 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2819 and always send SIGINT.
2820 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2822 (input_interrupt): Likewise.
2824 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2826 * server.c (get_features_xml): Check if target implemented
2828 * win32-i386-low.c (win32_arch_string): New.
2829 (win32_target_ops): Add win32_arch_string as arch_string member.
2831 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2833 * spu-low.c (spu_arch_string): New.
2834 (spu_target_ops): Add spu_arch_string.
2836 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2838 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2839 * configure.ac: Do not check for terminal.h.
2840 * configure, config.in: Regenerated.
2842 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2844 * Makefile.in (OBS): Add $(XML_BUILTIN).
2845 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2847 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2848 (arm-with-iwmmxt.c): New.
2849 * config.in, configure: Regenerate.
2850 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2851 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2852 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2853 (arm*-*-linux*): Add iWMMXt and regset support.
2854 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2855 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2856 (arm_store_wmmxregset, target_regsets): New.
2857 * server.c (get_features_xml): Take annex argument. Check builtin
2859 (handle_query): Handle multiple annexes.
2861 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2863 * remote-utils.c [USE_WIN32API] (read, write): Define.
2864 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2867 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2869 * linux-i386-low.c (the_low_target): Set arch_string.
2870 * linux-x86-64-low.c (the_low_target): Likewise.
2871 * linux-low.c (linux_arch_string): New.
2872 (linux_target_ops): Add it.
2873 * linux-low.h (struct linux_target_ops): Add arch_string.
2874 * server.c (write_qxfer_response): Use const void * for DATA.
2875 (get_features_xml): New.
2876 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2877 * target.h (struct target_ops): Add arch_string method.
2879 2007-01-03 Denis Pilat <denis.pilat@st.com>
2880 Daniel Jacobowitz <dan@codesourcery.com>
2882 * linux-low.c (linux_kill): Handle being called with no threads.
2883 * win32-i386-low.c (win32_kill): Likewise.
2884 (get_child_debug_event): Clear current_process_handle.
2886 2006-12-30 Denis PILAT <denis.pilat@st.com>
2887 Daniel Jacobowitz <dan@codesourcery.com>
2889 * remote-utils.c (remote_open): Check the type of specified
2890 serial port devices before opening them.
2891 * server.c (main): Kill the inferior if an error occurs during
2892 the first remote_open.
2894 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2896 * README: Update supported targets.
2898 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2900 * Makefile.in (clean): Remove reg-mips64.c.
2901 (reg-mips64.c, reg-mips64.o): New rules.
2902 * configure.srv: Handle mips64. Include regset support for mips.
2903 * linux-mips-low.c (union mips_register): New.
2904 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2905 (mips_breakpoint, mips_breakpoint_at): Use int.
2906 (mips_collect_register, mips_supply_register)
2907 (mips_collect_register_32bit, mips_supply_register_32bit)
2908 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2909 (mips_store_fpregset, target_regsets): New.
2910 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2912 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2914 * configure.srv: Add target "spu*-*-*".
2915 * Makefile.in (clean): Remove reg-spu.c.
2916 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2917 * spu-low.c: New file.
2919 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2921 * configure.ac: Correct td_thr_tls_get_addr test.
2922 * configure: Regenerated.
2924 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2926 * linux-low.c (linux_wait_for_event): Reformat. Use the
2928 * remote-utils.c (decode_address_to_semicolon): New.
2929 * server.c (pass_signals, handle_general_set): New.
2930 (handle_query): Mention QPassSignals for qSupported.
2931 (main): Call handle_general_set.
2932 * server.h (pass_signals, decode_address_to_semicolon): New.
2934 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2936 * server.c (handle_query): Correct error handling for read_auxv.
2938 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2940 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2941 and srv_linux_thread_db to yes.
2942 * linux-s390-low.c (s390_fill_gregset): New function.
2943 (target_regsets): Define data structure.
2945 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2947 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2948 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2949 * config.in, configure: Regenerated.
2950 * inferiors.c (gdb_id_to_thread): New function.
2951 (gdb_id_to_thread_id): Use it.
2952 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2953 * linux-low.h (struct process_info): Add th member.
2954 (thread_db_get_tls_address): New prototype.
2955 * remote-utils.c (decode_address): Make non-static.
2956 * server.c (handle_query): Handle qGetTLSAddr.
2957 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2958 * target.h (struct target_ops): Add get_tls_address.
2959 * thread-db.c (maybe_attach_thread): Save the thread handle.
2960 (thread_db_get_tls_address): New.
2962 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2964 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2965 (linux_resume_one_process): Take a siginfo_t *. Update all
2966 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2967 (struct pending_signals): Add a siginfo_t.
2968 (linux_wait_for_process): Always set last_status.
2969 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2970 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2971 * linux-low.h (struct process_info): Add last_status.
2973 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2975 * remote-utils.c (try_rle): New function.
2976 (putpkt_binary): Use it.
2978 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2980 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2981 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2982 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2983 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2984 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2987 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2989 * server.c (terminal_fd): New variable.
2990 (old_foreground_pgrp): Likewise.
2991 (restore_old_foreground_pgrp): New function.
2992 (start_inferior): Record the terminal file descriptor in terminal_fd
2993 and its original foreground group in old_foreground_pgrp. Register
2994 restore_old_foreground_pgrp with atexit().
2996 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2998 * server.c (handle_query): Correct qPart to qXfer.
3000 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3002 * configure.ac: Check for more headers which are missing on
3003 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3004 * configure.srv: Add Cygwin and mingw32.
3005 * remote-utils.c: Don't include headers unconditionally which
3006 are missing on mingw32. Include <winsock.h> for mingw32.
3007 (remote_open): Adjust for mingw32 support. Flush
3008 standard error after writing to it.
3009 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3010 (unblock_async_io, enable_async_io, disable_async_io)
3011 (readchar, getpkt): Update for Winsock support.
3012 (prepare_resume_reply): Expect a protocol signal number.
3013 * server.c: Disable <sys/wait.h> on mingw32.
3014 (start_inferior): Adjust for mingw32 support. Flush
3015 standard error after writing to it.
3016 (attach_inferior): Likewise. Use protocol signal
3018 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3020 * win32-i386-low.c: New file.
3021 * Makefile.in (XM_CLIBS): Set.
3022 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3023 (win32-i386-low.o): New dependency rule.
3024 * linux-low.c (linux_wait): Use target signal numbers.
3025 * target.h (struct target_ops): Doc fix.
3026 * server.h (target_signal_to_name): New prototype.
3027 * gdbreplay.c: Don't include headers unconditionally which
3028 are missing on mingw32. Include <winsock.h> for mingw32.
3029 (remote_close, remote_open): Adjust for Winsock support.
3030 * configure, config.in: Regenerated.
3032 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3034 * server.c (decode_xfer_read, write_qxfer_response): New.
3035 (handle_query): Take a packet length argument. Handle
3036 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3037 the qSupported response.
3038 (main): Update call to handle_query.
3040 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3042 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3043 (putpkt_binary): Renamed from putpkt and adjusted for binary
3045 (putpkt): New wrapper for putpkt_binary.
3046 (readchar): Don't mask off the high bit.
3047 (decode_X_packet): New function.
3048 * server.c (main): Call putpkt_binary if a handler sets the packet
3049 length. Save the length of the incoming packet. Handle 'X'.
3050 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3052 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3054 * server.c (handle_query): Handle qSupported.
3056 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3058 * remote-utils.c (all_symbols_looked_up): New variable.
3059 (look_up_one_symbol): Check it.
3060 * server.h (look_up_one_symbol): New declaration.
3061 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3063 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3065 * Makefile.in (linux-arm-low.o): Update dependencies.
3066 * linux-arm-low.c: Include "gdb_proc_service.h".
3067 (PTRACE_GET_THREAD_AREA): Define.
3068 (ps_get_thread_area): New function.
3070 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3072 * configure.srv (m68k*-*-uclinux*): New target.
3073 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3074 (linux_resume_one_process): Remove extraneous cast.
3075 (linux_read_offsets): New.
3076 (linux_target_op): Add linux_read_offsets on mmuless systems.
3077 * server.c (handle_query): Add qOffsets logic.
3078 * target.h (struct target_ops): Add read_offsets.
3080 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3082 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3083 (PTRACE_GET_THREAD_AREA): Define.
3084 (ps_get_thread_area): New function.
3085 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3086 (linux-x86-64-low.o): Update.
3088 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3090 * configure.ac: Remove checks for prfpregset_t.
3091 * gdb_proc_service.h: New file.
3092 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3093 new "gdb_proc_service.h".
3094 * proc-service.c: Likewise.
3095 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3096 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3097 * Makefile.in (gdb_proc_service_h): Updated.
3098 * configure, config.in: Regenerated.
3100 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3102 * remote-utils.c (prepare_resume_reply): Move declaration
3103 of gdb_id_from_wait to the top of the block.
3105 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3107 * linux-low.c (regsets_store_inferior_registers): Read the regset
3108 from the target before filling it.
3110 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3112 * server.c (attach_inferior): Return SIGTRAP for a successful
3115 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3117 * Makefile.in (OBS): Add version.o.
3118 (STAGESTUFF): Delete.
3119 (version.o): Add dependencies.
3120 (version.c): Replace rule.
3121 (clean): Remove version.c.
3122 * server.c (gdbserver_version): New.
3123 (gdbserver_usage): Use printf.
3124 (main): Handle --version and --help.
3125 * server.h (version, host_name): Add declarations.
3127 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3139 * linux-x86-64-low.c:
3142 * linux-ppc64-low.c:
3151 * linux-crisv32-low.c:
3163 * gdbserver.1: Add (C) after Copyright. Update the FSF
3166 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3168 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3169 (arm_breakpoint_at): Recognize both breakpoints.
3170 (the_low_target): Use the correct breakpoint instruction.
3172 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3174 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3175 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3176 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3177 (the_low_target): Update.
3179 2005-10-25 Andreas Schwab <schwab@suse.de>
3181 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3183 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3184 (ia64_num_regs): Reduce to 462.
3186 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3188 * acinclude.m4: Correct quoting.
3189 * aclocal.m4: Regenerated.
3191 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3192 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3193 (thread_db_init): Call thread_db_err_str.
3194 * configure.ac: Check for TD_VERSION.
3195 * config.in, configure: Regenerated.
3197 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3199 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3201 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3203 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3204 is not available. Define HAVE_PTRACE_GETREGS if it is.
3205 * config.in, configure: Regenerated.
3206 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3207 * linux-i386-low.c, linux-m68k-low.c: Update to use
3208 HAVE_PTRACE_GETREGS.
3209 * linux-low.c (regsets_fetch_inferior_registers)
3210 (regsets_store_inferior_registers): Only return 0 if we processed
3212 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3213 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3215 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3217 * inferiors.c (struct thread_info): Add gdb_id.
3218 (add_thread): Add gdb_id argument.
3219 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3220 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3221 calls to add_thread.
3222 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3223 * server.c (handle_query): Use thread_to_gdb_id.
3224 (handle_v_cont, main): Use gdb_id_to_thread_id.
3225 * server.h (add_thread): Update prototype.
3226 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3229 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3231 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3232 left-padded registers.
3233 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3234 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3236 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3238 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3239 * configure: Regenerate.
3240 * config.in: Regenerate.
3241 * server.h (NEED_DECLARATION_STRERROR):
3242 Replace with !HAVE_DECL_STRERROR.
3244 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3246 * linux-low.c (linux_wait, linux_send_signal): Don't test
3247 an unsigned long variable for > 0 if it could be MAX_ULONG.
3248 * server.c (myresume): Likewise.
3249 * target.c (set_desired_inferior): Likewise.
3251 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3253 * configure.ac: Simplify and improve check for socklen_t.
3254 * configure, config.in: Regenerate.
3256 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3258 * acconfig.h: Remove.
3259 * configure.ac: Add a test for socklen_t. Use three-argument
3260 AC_DEFINE throughout.
3261 * config.in: Regenerated using autoheader 2.59.
3262 * configure: Regenerated.
3264 * gdbreplay.c (socklen_t): Provide a default.
3265 (remote_open): Use socklen_t.
3266 * remote-utils.c (socklen_t): Provide a default.
3267 (remote_open): Use socklen_t.
3268 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3271 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3273 * linux-low.c (linux_read_memory, linux_write_memory)
3274 (linux_read_auxv): Likewise.
3275 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3276 (check_mem_write): Likewise.
3277 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3279 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3280 (registers_from_string, register_data): Likewise.
3281 * server.c (handle_query, main): Likewise.
3282 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3283 (decode_M_packet): Likewise.
3284 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3285 * target.h (struct target_ops): Update read_memory, write_memory,
3287 (read_inferior_memory, write_inferior_memory): Update.
3288 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3290 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3291 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3292 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3293 linux-s390-low.c, linux-sh-low.c: Update for changes in
3294 read_inferior_memory and the_low_target->breakpoint.
3296 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3298 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3299 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3300 * configure.srv: Add powerpc64-*-linux*.
3301 * linux-ppc64-low.c: New file.
3303 2005-05-23 Orjan Friberg <orjanf@axis.com>
3305 * linux-cris-low.c: New file with support for CRIS.
3306 * linux-crisv32-low.c: Ditto for CRISv32.
3307 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3308 (clean): Add reg-cris.c and reg-crisv32.c.
3309 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3310 reg-crisv32.o, and reg-crisv32.c to make rules.
3311 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3314 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3316 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3317 of sizeof (PTRACE_XFER_TYPE).
3318 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3320 2005-05-12 Orjan Friberg <orjanf@axis.com>
3322 * target.h (struct target_ops): Add insert_watchpoint,
3323 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3324 pointers for hardware watchpoint support.
3325 * linux-low.h (struct linux_target_ops): Ditto.
3326 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3327 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3328 to linux_target_ops.
3329 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3331 * server.c (main): Recognize 'Z' and 'z' packets.
3333 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3335 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3336 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3337 (the_low_target): Add new members.
3339 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3341 * proc-service.c (ps_lgetregs): Search all_processes instead of
3344 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3346 * server.c (start_inferior): Change return type to int.
3347 (attach_inferior): Change sigptr to int *.
3348 (handle_v_cont, handle_v_requests): Change signal to int *.
3349 (main): Change signal to int.
3351 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3353 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3354 * configure.srv: Add m32r*-*-linux*.
3355 * linux-m32r-low.c: New file.
3357 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3359 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3361 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3363 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3364 Take unsigned long arguments for PIDs.
3365 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3366 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3367 (wait_for_sigstop, linux_resume_one_process)
3368 (regsets_fetch_inferior_registers, linux_send_signal)
3369 (linux_read_auxv): Likewise. Update the types of variables holding
3370 PIDs. Update format string specifiers.
3371 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3372 * remote-utils.c (prepare_resume_reply): Likewise.
3373 * server.c (cont_thread, general_thread, step_thread)
3374 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3376 (handle_query): Update format specifiers.
3377 (handle_v_cont, main): Use strtoul for thread IDs.
3378 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3379 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3380 (general_thread, step_thread, thread_from_wait)
3381 (old_thread_from_wait): Update.
3382 * target.h (struct thread_resume): Use unsigned long for THREAD.
3383 (struct target_ops): Use unsigned long for arguments to attach and
3386 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3388 * acinclude.m4: Include bfd/bfd.m4 directly.
3389 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3390 <agriffis@toolchain.org>.
3391 * aclocal.m4, configure: Regenerated.
3393 2005-01-07 Andrew Cagney <cagney@gnu.org>
3395 * configure.ac: Rename configure.in, require autoconf 2.59.
3396 * configure: Re-generate.
3398 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3400 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3402 * aclocal.m4: Regenerated.
3403 * configure: Regenerated.
3405 2004-11-21 Andreas Schwab <schwab@suse.de>
3407 * linux-m68k-low.c (m68k_num_gregs): Define.
3408 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3409 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3410 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3411 (m68k_breakpoint_at): New. Add to the_low_target.
3413 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3414 srv_linux_thread_db to yes.
3416 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3418 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3419 (ARCH_SET_FS): Likewise.
3420 (ARCH_GET_FS): Likewise.
3421 (ARCH_GET_GS): Likewise.
3423 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3425 * linux-i386-low.c (ps_get_thread_area): New.
3426 * linux-x86-64-low.c (ps_get_thread_area): New.
3427 * linux-low.c: Include <sys/syscall.h>.
3428 (linux_kill_one_process): Don't kill the first thread here.
3429 (linux_kill): Kill the first thread here.
3430 (kill_lwp): New function.
3431 (send_sigstop, linux_send_signal): Use it.
3432 * proc-service.c: Clean up #ifdefs.
3433 (fpregset_info): Delete.
3434 (ps_lgetregs): Update and enable implementation.
3435 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3437 * remote-utils.c (struct sym_cache, symbol_cache): New.
3438 (input_interrupt): Print a clearer message.
3439 (async_io_enabled): New variable.
3440 (enable_async_io, disable_async_io): Use it. Update comments.
3441 (look_up_one_symbol): Use the symbol cache.
3442 * thread-db.c (thread_db_look_up_symbols): New function.
3443 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3445 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3447 * configure.in: Test for -rdynamic.
3448 * configure: Regenerated.
3449 * Makefile (INTERNAL_LDFLAGS): New.
3450 (gdbserver, gdbreplay): Use it.
3452 2004-09-02 Andrew Cagney <cagney@gnu.org>
3454 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3456 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3458 * linux-low.c (linux_wait): Clear all_processes list also.
3460 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3462 * linux-low.c: Include <errno.h>. Remove extern declaration of
3465 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3467 * gdbreplay.c, server.h, utils.c: Update copyright years.
3469 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3471 * server.c (main): Print child status or termination signal from
3472 variable 'signal', not 'sig'.
3474 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3476 * linux-low.c (linux_read_memory): Change return type to
3477 int. Check for and return error from ptrace().
3478 * target.c (read_inferior_memory): Change return type to int. Pass
3479 back return status from the_target->read_memory().
3480 * target.h (struct target_ops): Adapt *read_memory() prototype.
3482 (read_inferior_memory): Adapt prototype.
3483 * server.c (main): Return an error packet if
3484 read_inferior_memory() returns an error.
3486 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3488 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3489 Unify with other clean targets.
3491 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3493 * server.c (handle_v_cont): Call set_desired_inferior.
3495 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3497 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3499 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3501 * linux-low.c (linux_wait): Unblock async I/O.
3502 (linux_resume): Block and enable async I/O.
3503 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3504 * server.h (block_async_io, unblock_async_io): Add prototypes.
3506 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3508 * remote-utils.c (remote_open): Print a status notice after
3510 * server.c (attach_inferior): Print a status notice after
3513 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3515 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3517 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3519 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3521 * server.c, target.h: Update copyright years.
3523 2004-02-25 Roland McGrath <roland@redhat.com>
3525 * target.h (struct target_ops): New member `read_auxv'.
3526 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3527 * linux-low.c (linux_read_auxv): New function.
3528 (linux_target_ops): Initialize `read_auxv' member to that.
3530 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3532 Committed by Jim Blandy <jimb@redhat.com>.
3534 * linux-s390-low.c (s390_num_regs): Update.
3535 (s390_regmap): Remove control registers. Use __s390x__ predefine
3536 instead of GPR_SIZE to distiguish s390 and s390x targets.
3538 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3540 * linux-low.c: Update copyright year.
3541 (check_removed_breakpoint): Clear pending_is_breakpoint.
3542 (linux_set_resume_request, linux_queue_one_thread)
3543 (resume_status_pending_p): New functions.
3544 (linux_continue_one_thread): Use process->resume.
3545 (linux_resume): Only resume threads if there are no pending events.
3546 * linux-low.h (struct process_info): Add resume request
3549 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3551 * regcache.c (new_register_cache): Clear the allocated register
3552 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3554 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3556 * linux-low.c (linux_resume): Take a struct thread_resume *
3558 (linux_wait): Update call.
3559 (resume_ptr): New static variable.
3560 (linux_continue_one_thread): Renamed from
3561 linux_continue_one_process. Use resume_ptr.
3562 (linux_resume): Use linux_continue_one_thread.
3563 * server.c (handle_v_cont, handle_v_requests): New functions.
3564 (myresume): New function.
3565 (main): Handle 'v' case.
3566 * target.h (struct thread_resume): New type.
3567 (struct target_ops): Change argument of "resume" to struct
3569 (myresume): Delete macro.
3571 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3573 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3574 (uninstall): Support DESTDIR.
3576 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3578 * configure.srv: Add xscale*linux copy of arm*linux entry.
3580 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3582 * linux-arm-low.c (arm_reinsert_addr): New function.
3583 (the_low_target): Add arm_reinsert_addr.
3585 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3587 * mem-break.c: Remove whitespace at end of file.
3589 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3591 * configure.in: Check whether we need to prototype strerror.
3592 * server.h: Optionally prototype strerror.
3593 * gdbreplay.c (perror_with_name): Use strerror.
3594 * linux-low.c (linux_attach_lwp): Use strerror.
3595 * utils.c (perror_with_name): Use strerror.
3596 * config.in, configure: Regenerated.
3598 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3600 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3601 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3603 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3605 * Makefile.in (SFILES): Update.
3606 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3607 low-sun3.c: Remove files.
3609 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3611 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3612 (linux_detach_one_process, linux_detach): New functions.
3613 (linux_target_ops): Add linux_detach.
3614 * server.c (main): Handle 'D' packet.
3615 * target.h (struct target_ops): Add "detach" member.
3616 (detach_inferior): Define.
3618 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3620 From Kelley Cook <kelleycook@wideopenwest.com>:
3621 * configure.srv: Accept i[34567]86 variants.
3623 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3625 * linux-low.c (linux_wait_for_event): Correct comment typos.
3626 (linux_resume_one_process): Call check_removed_breakpoint.
3627 (linux_send_signal): New function.
3628 (linux_target_ops): Add linux_send_signal.
3629 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3631 * target.h (struct target_ops): Add send_signal.
3633 2003-05-29 Jim Blandy <jimb@redhat.com>
3635 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3636 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3637 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3638 away part of the register's value.
3640 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3642 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3643 (linux_wait_for_event, linux_init_signals): Likewise.
3645 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3647 * configure.in: Check for stdlib.h.
3648 * configure: Regenerated.
3649 * config.in: Regenerated.
3651 2003-01-04 Andreas Schwab <schwab@suse.de>
3653 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3655 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3657 * Makefile.in: Remove obsolete code.
3659 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3661 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3662 defined(PT_FPR0_HI).
3664 2002-11-17 Stuart Hughes <seh@zee2.com>
3666 * linux-arm-low.c (arm_num_regs): Increase.
3667 (arm_regmap): Include status register.
3669 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3671 * linux-low.c (register_addr): Remove incorrect -1 check.
3673 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3675 * linux-low.c (linux_create_inferior): Call setpgid. Return
3677 (unstopped_p, linux_signal_pid): Remove.
3678 (linux_target_ops): Remove linux_signal_pid.
3679 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3680 global instead of target method.
3681 * target.h (struct target_ops): Remove signal_pid. Update comment
3682 for create_inferior.
3683 * server.c (signal_pid): New variable.
3684 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3685 gdbserver. Set the child to be the foreground process group.
3686 (attach_inferior): Set signal_pid.
3688 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3690 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3692 2002-08-20 Jim Blandy <jimb@redhat.com>
3694 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3697 2002-08-01 Andrew Cagney <cagney@redhat.com>
3699 * Makefile.in: Make chill references obsolete.
3701 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3703 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3704 * configure: Regenerate.
3705 * config.in: Regenerate.
3707 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3709 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3710 (perror_with_name, remote_close, remote_open, expect, play): Static.
3712 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3714 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3715 byte offsets instead of an array of indexes.
3716 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3718 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3720 * regcache.c: Add comment.
3722 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3724 * thread-db.c: New file.
3725 * proc-service.c: New file.
3726 * acinclude.m4: New file.
3727 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3728 proc-service.o, and thread-db.o.
3729 (linux-low.o): Add USE_THREAD_DB.
3730 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3731 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3732 * aclocal.m4: Regenerated.
3733 * config.in: Regenerated.
3734 * configure: Regenerated.
3735 * configure.in: Check for proc_service.h, sys/procfs.h,
3736 thread_db.h, and linux/elf.h headrs.
3737 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3738 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3739 Check for -lthread_db and thread support.
3740 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3741 PowerPC, and SuperH.
3742 * i387-fp.c: Constify arguments.
3743 * i387-fp.h: Likewise.
3744 * inferiors.c: (struct thread_info): Renamed from
3745 `struct inferior_info'. Remove PID member. Use generic inferior
3746 list header. All uses updated.
3747 (inferiors, signal_pid): Removed.
3748 (all_threads): New variable.
3749 (get_thread): Define.
3750 (add_inferior_to_list): New function.
3751 (for_each_inferior): New function.
3752 (change_inferior_id): New function.
3753 (add_inferior): Removed.
3754 (remove_inferior): New function.
3755 (add_thread): New function.
3756 (free_one_thread): New function.
3757 (remove_thread): New function.
3758 (clear_inferiors): Use for_each_inferior and free_one_thread.
3759 (find_inferior): New function.
3760 (find_inferior_id): New function.
3761 (inferior_target_data): Update argument type.
3762 (set_inferior_target_data): Likewise.
3763 (inferior_regcache_data): Likewise.
3764 (set_inferior_regcache_data): Likewise.
3765 * linux-low.c (linux_bp_reinsert): Remove.
3766 (all_processes, stopping_threads, using_thrads)
3767 (struct pending_signals, debug_threads, pid_of): New.
3768 (inferior_pid): Replace with macro.
3769 (struct inferior_linux_data): Remove.
3770 (get_stop_pc, add_process): New functions.
3771 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3772 Use add_process and add_thread.
3773 (linux_attach_lwp): New function, based on old linux_attach. Use
3774 add_process and add_thread. Set stop_expected for new threads.
3775 (linux_attach): New function.
3776 (linux_kill_one_process): New function.
3777 (linux_kill): Kill all LWPs.
3778 (linux_thread_alive): Use find_inferior_id.
3779 (check_removed_breakpoints, status_pending_p): New functions.
3780 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3781 Update. Use WNOHANG. Wait for cloned processes also. Update process
3782 struct for the found process.
3783 (linux_wait_for_event): New function.
3784 (linux_wait): Use it. Support LWPs.
3785 (send_sigstop, wait_for_sigstop, stop_all_processes)
3786 (linux_resume_one_process, linux_continue_one_process): New functions.
3787 (linux_resume): Support LWPs.
3788 (REGISTER_RAW_SIZE): Remove.
3789 (fetch_register): Use register_size instead. Call supply_register.
3790 (usr_store_inferior_registers): Likewise. Call collect_register.
3792 (regsets_fetch_inferior_registers): Improve error message.
3793 (regsets_store_inferior_registers): Add debugging.
3794 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3795 (unstopped_p, linux_signal_pid): New functions.
3796 (linux_target_ops): Add linux_signal_pid.
3797 (linux_init_signals): New function.
3798 (initialize_low): Call it. Initialize using_threads.
3799 * regcache.c (inferior_regcache_data): Add valid
3801 (get_regcache): Fetch registers lazily. Add fetch argument
3802 and update all callers.
3803 (regcache_invalidate_one, regcache_invalidate): New
3805 (new_register_cache): Renamed from create_register_cache.
3806 Return the new regcache.
3807 (free_register_cache): Change argument to a void *.
3808 (registers_to_string, registers_from_string): Call get_regcache
3809 with fetch flag set.
3810 (register_data): Make static. Pass fetch flag to get_regcache.
3811 (supply_register): Call get_regcache with fetch flag clear.
3812 (collect_register): Call get_regcache with fetch flag set.
3813 (collect_register_as_string): New function.
3814 * regcache.h: Update.
3815 * remote-utils.c (putpkt): Flush after debug output and use
3817 Handle input interrupts while waiting for an ACK.
3818 (input_interrupt): Use signal_pid method.
3819 (getpkt): Flush after debug output and use stderr.
3820 (outreg): Use collect_register_as_string.
3821 (new_thread_notify, dead_thread_notify): New functions.
3822 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3824 (look_up_one_symbol): Flush after debug output.
3825 * server.c (step_thread, server_waiting): New variables.
3826 (start_inferior): Don't use signal_pid. Update call to mywait.
3827 (attach_inferior): Update call to mywait.
3828 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3829 (main): Don't fetch/store registers explicitly. Use
3830 set_desired_inferior. Support proposed ``Hs'' packet. Update
3833 (struct inferior_list, struct_inferior_list_entry): New.
3834 * target.c (set_desired_inferior): New.
3835 (write_inferior_memory): Constify.
3836 (mywait): New function.
3838 (struct target_ops): New signal_pid method.
3839 (mywait): Removed macro, added prototype.
3841 * linux-low.h (regset_func): Removed.
3842 (regset_fill_func, regset_store_func): New.
3843 (enum regset_type): New.
3844 (struct regset_info): Add type field. Use new operation types.
3845 (struct linux_target_ops): stop_pc renamed to get_pc.
3846 Add decr_pc_after_break and breakpoint_at.
3847 (get_process, get_thread_proess, get_process_thread)
3848 (strut process_info, all_processes, linux_attach_lwp)
3849 (thread_db_init): New.
3851 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3852 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3853 (the_low_target): Add new members.
3854 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3855 (i386_store_fpxregset): Constify.
3856 (target_regsets): Add new kind identifier.
3857 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3858 (i386_set_pc): Add debugging.
3859 (i386_breakpoint_at): New function.
3860 (the_low_target): Add new members.
3861 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3862 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3863 (mips_breakpoint_at): New.
3864 (the_low_target): Add new members.
3865 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3866 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3867 (the_low_target): Add new members.
3868 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3869 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3870 (the_low_target): Add new members.
3871 * linux-x86-64-low.c (target_regsets): Add new kind
3874 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3876 From Martin Pool <mbp@samba.org>:
3877 * server.c (gdbserver_usage): New function.
3880 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3882 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3885 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3887 * Makefile.in: Remove obsolete code.
3889 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3891 * linux-low.c (regsets_fetch_inferior_registers),
3892 (regsets_store_inferior_registers): Removed cast to int from
3894 * regcache.h: Added declaration of struct inferior_info.
3896 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3898 * inferiors.c (struct inferior_info): Add regcache_data.
3899 (add_inferior): Call create_register_cache.
3900 (clear_inferiors): Call free_register_cache.
3901 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3902 * regcache.c (struct inferior_regcache_data): New.
3903 (registers): Remove.
3904 (get_regcache): New function.
3905 (create_register_cache, free_register_cache): New functions.
3906 (set_register_cache): Don't initialize the register cache here.
3907 (registers_to_string, registers_from_string, register_data): Call
3909 * regcache.h: Add prototypes.
3910 * server.h: Likewise.
3912 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3914 * mem-break.c: New file.
3915 * mem-break.h: New file.
3916 * Makefile.in: Add mem-break.o rule; update server.h
3918 * inferiors.c (struct inferior_info): Add target_data
3920 (clear_inferiors): Free target_data member if set.
3921 (inferior_target_data, set_inferior_target_data): New functions.
3922 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3923 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3924 * linux-low.c (linux_bp_reinsert): New variable.
3925 (struct inferior_linux_data): New.
3926 (linux_create_inferior): Use set_inferior_target_data.
3927 (linux_attach): Likewise. Call add_inferior.
3928 (linux_wait_for_one_inferior): New function.
3929 (linux_wait): Call it.
3930 (linux_write_memory): Add const.
3931 (initialize_low): Call set_breakpoint_data.
3932 * linux-low.h (struct linux_target_ops): Add breakpoint
3934 * server.c (attach_inferior): Remove extra add_inferior
3936 * server.h: Include mem-break.h. Update inferior.c
3938 * target.c (read_inferior_memory)
3939 (write_inferior_memory): New functions.
3940 * target.h (read_inferior_memory)
3941 (write_inferior_memory): Change macros to prototypes.
3942 (struct target_ops): Update comments. Add const to write_memory
3945 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3947 * linux-low.c (usr_store_inferior_registers): Support
3948 registers which are allowed to fail to store.
3949 * linux-low.h (linux_target_ops): Likewise.
3950 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3951 (ppc_cannot_store_register): FPSCR may not be storable.
3953 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3955 * server.h: Include <string.h> if HAVE_STRING_H.
3956 * ChangeLog: Correct paths in last ChangeLog entry.
3958 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3960 * linux-low.h: Remove obsolete prototypes.
3961 (struct linux_target_ops): New.
3962 (extern the_low_target): New.
3963 * linux-low.c (num_regs, regmap): Remove declarations.
3964 (register_addr): Use the_low_target explicitly.
3965 (fetch_register): Likewise.
3966 (usr_fetch_inferior_registers): Likewise.
3967 (usr_store_inferior_registers): Likewise.
3968 * linux-arm-low.c (num_regs): Remove.
3969 (arm_num_regs): Define.
3970 (arm_regmap): Renamed from regmap, made static.
3971 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3973 (arm_cannot_store_register): Renamed from cannot_store_register,
3975 (the_low_target): New.
3976 * linux-i386-low.c (num_regs): Remove.
3977 (i386_num_regs): Define.
3978 (i386_regmap): Renamed from regmap, made static.
3979 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3981 (i386_cannot_store_register): Renamed from cannot_store_register,
3983 (the_low_target): New.
3984 * linux-ia64-low.c (num_regs): Remove.
3985 (ia64_num_regs): Define.
3986 (ia64_regmap): Renamed from regmap, made static.
3987 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3989 (ia64_cannot_store_register): Renamed from cannot_store_register,
3991 (the_low_target): New.
3992 * linux-m68k-low.c (num_regs): Remove.
3993 (m68k_num_regs): Define.
3994 (m68k_regmap): Renamed from regmap, made static.
3995 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3997 (m68k_cannot_store_register): Renamed from cannot_store_register,
3999 (the_low_target): New.
4000 * linux-mips-low.c (num_regs): Remove.
4001 (mips_num_regs): Define.
4002 (mips_regmap): Renamed from regmap, made static.
4003 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4005 (mips_cannot_store_register): Renamed from cannot_store_register,
4007 (the_low_target): New.
4008 * linux-ppc-low.c (num_regs): Remove.
4009 (ppc_num_regs): Define.
4010 (ppc_regmap): Renamed from regmap, made static.
4011 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4013 (ppc_cannot_store_register): Renamed from cannot_store_register,
4015 (the_low_target): New.
4016 * linux-s390-low.c (num_regs): Remove.
4017 (s390_num_regs): Define.
4018 (s390_regmap): Renamed from regmap, made static.
4019 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4021 (s390_cannot_store_register): Renamed from cannot_store_register,
4023 (the_low_target): New.
4024 * linux-sh-low.c (num_regs): Remove.
4025 (sh_num_regs): Define.
4026 (sh_regmap): Renamed from regmap, made static.
4027 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4029 (sh_cannot_store_register): Renamed from cannot_store_register,
4031 (the_low_target): New.
4032 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4033 (the_low_target): New.
4035 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4037 * Makefile.in: Add stamp-h target.
4038 * configure.in: Create stamp-h.
4039 * configure: Regenerated.
4041 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4043 * inferiors.c: New file.
4044 * target.c: New file.
4045 * target.h: New file.
4046 * Makefile.in: Add target.o and inferiors.o. Update
4048 * linux-low.c (inferior_pid): New static variable,
4049 moved from server.c.
4050 (linux_create_inferior): Renamed from create_inferior.
4051 Call add_inferior. Return 0 on success instead of a PID.
4052 (linux_attach): Renamed from myattach.
4053 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4054 (linux_thread_alive): Renamed from mythread_alive.
4055 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4057 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4058 (regsets_store_inferior_registers): Correct error message.
4059 Add missing ``return 0''.
4060 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4061 (linux_store_registers): Renamed from store_inferior_registers.
4062 (linux_read_memory): Renamed from read_inferior_memory.
4063 (linux_write_memory): Renamed from write_inferior_memory.
4064 (linux_target_ops): New structure.
4065 (initialize_low): Call set_target_ops ().
4066 * remote-utils.c (unhexify): New function.
4067 (hexify): New function.
4068 (input_interrupt): Send signals to ``signal_pid''.
4069 * server.c (inferior_pid): Remove.
4070 (start_inferior): Update create_inferior call.
4071 (attach_inferior): Call add_inferior.
4072 (handle_query): New function.
4073 (main): Call handle_query for `q' packets.
4074 * server.h: Include "target.h". Remove obsolete prototypes.
4075 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4077 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4079 * Makefile.in: Add WARN_CFLAGS. Update configury
4081 * configure.in: Check for <string.h>
4082 * configure: Regenerate.
4083 * config.in: Regenerate.
4084 * gdbreplay.c: Include needed system headers.
4085 (remote_open): Remove strchr prototype.
4086 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4087 * regcache.c (supply_register): Change buf argument to const void *.
4088 (supply_register_by_name): Likewise.
4089 (collect_register): Change buf argument to void *.
4090 (collect_register_by_name): Likewise.
4091 * regcache.h: Add missing prototypes.
4092 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4093 * server.c (handle_query): New function.
4094 (attached): New static variable, moved out of main.
4095 (main): Quiet longjmp clobber warnings.
4096 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4097 * utils.c (error): Remove NORETURN.