1 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5 of another, then delete the previous, and validate all
7 (validate_inserted_breakpoint): New.
8 (delete_disabled_breakpoints): New.
9 (validate_breakpoints): New.
10 (check_mem_read): Validate breakpoints before trusting their
11 shadow. Delete disabled breakpoints.
12 (check_mem_write): Validate breakpoints before trusting they
13 should be inserted. Delete disabled breakpoints.
14 * mem-break.h (validate_breakpoints):
15 * server.c (handle_query): Validate breakpoints when we see a
18 2010-04-01 Pedro Alves <pedro@codesourcery.com>
20 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
21 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
22 if we could tell there's a GDB breakpoint at stop_pc.
23 (need_step_over_p): Don't do a step over if we find a GDB
24 breakpoint at the resume PC.
26 * mem-break.c (struct raw_breakpoint): New.
27 (enum bkpt_type): New type `gdb_breakpoint'.
28 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
29 fields. New field `raw'.
30 (find_raw_breakpoint_at): New.
31 (set_raw_breakpoint_at): Handle refcounting. Create a raw
33 (set_breakpoint_at): Adjust.
34 (delete_raw_breakpoint): New.
35 (release_breakpoint): New.
36 (delete_breakpoint): Rename to...
37 (delete_breakpoint_1): ... this. Add proc parameter. Use
38 release_breakpoint. Return ENOENT.
39 (delete_breakpoint): Reimplement.
40 (find_breakpoint_at): Delete.
41 (find_gdb_breakpoint_at): New.
42 (delete_breakpoint_at): Delete.
43 (set_gdb_breakpoint_at): New.
44 (delete_gdb_breakpoint_at): New.
45 (gdb_breakpoint_here): New.
46 (set_reinsert_breakpoint): Use release_breakpoint.
47 (uninsert_breakpoint): Rename to ...
48 (uninsert_raw_breakpoint): ... this.
49 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
50 (reinsert_raw_breakpoint): Change parameter type to
52 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
54 (check_breakpoints): Adjust. Use release_breakpoint.
55 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
56 (breakpoint_inserted_here): Ditto.
57 (check_mem_read): Adjust to iterate over raw breakpoints instead.
58 Don't trust the breakpoint's shadow if it is not inserted.
59 (check_mem_write): Adjust to iterate over raw breakpoints instead.
60 (delete_all_breakpoints): Adjust.
61 (free_all_breakpoints): Mark all breakpoints as uninserted, and
62 use delete_breakpoint_1.
64 * mem-break.h (breakpoints_supported): Delete declaration.
65 (set_gdb_breakpoint_at): Declare.
66 (gdb_breakpoint_here): Declare.
67 (delete_breakpoint_at): Delete.
68 (delete_gdb_breakpoint_at): Declare.
70 * server.h (struct raw_breakpoint): Forward declare.
71 (struct process_info): New field `raw_breakpoints'.
73 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
76 2010-03-24 Pedro Alves <pedro@codesourcery.com>
78 * linux-low.c (status_pending_p_callback): Fix comment.
79 (linux_wait_for_event_1): Move most of the internal breakpoint
81 (linux_wait_1): ... to here.
82 (count_events_callback): New.
83 (select_singlestep_lwp_callback): New.
84 (select_event_lwp_callback): New.
85 (cancel_breakpoints_callback): New.
86 (select_event_lwp): New.
87 (linux_wait_1): Simplify internal breakpoint handling. Give equal
88 priority to all LWPs that have had events that should be reported
89 to the client. Cancel breakpoints when about to reporting the
90 event to the client, not while stopping lwps. No longer cancel
91 finished single-steps here.
92 (cancel_finished_single_step): Delete.
93 (cancel_finished_single_steps): Delete.
95 2010-03-24 Pedro Alves <pedro@codesourcery.com>
97 * mem-break.c (enum bkpt_type): New.
98 (struct breakpoint): New field `type'.
99 (set_breakpoint_at): Change return type to struct breakpoint
100 pointer. Set type to `other_breakpoint' by default.
101 (delete_breakpoint): Rewrite, supporting more than one breakpoint
102 in the breakpoint list.
103 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
104 (reinsert_breakpoint): Rename to ...
105 (reinsert_raw_breakpoint): ... this.
106 (reinsert_breakpoints_at): Adjust.
107 * mem-break.h (struct breakpoint): Declare.
108 (set_breakpoint_at): Change return type to struct breakpoint
111 2010-03-24 Pedro Alves <pedro@codesourcery.com>
113 * server.c (handle_query): Assign, not compare.
115 2010-03-24 Pedro Alves <pedro@codesourcery.com>
117 Teach linux gdbserver to step-over-breakpoints.
119 * linux-low.c (can_hardware_single_step): New.
120 (supports_breakpoints): New.
121 (handle_extended_wait): If stopping threads, read the stop pc of
124 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
125 low target doesn't support retrieving the PC.
126 (add_lwp): Set last_resume_kind to resume_continue.
127 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
128 (linux_attach): Don't clear stop_expected. Set the lwp's
129 last_resume_kind to resume_stop.
130 (linux_detach_one_lwp): Don't check for removed breakpoints.
131 (check_removed_breakpoint): Delete.
132 (status_pending_p): Rename to ...
133 (status_pending_p_callback): ... this. Don't check for removed
134 breakpoints. Don't consider threads that are stopped from GDB's
136 (linux_wait_for_lwp): Always read the stop_pc here.
137 (cancel_breakpoint): New.
138 (step_over_bkpt): New global.
139 (linux_wait_for_event_1): Implement stepping over breakpoints.
140 (gdb_wants_lwp_stopped): New.
141 (gdb_wants_all_stopped): New.
142 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
143 single-step traps here. Store the thread's last reported target
145 (send_sigstop): Don't clear stop_expected. Always set it,
147 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
148 (cancel_finished_single_step): New.
149 (cancel_finished_single_steps): New.
150 (wait_for_sigstop): Don't cancel finished single-step traps here.
151 (linux_resume_one_lwp): Don't check for removed breakpoints.
152 Don't set `step' on non-hardware step archs.
153 (linux_set_resume_request): Ignore resume_stop requests if already
154 stopping or stopped. Set the lwp's last_resume_kind.
155 (resume_status_pending_p): Don't check for removed breakpoints.
156 (need_step_over_p): New.
157 (start_step_over): New.
158 (finish_step_over): New.
159 (linux_resume_one_thread): Always queue a sigstop for resume_stop
160 requests. Clear the thread's last reported target waitstatus.
161 Don't use the `suspended' flag. Don't consider pending breakpoints.
162 (linux_resume): Start a step-over if necessary.
163 (proceed_one_lwp): New.
164 (proceed_all_lwps): New.
165 (unstop_all_lwps): New.
166 * linux-low.h (struct lwp_info): Rewrite comment for the
167 `suspended' flag. Add the `stop_pc' field. Delete the
168 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
169 Add `'last_resume_kind' and `need_step_over' fields.
170 * inferiors.c (struct thread_info): Delete, moved elsewhere.
171 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
172 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
173 (set_raw_breakpoint_at): New.
174 (set_breakpoint_at): Rewrite to use it.
175 (reinsert_breakpoint_handler): Delete.
176 (set_reinsert_breakpoint): New.
177 (reinsert_breakpoint_by_bp): Delete.
178 (delete_reinsert_breakpoints): New.
179 (uninsert_breakpoint): Rewrite.
180 (uninsert_breakpoints_at): New.
181 (reinsert_breakpoint): Rewrite.
182 (reinsert_breakpoints_at): New.
183 (check_breakpoints): Rewrite.
184 (breakpoint_here): New.
185 (breakpoint_inserted_here): New.
186 (check_mem_read): Adjust.
187 * mem-break.h (breakpoints_supported, breakpoint_here)
188 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
189 (reinsert_breakpoint_by_bp): Delete declaration.
190 (delete_reinsert_breakpoints): Declare.
191 (reinsert_breakpoint): Delete declaration.
192 (reinsert_breakpoints_at): Declare.
193 (uninsert_breakpoint): Delete declaration.
194 (uninsert_breakpoints_at): Declare.
195 (check_breakpoints): Adjust prototype.
196 * server.h: Adjust include order.
197 (struct thread_info): Declare here. Add a `last_status' field.
199 2010-03-23 Michael Snyder <msnyder@vmware.com>
201 * server.c (crc32): New function.
202 (handle_query): Add handling for 'qCRC:' request.
204 2010-03-23 Pedro Alves <pedro@codesourcery.com>
206 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
207 lwp had been stopped by a watchpoint.
209 2010-03-16 Pedro Alves <pedro@codesourcery.com>
211 * server.h (internal_error): Declare.
212 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
213 * utils.c (internal_error): New function.
215 2010-03-15 Andreas Schwab <schwab@redhat.com>
217 * configure.srv: Fix typo setting srv_regobj.
219 2010-03-15 Pedro Alves <pedro@codesourcery.com>
221 * linux-low.c (fetch_register): Avoid passing a non string literal
223 (usr_store_inferior_registers): Ditto.
225 2010-03-14 Pedro Alves <pedro@codesourcery.com>
227 * linux-low.c (linux_write_memory): Bail out early if peeking
230 2010-03-14 Pedro Alves <pedro@codesourcery.com>
232 * linux-low.h (struct lwp_info): New fields
233 `stopped_by_watchpoint' and `stopped_data_address'.
234 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
235 here, and cache them in the lwp object.
236 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
238 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
240 (linux_stopped_by_watchpoint): Rewrite.
241 (linux_stopped_data_address): Rewrite.
243 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
245 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
246 switching the current inferior, not before.
248 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
250 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
251 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
252 i386-linux.c and amd64-linux.c.
253 (reg-i386.o): Removed.
254 (reg-i386.c): Likewise.
255 (reg-i386-linux.o): Likewise.
256 (reg-i386-linux.c): Likewise.
257 (reg-x86-64.o): Likewise.
258 (reg-x86-64.c): Likewise.
259 (reg-x86-64-linux.o): Likewise.
260 (reg-x86-64-linux.c): Likewise.
263 (i386-linux.o): Likewise.
264 (i386-linux.c): Likewise.
267 (amd64-linux.o): Likewise.
268 (amd64-linux.c): Likewise.
270 * configure.srv (srv_i386_regobj): New.
271 (srv_i386_linux_regobj): Likewise.
272 (srv_amd64_regobj): Likewise.
273 (srv_amd64_linux_regobj): Likewise.
274 (srv_i386_32bit_xmlfiles): Likewise.
275 (srv_i386_64bit_xmlfiles): Likewise.
276 (srv_i386_xmlfiles): Likewise.
277 (srv_amd64_xmlfiles): Likewise.
278 (srv_i386_linux_xmlfiles): Likewise.
279 (srv_amd64_linux_xmlfiles): Likewise.
280 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
281 srv_xmlfiles to $srv_i386_xmlfiles.
282 (i[34567]86-*-mingw32ce*): Likewise.
283 (i[34567]86-*-mingw*): Likewise.
284 (i[34567]86-*-nto*): Likewise.
285 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
286 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
287 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
288 (x86_64-*-linux*): Likewise.
290 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
291 (init_registers_amd64_linux): New.
292 (x86_arch_setup): Replace init_registers_x86_64_linux with
293 init_registers_amd64_linux.
295 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
297 * configure.ac: Check for libdl. If it is not available link against
299 * configure: Regenerate.
301 2010-02-22 Pedro Alves <pedro@codesourcery.com>
305 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
306 handing a read watchpoint.
307 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
309 2010-02-12 Doug Evans <dje@google.com>
311 * linux-low.c (linux_supports_tracefork_flag): Document.
312 (linux_look_up_symbols): Add comment.
314 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
316 * regcache.c (supply_register): Clear regcache if buf is NULL.
318 2010-02-02 Nicolas Roche <roche@sourceware.org>
319 Joel Brobecker <brobecker@adacore.com>
321 * inferiors.c (find_inferior): Add function documentation.
322 (unloaded_dll): Handle the case where the unloaded dll has not
323 been previously registered in the dll list.
325 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
327 * linux-arm-low.c (thumb_breakpoint_len): Delete.
328 (thumb2_breakpoint): New.
329 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
331 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
333 * linux-low.c (get_stop_pc): Check for SIGTRAP.
334 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
337 2010-01-21 Pedro Alves <pedro@codesourcery.com>
339 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
341 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
343 * linux-s390-low.c (s390_collect_ptrace_register)
344 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
346 2010-01-21 Doug Evans <dje@google.com>
348 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
349 (PTRACE_ARG4_TYPE): New macro.
350 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
351 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
352 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
353 (usr_store_inferior_registers): Ditto.
354 (linux_read_memory, linux_write_memory): Ditto.
355 (linux_test_for_tracefork): Ditto.
357 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
358 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
360 2010-01-21 Pedro Alves <pedro@codesourcery.com>
362 * proc-service.c (ps_lgetregs): Don't refetch registers from the
365 2010-01-21 Pedro Alves <pedro@codesourcery.com>
367 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
368 prototype to take a regcache. Adjust.
370 2010-01-20 Pedro Alves <pedro@codesourcery.com>
372 * regcache.h (struct thread_info): Forward declare.
373 (struct regcache): New.
374 (new_register_cache): Adjust prototype.
375 (get_thread_regcache): Declare.
376 (free_register_cache): Adjust prototype.
377 (registers_to_string, registers_from_string): Ditto.
378 (supply_register, supply_register_by_name, collect_register)
379 (collect_register_as_string, collect_register_by_name): Ditto.
380 * regcache.c (struct inferior_regcache_data): Delete.
381 (get_regcache): Rename to ...
382 (get_thread_regcache): ... this. Adjust. Switch inferior before
384 (regcache_invalidate_one): Adjust.
385 (regcache_invalidate): Fix prototype.
386 (new_register_cache): Return the new register cache.
387 (free_register_cache): Change prototype.
388 (realloc_register_cache): Adjust.
389 (registers_to_string): Change prototype to take a regcache. Adjust.
390 (registers_from_string): Ditto.
391 (register_data): Ditto.
392 (supply_register): Ditto.
393 (supply_register_by_name): Ditto.
394 (collect_register): Ditto.
395 (collect_register_as_string): Ditto.
396 (collect_register_by_name): Ditto.
397 * server.c (process_serial_event): Adjust.
398 * linux-low.h (regset_fill_func, regset_store_func): Change
400 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
402 * linux-low.c (get_stop_pc): Adjust.
403 (check_removed_breakpoint): Adjust.
404 (linux_wait_for_event): Adjust.
405 (linux_resume_one_lwp): Adjust.
406 (fetch_register): Add regcache parameter. Adjust.
407 (usr_store_inferior_registers): Ditto.
408 (regsets_fetch_inferior_registers): Ditto.
409 (regsets_store_inferior_registers): Ditto.
410 (linux_fetch_registers, linux_store_registers): Ditto.
411 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
413 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
414 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
415 prototype to take a regcache.
416 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
417 * remote-utils.c (convert_ascii_to_int, outreg)
418 (prepare_resume_reply): Change prototype to take a regcache.
420 * target.h (struct target_ops) <fetch_registers, store_registers>:
421 Change prototype to take a regcache.
422 (fetch_inferior_registers, store_inferior_registers): Change
423 prototype to take a regcache. Adjust.
424 * proc-service.c (ps_lgetregs): Adjust.
425 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
426 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
427 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
428 take a regcache. Adjust.
429 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
430 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
431 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
432 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
433 * linux-cris-low.c (cris_get_pc, cris_set_pc)
434 (cris_cannot_fetch_register):
435 (cris_breakpoint_at): Change prototype to take a regcache.
437 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
438 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
439 to take a regcache. Adjust.
440 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
442 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
443 take a regcache. Adjust.
444 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
445 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
446 (m68k_set_pc): Change prototype to take a regcache. Adjust.
447 * linux-mips-low.c (mips_get_pc):
448 (mips_set_pc): Change prototype to take a regcache. Adjust.
449 (mips_reinsert_addr): Adjust.
450 (mips_collect_register): Change prototype to take a regcache.
452 (mips_supply_register):
453 (mips_collect_register_32bit, mips_supply_register_32bit)
454 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
455 (mips_store_fpregset): Ditto.
456 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
458 (parse_spufs_run): Adjust.
459 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
460 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
461 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
462 take a regcache. Adjust.
463 * linux-s390-low.c (s390_collect_ptrace_register)
464 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
465 (s390_set_pc): Change prototype to take a regcache. Adjust.
466 (s390_arch_setup): Adjust.
467 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
468 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
469 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
470 (sparc_fill_gregset, sparc_store_gregset_from_stack)
471 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
473 (sparc_breakpoint_at): Adjust.
474 * linux-xtensa-low.c (xtensa_fill_gregset):
475 (xtensa_store_gregset):
476 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
477 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
478 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
479 prototype to take a regcache. Adjust.
480 * win32-arm-low.c (arm_fetch_inferior_register)
481 (arm_store_inferior_register): Change prototype to take a
483 * win32-i386-low.c (i386_fetch_inferior_register)
484 (i386_store_inferior_register): Change prototype to take a
486 * win32-low.c (child_fetch_inferior_registers)
487 (child_store_inferior_registers): Change prototype to take a
489 (win32_wait): Adjust.
490 (win32_fetch_inferior_registers): Change prototype to take a
492 (win32_store_inferior_registers): Adjust.
493 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
494 store_inferior_register>: Change prototype to take a regcache.
496 2010-01-20 Doug Evans <dje@google.com>
498 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
500 (linux_wait_for_event1, linux_init_signals): Ditto.
501 (W_STOPCODE): Provide definition if missing.
503 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
505 * linux-low.c (linux_core_of_thread): New.
506 (compare_ints, show_process, list_threads): New.
507 (linux_qxfer_osdata): Report threads and cores.
508 (linux_target_op): Register linux_core_of_thread.
509 * remote-utils.c (prepare_resume_reply): Report the core.
510 (buffer_xml_printf): Support %d specifier.
511 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
513 (handle_query): Handle qXfer:threads. Announce availability
515 * target.h (struct target_ops): New field core_of_thread.
517 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
519 * Makefile.in (clean): Remove new generated files.
520 (reg-s390.o, reg-s390.c): Remove rules.
521 (reg-s390x.o, reg-s390x.c): Likewise.
522 (s390-linux32.o, s390-linux32.c): Add rules.
523 (s390-linux64.o, s390-linux64.c): Likewise.
524 (s390x-linux64.o, s390x-linux64.c): Likewise.
525 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
526 * linux-s390-low.c: Include <elf.h>.
527 (HWCAP_S390_HIGH_GPRS): Define if undefined.
528 (init_registers_s390): Remove prototype.
529 (init_registers_s390x): Likewise.
530 (init_registers_s390_linux32): Add prototype.
531 (init_registers_s390_linux64): Likewise.
532 (init_registers_s390x_linux64): Likewise.
533 (s390_num_regs_3264): New define.
534 (s390_regmap_3264): New global variable.
535 (s390_cannot_fetch_register): Remove obsolete check.
536 (s390_cannot_store_register): Likewise.
537 (s390_collect_ptrace_register): Handle upper/lower register halves.
538 (s390_supply_ptrace_register): Likewise.
539 (s390_fill_gregset): Update to register number changes.
540 (s390_get_hwcap): New routine.
541 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
542 Install appropriate regmap and register set.
544 2010-01-01 Joel Brobecker <brobecker@adacore.com>
546 * server.c (gdbserver_version): Update copyright year to 2010.
547 * gdbreplay.c (gdbreplay_version): Likewise.
549 2009-12-28 Doug Evans <dje@google.com>
551 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
552 elf/external.h. Include <elf.h> instead but only if necessary.
554 2009-12-28 Pedro Alves <pedro@codesourcery.com>
556 * linux-low.c (linux_remove_process): Remove `detaching'
557 parameter. Don't release/detach from thread_db here.
558 (linux_kill): Release/detach from thread_db here, ...
559 (linux_detach): ... and here, before actually detaching.
560 (linux_wait_1): ... and here, when a process exits.
561 * thread-db.c (any_thread_of): New.
562 (thread_db_free): Switch the current inferior to a thread of the
565 2009-12-21 Doug Evans <dje@google.com>
567 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
569 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
570 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
571 warning ifndef __NR_tkill. Move setting of errno there too.
572 Delete unnecessary resetting of errno after syscall.
573 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
575 * configure.ac: Check for dladdr.
576 * config.in: Regenerate.
577 * configure: Regenerate.
578 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
579 (try_thread_db_load): Update.
581 * linux-low.c (my_waitpid): Delete unnecessary prototype.
583 2009-12-18 Doug Evans <dje@google.com>
585 * event-loop.c: Include unistd.h if it exists.
587 * linux-low.c (my_waitpid): Move definition away from being in
588 between linux_tracefork_child/linux_test_for_tracefork.
590 * gdb_proc_service.h (psaddr_t): Fix type.
591 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
592 signature to match glibc.
594 2009-12-16 Doug Evans <dje@google.com>
596 * linux-low.c (linux_read_memory): Fix argument to read.
598 2009-11-26 Pedro Alves <pedro@codesourcery.com>
600 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
601 events, don't leave current_inferior pointing at null.
603 2009-11-26 Pedro Alves <pedro@codesourcery.com>
605 * win32-low.c (LOG): Delete.
606 (OUTMSG): Output to stderr.
607 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
608 on compile time LOG macro.
609 (win32_wait): Fix debug output.
611 2009-11-26 Pedro Alves <pedro@codesourcery.com>
613 * win32-low.c (win32_add_one_solib): If the dll name is
614 "ntdll.dll", prepend the system directory to the dll path.
616 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
618 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
620 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
621 Vladimir Prus <vladimir@codesourcery.com>
623 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
624 * configure.ac: Check for __mcoldfire__ and set
625 gdb_cv_m68k_is_coldfire.
626 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
627 reg-cf.o and reg-m68k.o.
628 * configure: Regenerated.
630 2009-11-16 Pedro Alves <pedro@codesourcery.com>
632 * linux-low.c (linux_remove_process): Add `detaching' parameter.
633 Pass it to thread_db_free.
634 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
635 proper `detaching' argument to linux_remove_process.
636 * linux-low.h (thread_db_free): Add `detaching' parameter.
637 * thread-db.c (thread_db_init): Pass false as `detaching' argument
639 (thread_db_free): Add `detaching' parameter. Only
640 call td_ta_clear_event if detaching from process.
642 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
644 * thread-db.c (thread_db_free): Fix typo.
646 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
649 * thread-db.c (thread_db_free): Call td_ta_clear_event.
651 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
653 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
654 with an i686 compiler.
655 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
657 * configure: Rebuilt.
659 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
663 * server.c (handle_search_memory_1): Correct read_addr initialization
664 in loop for searching subsequent chunks.
666 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
668 * configure.ac: New --with-libthread-db option.
669 * thread-db.c: Allow direct dependence on libthread_db.
670 (thread_db_free): Adjust.
671 * config.in: Regenerate.
672 * configure: Likewise.
674 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
677 * thread-db.c (attach_thread): New function.
678 (maybe_attach_thread): Return success/failure.
679 (find_new_threads_callback): Adjust.
680 (thread_db_find_new_threads): Loop until no new threads.
682 2009-10-13 Pedro Alves <pedro@codesourcery.com>
684 * proc-service.c (ps_lgetregs): Formatting.
686 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
688 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
689 * configure.ac: Adjust.
690 * linux-low.h (struct process_info_private): Move members to struct
692 (thread_db_free, thread_db_handle_monitor_command): New prototype.
693 * linux-low.c (linux_remove_process): Adjust.
694 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
695 * server.c (handle_query): Move code ...
696 (handle_monitor_command): ... here. New function.
697 * target.h (struct target_ops): New member.
698 * thread-db.c (struct thread_db): New.
699 (libthread_db_search_path): New variable.
700 (thread_db_create_event, thread_db_enable_reporting)
701 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
702 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
703 (try_thread_db_load_1, dladdr_to_soname): New functions.
704 (try_thread_db_load, thread_db_load_search): New functions.
705 (thread_db_init): Search for libthread_db.
706 (thread_db_free): New function.
707 (thread_db_handle_monitor_command): Likewise.
708 * config.in: Regenerate.
709 * configure: Regenerate.
711 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
713 * spu-low.c (spu_kill): Wait for inferior to terminate.
714 Call clear_inferiors.
715 (spu_detach): Call clear_inferiors.
717 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
719 * aclocal.m4: Regenerate.
720 * config.in: Likewise.
721 * configure: Likewise.
723 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
725 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
726 (parse_spufs_run): New function.
727 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
728 (ppc_breakpoint_at): Handle SPU breakpoints.
730 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
732 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
733 (SPUFS_MAGIC): Define.
734 (spu_enumerate_spu_ids): New function.
735 (linux_qxfer_spu): New function.
736 (linux_target_ops): Install linux_qxfer_spu.
738 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
740 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
741 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
742 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
743 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
744 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
745 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
746 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
747 (init_registers_powerpc_cell32l): Add prototype.
748 (init_registers_powerpc_cell64l): Likewise.
749 (ppc_arch_setup): Detect Cell/B.E. architecture.
751 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
753 * Makefile.in (datarootdir): New variable.
755 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
757 * linux-low.c (linux_write_memory): Update debugging output.
758 * Makefile.in (clean): Add new descriptions.
759 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
760 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
761 * configure.srv: Add new files for arm*-*-linux*.
762 * linux-arm-low.c: Add new declarations.
763 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
764 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
765 (HWCAP_VFPv3D16): New.
766 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
767 instead of __IWMMXT__.
768 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
769 (arm_arch_setup): New.
770 (target_regsets): Remove #ifdef. Add VFP regset.
771 (the_low_target): Use arm_arch_setup.
773 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
775 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
776 the main thread again.
778 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
780 Adding Neutrino gdbserver.
781 * configure: Regenerated.
782 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
783 * configure.srv (i[34567]86-*-nto*): New target.
784 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
785 * remote-utils.c [__QNX__]: Include sys/iomgr.h
786 (nto_comctrl) [__QNX__]: New function.
787 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
789 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
791 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
794 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
795 Pedro Alves <pedro@codesourcery.com>
797 * win32-i386-low.c (i386_get_thread_context): Handle systems that
798 don't support CONTEXT_EXTENDED_REGISTERS.
799 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
800 (the_low_target): Install them.
801 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
802 failing with ERROR_PIPE_NOT_CONNECTED.
804 2009-06-30 Doug Evans <dje@google.com>
805 Pierre Muller <muller@ics.u-strasbg.fr>
807 Add h/w watchpoint support to x86-linux, win32-i386.
808 * Makefile.in (SFILES): Add i386-low.c
809 (i386_low_h): Define.
810 (i386-low.o): Add dependencies.
811 (linux-x86-low.o): Add i386-low.h dependency.
812 (win32-i386-low.o): Ditto.
813 * i386-low.c: New file.
814 * i386-low.h: New file.
815 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
816 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
817 * linux-low.c (linux_add_process): Initialize arch_private.
818 (linux_remove_process): Free arch_private.
819 (add_lwp): Initialize arch_private.
820 (delete_lwp): Free arch_private.
821 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
823 * linux-low.h (process_info_private): New member arch_private.
824 (lwp_info): New member arch_private.
825 (linux_target_ops): New members new_process, new_thread,
827 (ptid_of): New macro.
828 * linux-x86-low.c: Include stddef.h, i386-low.h.
829 (arch_process_info): New struct.
830 (arch_lwp_info): New struct.
831 (x86_linux_dr_get, x86_linux_dr_set): New functions.
832 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
833 (i386_dr_low_get_status): New function.
834 (x86_insert_point, x86_remove_point): New functions.
835 (x86_stopped_by_watchpoint): New function.
836 (x86_stopped_data_address): New function.
837 (x86_linux_new_process, x86_linux_new_thread): New functions.
838 (x86_linux_prepare_to_resume): New function.
839 (the_low_target): Add entries for insert_point, remove_point,
840 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
842 * server.c (debug_hw_points): New global.
843 (monitor_show_help): Document set debug-hw-points.
844 (handle_query): Process "set debug-hw-points".
845 * server.h (debug_hw_points): Declare.
847 * utils.c (NUMCELLS, CELLSIZE): New macros.
848 (get_sell, xsnprintf, paddress): New functions.
849 * win32-arm-low.c (the_low_target): Add entries for insert_point,
850 remove_point, stopped_by_watchpoint, stopped_data_address.
851 * win32-i386-low.c: Include i386-low.h.
852 (debug_reg_state): Replaces dr.
853 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
854 (i386_dr_low_get_status): New function.
855 (i386_insert_point, i386_remove_point): New functions.
856 (i386_stopped_by_watchpoint): New function.
857 (i386_stopped_data_address): New function.
858 (i386_initial_stuff): Update.
859 (get_thread_context,set_thread_context,i386_thread_added): Update.
860 (the_low_target): Add entries for insert_point,
861 remove_point, stopped_by_watchpoint, stopped_data_address.
862 * win32-low.c (win32_insert_watchpoint): New function.
863 (win32_remove_watchpoint): New function.
864 (win32_stopped_by_watchpoint): New function.
865 (win32_stopped_data_address): New function.
866 (win32_target_ops): Add entries for insert_watchpoint,
867 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
868 * win32-low.h (win32_target_ops): New members insert_point,
869 remove_point, stopped_by_watchpoint, stopped_data_address.
871 2009-06-25 Pedro Alves <pedro@codesourcery.com>
873 * server.c (process_serial_event): Re-return unsupported, not
874 error, if the type isn't recognized. Re-allow supporting only
875 insert or remove packets. Also call require_running for
876 breakpoints. Add missing break statement to default case. Tidy.
877 * target.h (struct target_ops): Rename insert_watchpoint to
878 insert_point, and remove_watchpoint to remove_point.
880 * linux-low.h (struct linux_target_ops): Likewise.
881 * linux-low.c (linux_insert_watchpoint): Rename to ...
882 (linux_insert_point): ... this. Adjust.
883 (linux_remove_watchpoint): Rename to ...
884 (linux_remove_point): ... this. Adjust.
885 (linux_target_ops): Adjust.
886 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
887 (cris_insert_point): ... this.
888 (cris_remove_watchpoint): Rename to ...
889 (cris_remove_point): ... this.
890 (the_low_target): Adjust.
892 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
894 * server.c (handle_v_kill): Pass signal_pid to
895 kill_inferior if multi_process is zero.
897 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
899 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
900 * target.h (target_ops): Comment for *_watchpoint to make it clear
901 the functions can get types '0' and '1'.
903 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
905 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
906 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
907 * regcache.c (get_regcache): Likewise.
908 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
909 * win32-low.c (child_fetch_inferior_registers): Remove check for
912 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
913 Pedro Alves <pedro@codesourcery.com>
915 * target.h (struct target_ops) <supports_multi_process>: New
917 (target_supports_multi_process): New.
918 * server.c (handle_query): Even if GDB reports support, only
919 enable multi-process if the target also supports it. Report
920 multi-process support only if the target backend supports it.
921 * linux-low.c (linux_supports_multi_process): New function.
922 (linux_target_ops): Install it as target_supports_multi_process
925 2009-05-24 Doug Evans <dje@google.com>
927 Global renaming of find_thread_pid to find_thread_ptid.
928 * server.h (find_thread_ptid): Renamed from find_thread_pid.
929 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
932 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
933 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
936 * linux-low.c (get_stop_pc): Print pc if debug_threads.
937 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
938 (linux_resume_one_lwp): Ditto.
940 2009-05-23 Doug Evans <dje@google.com>
942 * linux-low.c (linux_resume_one_lwp): Change type of first arg
943 from struct inferior_list_entry * to struct lwp_info *.
946 2009-05-13 Doug Evans <dje@google.com>
948 * linux-x86-low.c: Don't include assert.h.
949 (x86_siginfo_fixup): Use fatal, not assert.
950 (x86_arch_setup): Fix comment.
952 2009-05-12 Doug Evans <dje@google.com>
954 Biarch support for i386/amd64 gdbserver.
955 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
957 (linux-i386-low.o, linux-x86-64-low.o): Delete.
958 (linux-x86-low.o): Add.
959 * linux-x86-64-low.c: Delete.
960 * linux-i386-low.c: Delete.
961 * linux-x86-low.c: New file.
962 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
964 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
966 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
967 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
968 (linux_child_pid_to_exec_file): New function.
969 (elf_64_header_p, elf_64_file_p): New functions.
970 (siginfo_fixup): New function.
971 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
972 give target a chance to convert layout.
973 * linux-low.h (linux_target_ops): New member siginfo_fixup.
974 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
976 2009-05-07 Doug Evans <dje@google.com>
978 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
979 (regsets_store_inferior_registers): Ditto.
981 2009-05-06 Pedro Alves <pedro@codesourcery.com>
985 * linux-low.c (must_set_ptrace_flags): Delete.
986 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
988 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
989 `lwp->must_set_ptrace_flags' instead.
990 (linux_wait_for_event_1): Set ptrace options here.
991 (linux_wait_1): ... not here.
993 2009-04-30 Doug Evans <dje@google.com>
995 * inferiors.c (started_inferior_callback): New function.
996 (attached_inferior_callback): New function.
997 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
998 * server.c (print_started_pid, print_attached_pid): New functions.
999 (detach_or_kill_for_exit): New function.
1000 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1001 * server.h (have_started_inferiors_p): Declare.
1002 (have_attached_inferiors_p): Declare.
1004 * inferiors.c (remove_process): Fix memory leak, free process.
1005 * linux-low.c (linux_remove_process): New function.
1006 (linux_kill): Call it instead of remove_process.
1007 (linux_detach, linux_wait_1): Ditto.
1009 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1011 * configure.srv: Add x86 Windows CE target.
1013 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1015 * inferiors.c (get_thread_process): Make global.
1016 * server.h (get_thread_process): Add prototype.
1017 * thread-db.c (find_one_thread): Use get_thread_process
1018 instead of current_process.
1019 (thread_db_get_tls_address): Do not crash if called when
1020 thread layer is not yet initialized.
1022 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1024 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1025 * spu-low.c (current_tid): Rename to ...
1026 (current_ptid): ... this.
1027 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1028 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1029 ptid_get_lwp (current_ptid) instead of current_tid.
1030 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1031 instead of current_tid. Use find_process_pid to verify pid
1032 argument is valid. Pass proper argument to remove_process.
1033 (spu_thread_alive): Compare current_ptid instead of current_tid.
1034 (spu_resume): Likewise.
1036 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1038 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1041 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1043 Implement the multiprocess extensions, and add linux multiprocess
1046 * server.h (ULONGEST): Declare.
1047 (struct ptid, ptid_t): New.
1048 (minus_one_ptid, null_ptid): Declare.
1049 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1050 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1051 (struct inferior_list_entry): Change `id' type from unsigned from
1053 (struct sym_cache, struct breakpoint, struct
1054 process_info_private): Forward declare.
1055 (struct process_info): Declare.
1056 (current_process): Declare.
1057 (all_processes): Declare.
1058 (initialize_inferiors): Declare.
1059 (add_thread): Adjust to use ptid_t.
1060 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1061 (add_process, remove_process, find_thread_pid): Declare.
1062 (find_inferior_id): Adjust to use ptid_t.
1063 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1064 (multi_process): Declare.
1065 (push_event): Adjust to use ptid_t.
1066 (read_ptid, write_ptid): Declare.
1067 (prepare_resume_reply): Adjust to use ptid_t.
1068 (clear_symbol_cache): Declare.
1069 * inferiors.c (all_processes): New.
1070 (null_ptid, minus_one_ptid): New.
1071 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1072 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1073 (add_thread): Change unsigned long to ptid. Remove gdb_id
1075 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1076 (gdb_id_to_thread): Rename to ...
1077 (find_thread_pid): ... this. Change unsigned long to ptid.
1078 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1079 (loaded_dll, pull_pid_from_list): Adjust.
1080 (add_process, remove_process, find_process_pid)
1081 (get_thread_process, current_process, initialize_inferiors): New.
1082 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1083 (struct target_waitstatus) <related_pid>: Ditto.
1084 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1086 (struct target_ops) <join>: Add `pid' argument.
1087 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1088 (struct target_ops) <wait>: Add `ptid' field. Change return type
1090 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1091 (mywait): Add `ptid' argument. Change return type to ptid_t.
1092 (target_pid_to_str): Declare.
1093 * target.c (set_desired_inferior): Adjust to use ptids.
1094 (mywait): Add new `ptid' argument. Adjust.
1095 (target_pid_to_str): New.
1096 * mem-break.h (free_all_breakpoints): Declare.
1097 * mem-break.c (breakpoints): Delelete.
1098 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1099 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1100 to use per-process breakpoint list.
1101 (free_all_breakpoints): New.
1102 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1103 (symbol_cache, all_symbols_looked_up): Delete.
1105 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1107 (prepare_resume_reply): Change ptid argument's type from unsigned
1108 long to ptid_t. Adjust. Implement W;process and X;process.
1109 (free_sym_cache, clear_symbol_cache): New.
1110 (look_up_one_symbol): Adjust to per-process symbol cache. *
1111 * server.c (cont_thread, general_thread, step_thread): Change type
1114 (multi_process): New.
1115 (last_ptid): Change type to ptid_t.
1116 (struct vstop_notif) <ptid>: Change type to ptid_t.
1117 (queue_stop_reply, push_event): Change `ptid' argument's type to
1119 (discard_queued_stop_replies): Add `pid' argument.
1120 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1121 changes. Don't reference the `attached' global.
1122 (attach_inferior): Adjust to mywait interface changes.
1123 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1124 features. Handle and report "multiprocess+". Handle
1126 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1128 (handle_v_kill): New.
1129 (handle_v_stopped): Adjust to use target_pid_to_str.
1130 (handle_v_requests): Allow multiple attaches and runs when
1131 multiprocess extensions are in effect. Handle "vKill".
1132 (myresume): Adjust to use ptids.
1133 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1134 (handle_status): Adjust to discard_queued_stop_replies interface
1136 (first_thread_of, kill_inferior_callback)
1137 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1138 (main): Call initialize_inferiors. Adjust to use ptids, killing
1139 and detaching from all inferiors. Handle multiprocess packet
1141 * linux-low.h: Include gdb_proc_service.h.
1142 (struct process_info_private): New.
1143 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1144 <lwpid_of>: Use ptid_get_lwp.
1145 (get_lwp_thread): Adjust.
1146 (struct lwp_info): Add `dead' member.
1147 (find_lwp_pid): Declare.
1148 * linux-low.c (thread_db_active): Delete.
1149 (new_inferior): Adjust comment.
1150 (inferior_pid): Delete.
1151 (linux_add_process): New.
1152 (handle_extended_wait): Adjust.
1153 (add_lwp): Change unsigned long to ptid.
1154 (linux_create_inferior): Add process to processes table. Adjust
1155 to use ptids. Don't set new_inferior here.
1156 (linux_attach_lwp): Rename to ...
1157 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1158 it. Adjust to use ptids.
1159 (linux_attach_lwp): New.
1160 (linux_attach): Add process to processes table. Don't set
1162 (struct counter): New.
1163 (second_thread_of_pid_p, last_thread_of_process_p): New.
1164 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1166 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1167 processes. Remove process from process table.
1168 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1169 to multiple processes.
1170 (any_thread_of): New.
1171 (linux_detach): Add `pid' argument, and handle it. Remove process
1172 from processes table.
1173 (linux_join): Add `pid' argument. Handle it.
1174 (linux_thread_alive): Change unsighed long argument to ptid_t.
1175 Consider dead lwps as not being alive.
1176 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1177 threads we're not interested in.
1178 (same_lwp, find_lwp_pid): New.
1179 (linux_wait_for_lwp): Change `pid' argument's type from int to
1181 (linux_wait_for_event): Rename to ...
1182 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1183 from int to ptid_t. Adjust.
1184 (linux_wait_for_event): New.
1185 (linux_wait_1): Add `ptid' argument. Change return type to
1186 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1187 that exit from the process table.
1188 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1190 (mark_lwp_dead): New.
1191 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1192 stopping all threads, mark its main lwp as dead.
1193 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1195 (fetch_register, usr_store_inferior_registers)
1196 (regsets_fetch_inferior_registers)
1197 (regsets_store_inferior_registers, linux_read_memory)
1198 (linux_write_memory): Inline `inferior_pid'.
1199 (linux_look_up_symbols): Adjust to use per-process
1201 (linux_request_interrupt): Adjust to use ptids.
1202 (linux_read_auxv): Inline `inferior_pid'.
1203 (initialize_low): Don't reference thread_db_active.
1204 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1205 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1206 (ps_getpid): Return the pid of the current inferior.
1207 * thread-db.c (proc_handle, thread_agent): Delete.
1208 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1210 (find_one_thread): Change argument type to ptid_t. Adjust to
1212 (maybe_attach_thread): Adjust to per-process data and ptids.
1213 (thread_db_find_new_threads): Ditto.
1214 (thread_db_init): Ditto.
1215 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1216 processes table. Adjust to use ptids.
1217 (spu_kill, spu_detach): Adjust interface. Remove process from
1219 (spu_join, spu_thread_alive): Adjust interface.
1220 (spu_wait): Adjust interface. Remove process from processes
1221 table. Adjust to use ptids.
1222 * win32-low.c (current_inferior_tid): Delete.
1223 (current_inferior_ptid): New.
1224 (debug_event_ptid): New.
1225 (thread_rec): Take a ptid. Adjust.
1226 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1227 (child_delete_thread): Ditto.
1228 (do_initial_child_stuff): Add `attached' argument. Add process to
1230 (child_fetch_inferior_registers, child_store_inferior_registers):
1232 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1233 (win32_attach): Pass 1 to do_initial_child_stuff.
1234 (win32_kill): Adjust interface. Remove process from processes
1236 (win32_detach): Ditto.
1237 (win32_join): Adjust interface.
1238 (win32_thread_alive): Take a ptid.
1239 (win32_resume): Adjust to use ptids.
1240 (get_child_debug_event): Ditto.
1241 (win32_wait): Adjust interface. Remove exiting process from
1244 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1246 Non-stop mode support.
1248 * server.h (non_stop): Declare.
1249 (gdb_client_data, handler_func): Declare.
1250 (delete_file_handler, add_file_handler, start_event_loop):
1252 (handle_serial_event, handle_target_event, push_event)
1253 (putpkt_notif): Declare.
1254 * target.h (enum resume_kind): New.
1255 (struct thread_resume): Replace `step' field by `kind' field.
1256 (TARGET_WNOHANG): Define.
1257 (struct target_ops) <wait>: Add `options' argument.
1258 <supports_non_stop, async, start_non_stop>: New fields.
1259 (target_supports_non_stop, target_async): New.
1260 (start_non_stop): Declare.
1261 (mywait): Add `options' argument.
1262 * target.c (mywait): Add `options' argument. Print child exit
1264 (start_non_stop): New.
1265 * server.c (non_stop, own_buf, mem_buf): New globals.
1266 (struct vstop_notif): New.
1267 (notif_queue): New global.
1268 (queue_stop_reply, push_event, discard_queued_stop_replies)
1269 (send_next_stop_reply): New.
1270 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1272 (attach_inferior): In non-stop mode, don't wait for the target
1274 (handle_general_set): Handle QNonStop.
1275 (handle_query): When handling qC, return the current general
1276 thread, instead of the first thread of the list.
1277 (handle_query): If the backend supports non-stop mode, include
1278 QNonStop+ in the qSupported query response.
1279 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1281 (handle_v_attach, handle_v_run): Handle non-stop mode.
1282 (handle_v_stopped): New.
1283 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1284 (myresume): Adjust to use resume_kind. Handle non-stop.
1285 (queue_stop_reply_callback): New.
1286 (handle_status): Handle non-stop mode.
1287 (main): Clear non_stop flag on reconnection. Use the event-loop.
1288 Refactor serial protocol handling from here ...
1289 (process_serial_event): ... to this new function. When GDB
1290 selects any thread, select one here. In non-stop mode, wait until
1291 GDB acks all pending events before exiting.
1292 (handle_serial_event, handle_target_event): New.
1293 * remote-utils.c (remote_open): Install remote_desc in the event
1295 (remote_close): Remove remote_desc from the event loop.
1296 (putpkt_binary): Rename to...
1297 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1298 (putpkt_binary): New as wrapper around putpkt_binary_1.
1299 (putpkt_notif): New.
1300 (prepare_resume_reply): In non-stop mode, don't change the
1302 * event-loop.c: New.
1303 * Makefile.in (OBJ): Add event-loop.o.
1304 (event-loop.o): New rule.
1306 * linux-low.h (pid_of): Moved here.
1308 (get_lwp_thread): Use lwpid_of.
1309 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1310 * linux-low.c (pid_of): Delete.
1311 (inferior_pid): Use lwpid_of.
1312 (linux_event_pipe): New.
1313 (target_is_async_p): New.
1315 (handle_extended_wait): Use lwpid_of.
1316 (add_lwp): Don't set lwpid field.
1317 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1318 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1319 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1320 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1321 first. Adjust to linux_wait_for_event interface changes. Use
1323 (linux_detach): Don't delete the main lwp here.
1324 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1325 (status_pending_p): Don't consider explicitly suspended lwps.
1326 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1327 pointer. Add OPTIONS argument. Change return type to int. Use
1328 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1329 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1330 pointer. Add status pointer argument. Return a pid instead of a
1331 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1332 changes. In non-stop mode, don't switch to a random thread.
1333 (linux_wait): Rename to...
1334 (linux_wait_1): ... this. Add target_options argument, and handle
1335 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1336 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1337 clean exit and signal exit code. Don't stop all threads in
1338 non-stop mode. In all-stop mode, only stop all threads when
1339 reporting a stop to GDB. Handle explicit thread stop requests.
1340 (async_file_flush, async_file_mark): New.
1342 (send_sigstop): Use lwpid_of.
1343 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1344 interface changes. In non-stop mode, don't switch to a random
1346 (linux_resume_one_lwp): Use lwpid_of.
1347 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1348 (linux_resume_one_thread): ... this. Handle resume_stop. In
1349 non-stop mode, don't look for pending flag in all threads.
1350 (resume_status_pending_p): Don't consider explicitly suspended
1352 (my_waitpid): Reimplement. Emulate __WALL.
1353 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1355 (sigchld_handler, linux_supports_non_stop, linux_async)
1356 (linux_start_non_stop): New.
1357 (linux_target_ops): Register linux_supports_non_stop, linux_async
1358 and linux_start_non_stop.
1359 (initialize_low): Install SIGCHLD handler.
1360 * thread-db.c (thread_db_create_event, find_one_thread)
1361 (thread_db_get_tls_address): Use lwpid_of.
1362 * win32-low.c (win32_detach): Adjust to use resume_kind.
1363 (win32_wait): Add `options' argument.
1364 * spu-low.c (spu_resume): Adjust to use resume_kind.
1365 (spu_wait): Add `options' argument.
1367 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1369 Decouple target code from remote protocol.
1371 * target.h (enum target_waitkind): New.
1372 (struct target_waitstatus): New.
1373 (struct target_ops) <wait>: Return an unsigned long. Take a
1374 target_waitstatus pointer instead of a char pointer.
1376 * target.c (mywait): Change prototype to return an unsigned long.
1377 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1378 * server.h (thread_from_wait, old_thread_from_wait): Delete
1380 (prepare_resume_reply): Change prototype to take a
1382 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1383 (last_status, last_ptid): New.
1384 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1385 pid instead of a signal.
1386 (attach_inferior): Remove "status" and "signal" parameters.
1388 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1390 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1391 (handle_v_requests, myresume): Remove "status" and "signal"
1393 (handle_status): New.
1394 (main): Delete local `status'. Adjust.
1395 * remote-utils.c: Include target.h.
1396 (prepare_resume_reply): Change prototype to take a
1397 target_waitstatus. Adjust.
1399 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1401 * spu-low.c (spu_wait): Adjust.
1402 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1404 (win32_wait): Adjust.
1406 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1408 * target.h (struct thread_resume): Delete leave_stopped member.
1409 (struct target_ops): Add a `n' argument to the `resume' callback.
1410 * server.c (start_inferior): Adjust.
1411 (handle_v_cont, myresume): Adjust.
1412 * linux-low.c (check_removed_breakpoint): Adjust to resume
1413 interface change, and to removed leave_stopped field.
1414 (resume_ptr): Delete.
1415 (struct thread_resume_array): New.
1416 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1417 resume interface change.
1418 (linux_continue_one_thread, linux_queue_one_thread)
1419 (resume_status_pending_p): Check if the resume field is NULL
1420 instead of checking the leave_stopped member.
1421 (linux_resume): Adjust to the target resume interface change.
1422 * spu-low.c (spu_resume): Adjust to the target resume interface
1424 * win32-low.c (win32_detach, win32_resume): Ditto.
1426 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1428 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1430 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1432 (linux_continue_one_thread): Only preserve the stepping flag if
1433 there's a pending breakpoint.
1435 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1437 * server.c (main): After the inferior having exited, call
1438 remote_close before exiting gdbserver.
1440 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1442 Fix size of FPSCR in Power 7 processors.
1443 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1444 (PPC_FEATURE_HAS_DFP): New #define.
1445 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1448 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1450 * server.c (handle_query) Whitespace and formatting.
1452 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1454 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1455 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1456 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1457 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1458 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1459 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1460 Makefile.in, configure.ac: Fix whitespace throughout.
1461 * configure: Regenerate.
1463 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1465 * inferiors.c (find_inferior): Make it safe for the callback
1466 function to delete the currently iterated inferior.
1468 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1470 * Makefile.in (linuw_low_h): Move higher.
1471 (thread-db.o): Depend on $(linux_low_h).
1473 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1475 Rename "process" to "lwp" throughout.
1477 * linux-low.c (all_processes): Rename to...
1478 (all_lwps): ... this.
1479 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1480 (add_process): Rename to ...
1481 (add_lwp): ... this. Adjust.
1482 (linux_create_inferior): Adjust.
1483 (linux_attach_lwp): Adjust.
1484 (linux_attach): Adjust.
1485 (linux_kill_one_process): Rename to ...
1486 (linux_kill_one_lwp): ... this. Adjust.
1487 (linux_kill): Adjust.
1488 (linux_detach_one_process): Rename to ...
1489 (linux_detach_one_lwp): ... this. Adjust.
1490 (linux_detach): Adjust.
1491 (check_removed_breakpoint): Adjust.
1492 (status_pending_p): Adjust.
1493 (linux_wait_for_process): Rename to ...
1494 (linux_wait_for_lwp): ... this. Adjust.
1495 (linux_wait_for_event): Adjust.
1496 (send_sigstop): Adjust.
1497 (wait_for_sigstop): Adjust.
1498 (stop_all_processes): Rename to ...
1499 (stop_all_lwps): ... this.
1500 (linux_resume_one_process): Rename to ...
1501 (linux_resume_one_lwp): ... this. Adjust.
1502 (linux_set_resume_request, linux_continue_one_thread)
1503 (linux_queue_one_thread, resume_status_pending_p)
1504 (usr_store_inferior_registers, regsets_store_inferior_registers)
1505 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1507 * linux-low.h (get_process): Rename to ...
1508 (get_lwp): ... this. Adjust.
1509 (get_thread_process): Rename to ...
1510 (get_thread_lwp): ... this. Adjust.
1511 (get_process_thread): Rename to ...
1512 (get_lwp_thread): ... this. Adjust.
1513 (struct process_info): Rename to ...
1514 (struct lwp_info): ... this.
1515 (all_processes): Rename to ...
1516 (all_lwps): ... this.
1517 * proc-service.c (ps_lgetregs): Adjust.
1518 * thread-db.c (thread_db_create_event, find_one_thread)
1519 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1521 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1523 * server.c (handle_query): Handle "qAttached".
1525 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1527 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1528 GPLv3, update license URL.
1530 2009-03-01 Doug Evans <dje@google.com>
1532 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1533 (server_h): Add gdb_signals.h.
1534 (signals.o): Update.
1535 * server.h (target_signal_from_host,target_signal_to_host_p)
1536 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1538 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1540 * remote-utils.c (getpkt): Also generate remote-debug
1541 information if noack_mode is set.
1543 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1545 * server.c (handle_query): Report qXfer:siginfo:read and
1546 qXfer:siginfo:write as supported and handle them.
1547 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1548 * linux-low.c (linux_xfer_siginfo): New.
1549 (linux_target_ops): Set it.
1551 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1553 * server.c (gdbserver_usage): Mention --remote-debug.
1554 (main): Accept '--remote-debug' switch.
1556 2009-01-18 Doug Evans <dje@google.com>
1558 * regcache.c (new_register_cache): No need to check result of xcalloc.
1559 * server.c (handle_search_memory): Back out calls to xmalloc,
1560 result is checked and error is returned to user upon failure.
1561 (handle_query): Ditto. Add more checks for result of malloc.
1562 (handle_v_cont): Check result of malloc, report error back to
1564 (handle_v_run): Ditto. Call freeargv.
1565 * server.h (freeargv): Declare.
1566 * utils.c (freeargv): New fn.
1568 2009-01-15 Doug Evans <dje@google.com>
1570 * gdbreplay.c (perror_with_name): Make arg const char *.
1571 * server.h (target_signal_to_name): Make return type const char *.
1572 * thread-db.c (thread_db_err_str): Make return type const char *.
1573 * utils.c (perror_with_name): Make arg const char *.
1575 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1577 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1578 when handling a EXIT_PROCESS_DEBUG_EVENT.
1580 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1582 * gdbreplay.c (gdbreplay_version): Update copyright year.
1583 * server.c (gdbserver_version): Likewise.
1585 2009-01-05 Doug Evans <dje@google.com>
1587 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1588 (handle_extended_wait): Improve comment.
1590 2008-12-13 Doug Evans <dje@google.com>
1592 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1593 * server.h (ATTR_MALLOC): New macro.
1594 (xmalloc,xcalloc,xstrdup): Declare.
1595 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1596 * inferiors.c: Ditto.
1597 * linux-low.c: Ditto.
1598 * mem-break.c: Ditto.
1599 * regcache.c: Ditto.
1600 * remote-utils.c: Ditto.
1603 * win32-low.c: Ditto.
1605 2008-12-12 Doug Evans <dje@google.com>
1607 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1608 in debugging printf.
1610 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1612 2008-12-09 Doug Evans <dje@google.com>
1614 * linux-low.h (struct process_info): Delete member tid, unused.
1615 * thread-db.c (find_one_thread): Update.
1616 (maybe_attach_thread): Update.
1618 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1620 * target.h (struct target_ops): Add qxfer_osdata member.
1621 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1623 (linux_qxfer_osdata): New functions.
1624 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1626 * server.c (handle_query): Handle "qXfer:osdata:read:".
1627 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1628 (buffer_xml_printf): New functions.
1629 * server.h (struct buffer): New.
1630 (buffer_grow_str, buffer_grow_str0): New macros.
1631 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1632 (buffer_xml_printf): Declare.
1634 2008-11-24 Doug Evans <dje@google.com>
1636 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1638 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1640 * server.c (handle_v_run): Always use the supplied argument list.
1642 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1644 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1645 (xtensa_regmap_table): Add entry for scompare1.
1647 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1649 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1650 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1651 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1652 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1653 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1654 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1655 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1656 XML target descriptions.
1657 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1658 when inferior is running on an ISA 2.05 or later processor. Add
1659 special case to return offset for full 64-bit slot of FPSCR when
1662 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1664 * Makefile.in (SFILES, clean): Added sparc64 files.
1665 (reg-sparc64.o, reg-sparc64.c): New.
1666 * configure.srv (sparc*-*-linux*): New configuration.
1667 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1668 syscall arguments for SPARC.
1669 (regsets_store_inferior_registers): Likewise.
1670 * linux-sparc-low.c: New file.
1672 2008-10-21 Doug Evans <dje@google.com>
1674 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1675 (READLINE_DIR,READLINE_DEP): Delete.
1676 (INTERNAL_CFLAGS): Update.
1677 (LINTFLAGS): Update.
1679 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1681 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1682 whole argv from the last run, not just argv[0].
1684 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1686 * regcache.c (new_register_cache): Return NULL if the register
1687 cache size isn't known yet.
1688 (free_register_cache): Avoid dereferencing a NULL regcache.
1690 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1692 * configure.srv: Merge MIPS and MIPS64.
1694 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1696 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1698 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1700 * Makefile.in: Add required vsx dependencies.
1702 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1703 Declare init_registers_powerpc_vsx32l.
1704 Declare init_registers_powerpc_vsx64l.
1705 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1706 (ppc_arch_setup): Check for VSX in hwcap.
1707 (ppc_fill_vsxregset): New function.
1708 (ppc_store_vsxregset): New function.
1709 Add new VSX entry in regset_info target_regsets.
1711 * configure.srv: Add new VSX dependencies.
1713 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1715 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1716 (remote_open): Set or clear transport_is_reliable.
1717 (putpkt_binary): Don't expect acks in noack mode.
1718 (getpkt): Don't send ack/nac in noack mode.
1719 * server.c (handle_general_set): Handle QStartNoAckMode.
1720 (handle_query): If connected by tcp pass QStartNoAckMode+ in
1722 (main): Reset noack_mode on every connection.
1723 * server.h (noack_mode): Declare.
1725 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1727 * Makefile.in (GDBREPLAY_OBS): New variable.
1728 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
1730 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
1731 Daniel Jacobowitz <dan@codesourcery.com>
1733 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
1734 (usr_store_inferior_registers): Likewise.
1735 (regsets_store_inferior_registers): Likewise.
1737 2008-07-31 Rolf Jansen <rj@surtec.com>
1738 Pedro Alves <pedro@codesourcery.com>
1740 * configure.ac: Check for memmem declaration.
1741 * server.c [HAVE_MALLOC_H]: Include malloc.h.
1742 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
1743 (disable_packet_qfThreadInfo): Unconditionally compile.
1744 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
1745 * configure, config.in: Regenerate.
1747 2008-07-28 Doug Kwan <dougkwan@google.com>
1749 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
1750 (linux_write_memory): Remove declaration of errno.
1752 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
1754 * linux-low.c (handle_extended_wait): Do not use "status"
1755 variable uninitialized.
1757 2008-07-07 Pedro Alves <pedro@codesourcery.com>
1759 * server.c (handle_v_attach): Inhibit reporting dll changes.
1761 2008-06-27 Pedro Alves <pedro@codesourcery.com>
1763 * remote-utils.c (prepare_resume_reply): If requested, don't
1764 output "thread:TID" in the T stop reply.
1766 * server.c (disable_packet_vCont, disable_packet_Tthread)
1767 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
1768 (handle_query): If requested, disable support for qC, qfThreadInfo
1770 (handle_v_requests): If requested, disable support for vCont.
1771 (gdbserver_show_disableable): New.
1772 (main): Handle --disable-packet and --disable-packet=LIST.
1774 * server.h (disable_packet_vCont, disable_packet_Tthread)
1775 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
1777 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
1779 * server.c (gdbserver_usage): Mention --version.
1781 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
1783 * Makefile.in (gdbreplay.o): New rule.
1785 2008-06-06 Joseph Myers <joseph@codesourcery.com>
1787 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
1788 message, not gdbserver.
1790 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
1791 Nathan Sidwell <nathan@codesourcery.com>
1792 Joseph Myers <joseph@codesourcery.com>
1794 * acinclude.m4: Include ../../config/acx.m4.
1795 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
1796 * configure, config.in: Regenerate.
1797 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
1798 * server.c (gdbserver_version): Print PKGVERSION.
1799 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
1800 (main): Adjust gdbserver_usage calls.
1801 * gdbreplay.c (version, host_name): Add declarations.
1802 (gdbreplay_version, gdbreplay_usage): New.
1803 (main): Accept --version and --help options.
1805 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1807 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1808 (arm_breakpoint_at): Handle Thumb.
1809 (the_low_target): Add comment.
1811 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1813 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1815 2008-05-09 Doug Evans <dje@google.com>
1817 * server.h (decode_search_memory_packet): Declare.
1818 * remote-utils.c (decode_search_memory_packet): New fn.
1819 * server.c (handle_search_memory_1): New fn.
1820 (handle_search_memory): New fn.
1821 (handle_query): Process qSearch:memory packets.
1823 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1825 * regcache.c (registers_length): Remove.
1826 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1827 full register packet.
1828 * regcache.h (registers_length): Remove prototype.
1829 * server.h (PBUFSIZ): Define to 16384.
1831 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1833 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1834 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1835 powerpc-64l.o, and powerpc-altivec64l.o.
1836 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1837 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1838 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1839 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1840 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1843 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1844 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1845 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1846 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1847 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1848 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1849 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1850 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1851 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1852 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1855 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1856 (init_registers_powerpc_32l): ... this new prototype.
1857 (init_registers_powerpc_32): Remove, replace by ...
1858 (init_registers_powerpc_altivec32l): ... this new prototype.
1859 (init_registers_powerpc_e500): Remove, replace by ...
1860 (init_registers_powerpc_e500l): ... this new prototype.
1861 (init_registers_ppc64): Remove, replace by ...
1862 (init_registers_powerpc_64l): ... this new prototype.
1863 (init_registers_powerpc_64): Remove, replace by ...
1864 (init_registers_powerpc_altivec64l): ... this new prototype.
1865 (ppc_num_regs): Set to 73.
1866 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1867 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1868 (ppc_cannot_store_register): Handle orig_r3 and trap.
1869 (ppc_arch_setup): Update init_registers_... calls.
1870 (ppc_fill_gregset): Handle orig_r3 and trap.
1872 * inferiors.c (clear_inferiors): Reset current_inferior.
1874 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1876 * acinclude.m4: Add override.m4.
1877 * configure: Regenerate.
1879 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1881 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1882 initial call to init_register_ppc64.
1884 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1886 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1887 powerpc*-*-linux* case.
1888 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1890 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1892 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1893 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1895 * linux-ppc-low.c: Include <elf.h>.
1896 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1897 (ppc_hwcap): New global variable.
1898 (ppc_regmap): Remove __SPE__ #ifdef sections.
1899 (ppc_regmap_e500): New global variable.
1900 (ppc_cannot_store_register): Update __SPE__ special case.
1901 (ppc_get_hwcap): New function.
1902 (ppc_arch_setup): Use it to determine whether inferior supports
1903 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1904 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1905 Do not access registers if target does not support AltiVec.
1906 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1907 Do not access registers if target does not support SPE.
1908 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1910 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1912 * linux-low.c (disabled_regsets, num_regsets): New.
1913 (use_regsets_p): Delete.
1914 (linux_wait_for_process): Clear disabled_regsets.
1915 (regsets_fetch_inferior_registers): Check and set it.
1916 (regsets_store_inferior_registers): Likewise.
1917 (linux_fetch_registers, linux_store_registers): Do not use
1919 (initialize_low): Allocate disabled_regsets.
1921 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1923 * Makefile.in (LIBOBJS): New.
1925 (memmem.o): New rule.
1926 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1927 * configure: Regenerated.
1929 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1931 * server.c (handle_query): Never return "unsupported" for
1932 qXfer:features:read queries.
1934 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1936 * server.c (get_features_xml): Fix inverted condition.
1937 (handle_query): Always support qXfer:feature:read.
1939 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1941 * server.c (wrapper_argv): New.
1942 (start_inferior): Handle wrapper_argv. If set, expect an extra
1944 (gdbserver_usage): Document --wrapper.
1945 (main): Parse --wrapper.
1947 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1949 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1950 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1951 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1952 (ppc_set_pc): Likewise.
1953 (ppc_arch_setup): New function.
1954 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1955 of collect_register.
1956 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1958 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1960 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1961 instead of linux-ppc64-low.o.
1962 * linux-ppc64-low.c: Remove file.
1963 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1964 (linux-ppc64-low.o): Remove rule.
1966 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1967 (init_registers_powerpc_64): Likewise.
1968 (ppc_regmap): Conditionally define depending on __powerpc64__.
1969 (ppc_cannot_store_register): Do not special-case "fpscr" when
1970 compiled on __powerpc64__.
1971 (ppc_collect_ptrace_register): New function.
1972 (ppc_supply_ptrace_register): New function.
1973 (ppc_breakpoint): Change type to "unsigned int".
1974 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1975 (the_low_target): Conditionally provide initializers for the
1976 arch_setup member depending on __powerpc64__. Install
1977 collect_ptrace_register and supply_ptrace_register members.
1979 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1981 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1982 * server.c (gdbserver_xmltarget): Define.
1983 (get_features_xml): Use it to replace "target.xml" and arch_string.
1985 * configure.srv: Remove srv_xmltarget. Add XML files that were
1986 mentioned there to srv_xmlfiles instead. Remove conditional tests
1987 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1988 srv_xmlfiles and srv_regobj to include all possible choices.
1989 * configure.ac (srv_xmltarget): Remove.
1990 (srv_xmlfiles): Do not add "target.xml".
1991 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1992 checks for supplementary target information.
1993 * configure: Regenerate.
1994 * Makefile.in (XML_TARGET): Remove.
1995 (target.xml): Remove rule.
1996 (clean): Do not clean up target.xml.
1997 (.PRECIOUS): Do not mention target.xml.
1999 * target.h (struct target_ops): Remove arch_string member.
2000 * linux-low.c (linux_arch_string): Remove.
2001 (linux_target_ops): Remove arch_string initializer.
2002 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2003 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2004 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2005 * spu-low.c (spu_arch_string): Remove.
2006 (spu_target_ops): Remove arch_string initializer.
2007 * win32-low.c (win32_arch_string): Remove.
2008 (win32_target_ops): Remove arch_string initializer.
2009 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2010 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2011 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2013 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2015 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2016 by collect_ptrace_register and supply_ptrace_register hooks.
2017 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2018 instead of checking for the_low_target.left_pad_xfer.
2019 (usr_store_inferior_registers): Use collect_ptrace_register callback
2020 instead of checking for the_low_target.left_pad_xfer.
2022 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2023 (s390_supply_ptrace_register): Likewise.
2024 (s390_fill_gregset): Call s390_collect_ptrace_register.
2025 (the_low_target): Update.
2027 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2028 (ppc_supply_ptrace_register): Likewise.
2029 (the_low_target): Update.
2031 * linux-i386-low.c (the_low_target): Update.
2032 * linux-x86-64-low.c (the_low_target): Update.
2034 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2036 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2037 reg-s390.o and reg-s390x.o.
2039 * linux-low.c (new_inferior): New global variable.
2040 (linux_create_inferior, linux_attach): Set it.
2041 (linux_wait_for_process): Call the_low_target.arch_setup after the
2042 target has stopped for the first time.
2043 (initialize_low): Do not call the_low_target.arch_setup.
2045 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2046 (s390_set_pc): Likewise.
2047 (s390_arch_setup): New function.
2048 (the_low_target): Use s390_arch_setup as arch_setup routine.
2050 * regcache.c (realloc_register_cache): New function.
2051 (set_register_cache): Call it for each existing regcache.
2053 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2055 * server.h (init_registers): Remove prototype.
2057 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2058 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2059 instead of init_registers ().
2060 * linux-arm-low.c (init_registers_arm): Add prototype.
2061 (init_registers_arm_with_iwmmxt): Likewise.
2062 (the_low_target): Add initializer for arch_setup field.
2063 * linux-cris-low.c (init_registers_cris): Add prototype.
2064 (the_low_target): Add initializer for arch_setup field.
2065 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2066 (the_low_target): Add initializer for arch_setup field.
2067 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2068 (the_low_target): Add initializer for arch_setup field.
2069 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2070 (the_low_target): Add initializer for arch_setup field.
2071 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2072 (the_low_target): Add initializer for arch_setup field.
2073 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2074 (the_low_target): Add initializer for arch_setup field.
2075 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2076 (init_registers_mips64_linux): Likewise.
2077 (the_low_target): Add initializer for arch_setup field.
2078 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2079 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2080 (the_low_target): Add initializer for arch_setup field.
2081 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2082 (init_registers_powerpc_64): Likewise.
2083 (the_low_target): Add initializer for arch_setup field.
2084 * linux-s390-low.c (init_registers_s390): Add prototype.
2085 (init_registers_s390x): Likewise.
2086 (the_low_target): Add initializer for arch_setup field.
2087 * linux-sh-low.c (init_registers_sh): Add prototype.
2088 (the_low_target): Add initializer for arch_setup field.
2089 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2090 (the_low_target): Add initializer for arch_setup field.
2091 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2092 (the_low_target): Add initializer for arch_setup field.
2094 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2095 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2096 instead of init_registers ().
2097 * win32-arm-low.c (init_registers_arm): Add prototype.
2098 (the_low_target): Add initializer for arch_setup field.
2099 * win32-i386-low.c (init_registers_i386): Add prototype.
2100 (the_low_target): Add initializer for arch_setup field.
2102 * spu-low.c (init_registers_spu): Add prototype.
2103 (initialize_low): Call initialie_registers_spu () instead of
2104 initialize_registers ().
2106 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2108 * server.c (handle_v_requests): When handling the vRun and vAttach
2109 packets, if already debugging a process, don't kill it. Return an
2112 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2114 * server.c (handle_query): Correct length check.
2116 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2118 * win32-low.c (do_initial_child_stuff): Add process handle
2119 parameter. Set current_process_handle and current_process_id from the
2120 parameters. Clear globals.
2121 (win32_create_inferior): Don't set current_process_handle and
2122 current_process_id here. Instead pass them on the call to
2123 do_initial_child_stuff.
2124 (win32_attach): Likewise.
2125 (win32_clear_inferiors): New.
2126 (win32_kill): Don't close the current process handle or the
2127 current thread handle here. Instead call win32_clear_inferiors.
2128 (win32_detach): Don't open a new handle to the process. Call
2129 win32_clear_inferiors.
2130 (win32_join): Don't rely on current_process_handle; open a new
2131 handle using the process id.
2132 (win32_wait): Call win32_clear_inferiors when the inferior process
2135 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2137 * server.c (monitor_show_help): Add "exit".
2139 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2141 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2142 (clean): Add reg-xtensa.c.
2143 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2144 * configure.srv (xtensa*-*-linux*) New target.
2145 * linux-xtensa-low.c: New.
2146 * xtensa-xtregs.c: New.
2148 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2150 * hostio.c: Don't include errno.h.
2151 (errno_to_fileio_errno): Move to hostio-errno.
2152 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2153 error number outputting to the target->hostio_last_error callback.
2154 (hostio_packet_error): Use FILEIO_EINVAL directly.
2155 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2156 calls to hostio_error.
2157 * hostio-errno.c: New.
2158 * server.h (hostio_last_error_from_errno): Declare.
2159 * target.h (target_ops): Add hostio_last_error member.
2160 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2161 as hostio_last_error handler.
2162 * spu-low.c (spu_target_ops): Likewise.
2163 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2164 (wince_hostio_last_error): New functions.
2165 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2166 as hostio_last_error handler.
2167 (win32_target_ops) [!_WIN32_WCE]: Register
2168 hostio_last_error_from_errno as hostio_last_error handler.
2169 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2170 (hostio-errno.o): New rule.
2171 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2172 * configure.srv (srv_hostio_err_objs): New variable. Default to
2174 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2175 * configure: Regenerate.
2177 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2179 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2180 (linux_kill, linux_detach): Clean up the process list.
2181 * remote-utils.c (remote_open): Improve port number parsing.
2182 (putpkt_binary, input_interrupt): Only send interrupts if the target
2184 * server.c (extended_protocol): Make static.
2185 (attached): Define earlier.
2186 (exit_requested, response_needed, program_argv): New variables.
2187 (target_running): New.
2188 (start_inferior): Clear attached here.
2189 (attach_inferior): Set attached here.
2190 (require_running): Define.
2191 (handle_query): Use require_running and target_running. Implement
2193 (handle_v_attach, handle_v_run): New.
2194 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2195 (gdbserver_usage): Update.
2196 (main): Redo argument parsing. Handle --debug and --multi. Handle
2197 --attach along with other options or after the port. Save
2198 program_argv. Support no initial program. Resynchronize
2199 communication with GDB after an error. Handle "monitor exit".
2200 Use require_running and target_running. Always allow the extended
2201 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2202 restart in extended mode.
2203 * README: Refer to the GDB manual. Update --attach usage.
2205 2007-12-20 Andreas Schwab <schwab@suse.de>
2207 * linux-low.c (STACK_SIZE): Define.
2208 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2209 (linux_test_for_tracefork): Likewise.
2211 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2213 * linux-low.c (linux_wait_for_event): Update messages. Do not
2214 reinsert auto-delete breakpoints.
2215 * mem-break.c (struct breakpoint): Change return type of handler to
2217 (set_breakpoint_at): Update handler type.
2218 (reinsert_breakpoint_handler): Return 1 instead of calling
2220 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2222 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2223 * mem-break.h (set_breakpoint_at): Update handler type.
2224 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2225 * win32-low.c (auto_delete_breakpoint): New.
2226 (get_child_debug_event): Use it.
2228 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2230 * configure.ac: Check for pread and pwrite.
2231 * hostio.c (handle_pread): Fall back to lseek and read.
2232 (handle_pwrite): Fall back to lseek and write.
2233 * config.in, configure: Regenerated.
2235 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2237 * server.c (myresume): Add own_buf argument.
2238 (main): Update calls.
2240 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2242 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2243 * remote-utils.c (remote_open): Do not call disable_async_io.
2244 (block_async_io): Delete.
2245 (unblock_async_io): Make static.
2246 (initialize_async_io): New.
2247 * server.c (handle_v_cont): Handle async I/O here.
2248 (myresume): Likewise. Move other common resume tasks here...
2249 (main): ... from here. Call initialize_async_io. Disable async
2250 I/O before the main loop.
2251 * server.h (initialize_async_io): Declare.
2252 (block_async_io, unblock_async_io): Delete prototypes.
2253 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2255 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2257 * remote-utils.c (readchar): Allow binary data in received messages.
2259 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2261 * win32-low.c (attaching): New global.
2262 (win32_create_inferior): Clear the `attaching' global.
2263 (win32_attach): Set the `attaching' global.
2264 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2265 attaching. Only set a breakpoint at the entry point if not
2268 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2270 * server.c (main): Don't report dll events on the initial
2271 connection on attaches.
2273 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2275 * server.c (main): Relax numerical bases supported for the pid of
2276 the --attach command line argument.
2278 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2280 * win32-low.c (win32_attach): Call OpenProcess before
2281 DebugActiveProcess, not after. Add last error output to error
2284 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2286 * win32-low.c (win32_get_thread_context)
2287 (win32_set_thread_context): New functions.
2288 (thread_rec): Use win32_get_thread_context.
2289 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2290 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2293 2007-12-03 Leo Zayas
2294 Pedro Alves <pedro_alves@portugalmail.pt>
2296 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2298 (child_add_thread): Minor cleanup.
2299 (child_continue): Resume artificially suspended threads before
2300 calling ContinueDebugEvent.
2301 (suspend_one_thread): New.
2302 (fake_breakpoint_event): New.
2303 (get_child_debug_event): Change return type to int. Check here if
2304 gdb sent an interrupt request. If a soft interrupt was requested,
2305 fake a breakpoint event. Return 0 if there is no event to handle,
2307 (win32_wait): Don't check here if gdb sent an interrupt request.
2308 Ensure there is a valid event to handle.
2309 (win32_request_interrupt): Add soft interruption method as last
2312 2007-12-03 Leo Zayas
2313 Pedro Alves <pedro_alves@portugalmail.pt>
2315 * win32-low.h (win32_thread_info): Add descriptions to the
2316 structure members. Replace `suspend_count' counter by a
2318 * win32-low.c (thread_rec): Update condition of when to get the
2319 context from the inferior. Rely on ContextFlags being set if it
2320 has already been retrieved. Only suspend the inferior thread if
2321 we haven't already. Warn if that fails.
2322 (continue_one_thread): s/suspend_count/suspended/. Only call
2323 ResumeThread once. Warn if that fails.
2325 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2327 * win32-low.c (win32_wait): Don't read from the inferior when it
2330 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2332 * Makefile.in (win32_low_h): New variable.
2333 (win32-low.o): Add dependency on $(win32_low_h).
2334 (win32-arm-low.o, win32-i386-low.o): New rules.
2336 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2338 * hostio.c: Correct copyright year.
2340 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2342 * Makefile.in (OBS): Add hostio.o.
2343 (hostio.o): New rule.
2344 * server.h (handle_vFile): Declare.
2345 * hostio.c: New file.
2346 * server.c (handle_v_requests): Take packet_len and new_packet_len
2347 for binary packets. Call handle_vFile.
2348 (main): Update call to handle_v_requests.
2350 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2352 * linux-low.c: Include <sched.h>.
2354 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2356 * linux-low.c (linux_tracefork_grandchild): New.
2357 (linux_tracefork_child): Use clone.
2358 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2360 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2362 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2364 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2366 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2368 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2370 * inferiors.c (change_inferior_id): Delete.
2371 (add_pid_to_list, pull_pid_from_list): New.
2372 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2373 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2374 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2375 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2376 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2377 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2378 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2379 (using_threads): Always set to 1.
2380 (handle_extended_wait): New.
2381 (add_process): Do not set TID.
2382 (linux_create_inferior): Set must_set_ptrace_flags.
2383 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2384 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2385 (linux_thread_alive): Rename TID argument to LWPID.
2386 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2387 (linux_wait_for_event): Do not use TID or check using_threads. Update
2388 call to dead_thread_notify. Call handle_extended_wait.
2389 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2390 (send_sigstop): Delete sigstop_sent.
2391 (wait_for_sigstop): Avoid TID.
2392 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2393 (linux_test_for_tracefork): New.
2394 (linux_lookup_signals): Use thread_db_active and
2395 linux_supports_tracefork_flag.
2396 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2397 * linux-low.h (get_process_thread): Avoid TID.
2398 (struct process_ifo): Move thread_known and tid to the end. Remove
2400 (linux_attach_lwp, thread_db_init): Update prototypes.
2401 * server.h (change_inferior_id): Delete prototype.
2402 (add_pid_to_list, pull_pid_from_list): New prototypes.
2403 * thread-db.c (thread_db_use_events): New.
2404 (find_first_thread): Rename to...
2405 (find_one_thread): ...this. Update callers and messages. Do not
2406 call fatal. Check thread_db_use_events. Do not call
2407 change_inferior_id or new_thread_notify.
2408 (maybe_attach_thread): Update. Do not call new_thread_notify.
2409 (thread_db_init): Set thread_db_use_events. Check use_events.
2410 * utils.c (fatal, warning): Correct message prefix.
2412 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2414 * Makefile.in (clean): Remove new files.
2415 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2416 (powerpc-64.o, powerpc-64.c): New rules.
2417 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2418 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2420 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2422 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2423 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2424 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2425 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2426 (target_regsets): Add AltiVec and SPE register sets.
2427 * configure.ac: Check for AltiVec and SPE.
2428 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2429 (ppc_fill_vrregset, ppc_store_vrregset): New.
2430 (target_regsets): Add AltiVec register set.
2431 * configure: Regenerated.
2433 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2435 * linux-low.c (O_LARGEFILE): Define.
2436 (linux_read_memory): Use /proc/PID/mem.
2437 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2438 * configure, config.in: Regenerated.
2440 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2442 * linux-low.c (linux_wait_for_event): Do not pass signals while
2445 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2447 * win32-low.c (create_process): New.
2448 (win32_create_inferior): Use create_process instead of
2449 CreateProcess. If create_process failed retry appending an ".exe"
2450 suffix. Store the GetLastError result immediatelly after
2451 create_process calls and use it on the call to error.
2453 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2455 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2457 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2459 * configure.ac: Switch license to GPLv3.
2461 2007-08-01 Michael Snyder <msnyder@access-company.com>
2463 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2465 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2467 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2469 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2470 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2471 CloseToolhelp32Snapshot.
2472 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2473 CloseToolhelp32Snapshot.
2475 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2477 * server.c (main): Check for inferior exit before main loop.
2479 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2481 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2482 instead of on tmp_desc.
2484 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2485 Daniel Jacobowitz <dan@codesourcery.com>
2487 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2488 (add_thread): Minor cleanups.
2489 (clear_inferiors): Move lower in the file. Clear the DLL
2491 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2492 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2493 (xml_escape_text): New.
2494 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2496 (handle_v_cont): Report errors.
2497 (gdbserver_version): Update.
2498 (main): Correct size of own_buf. Do not report initial DLL events.
2499 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2500 (unloaded_dll, xml_escape_text): New.
2501 * win32-low.c (enum target_waitkind): Update comments.
2502 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2503 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2504 (win32_EnumProcessModules, win32_GetModuleInformation)
2505 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2506 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2507 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2508 (win32_Module32First, win32_Module32Next, load_toolhelp)
2509 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2510 (get_child_debug_event): Handle DLL events.
2511 (win32_wait): Likewise.
2513 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2515 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2516 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2518 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2520 * win32-low.c (handle_output_debug_string): Ignore event if not
2523 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2525 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2527 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2529 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2531 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2533 * inferiors.c (change_inferior_id): Add comment.
2534 * linux-low.c (check_removed_breakpoint): Add an early
2535 prototype. Improve debug output.
2536 (linux_attach): Doc update.
2537 (linux_detach_one_process, linux_detach): Clean up before releasing
2539 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2540 * linux-low.h (struct process_info): Doc improvement.
2541 * mem-break.c (delete_all_breakpoints): New.
2542 * mem-break.h (delete_all_breakpoints): New prototype.
2543 * thread-db.c (find_first_thread): New.
2544 (thread_db_create_event): Call it instead of
2545 thread_db_find_new_threads. Clean up unused variables.
2546 (maybe_attach_thread): Remove first thread handling.
2547 (thread_db_find_new_threads): Use find_first_thread.
2548 (thread_db_get_tls_address): Likewise.
2550 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2552 * thread-db.c (thread_db_find_new_threads): Add prototype.
2553 (thread_db_create_event): Check for the main thread before adding
2555 (maybe_attach_thread): Only enable event reporting if TID == 0.
2556 (thread_db_get_tls_address): Check for new threads.
2558 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2560 * linux-low.c (linux_create_inferior): Try execv before execvp.
2561 * spu-low.c (spu_create_inferior): Likewise.
2563 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2565 * linux-low.c (linux_create_inferior): Change execv to execvp.
2566 * spu-low.c (spu_create_inferior): Likewies.
2568 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2570 * Makefile.in (clean): Clean new files instead of deleted ones.
2571 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2572 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2574 * configure.srv: Specify XML files and new regformats for MIPS and
2576 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2577 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2578 an entry for the restart register.
2579 (mips_cannot_fetch_register, mips_cannot_store_register)
2580 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2581 register names to match the XML descriptions.
2582 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2583 restart register instead of $0.
2585 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2586 Markus Deuling <deuling@de.ibm.com>
2588 * remote-utils.c (decode_xfer_write): New function.
2589 * server.h (decode_xfer_write): Add prototype.
2590 * server.c (handle_query): Add PACKET_LEN argument. Support
2591 qXfer:spu:read and qXfer:spu:write packets.
2592 (main): Pass packet_len to handle_query.
2593 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2594 * target.h (target_ops): Add qxfer_spu.
2596 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2598 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2599 accessing non-seekable spufs files.
2601 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2603 * server.c (handle_query): Add reply for qC packet.
2605 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2606 Leo Zayas <lerele@champenstudios@com>
2608 * server.h (check_remote_input_interrupt_request): New function.
2609 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2610 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2611 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2612 (check_remote_input_interrupt_request): New function.
2613 * server.h (check_remote_input_interrupt_request): Declare.
2614 * win32-low.c (winapi_DebugBreakProcess,
2615 winapi_GenerateConsoleCtrlEvent): New typedefs.
2616 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2618 (win32_wait): Check for remote interrupt request
2619 with check_remote_input_interrupt_request.
2620 (win32_request_interrupt): New function.
2621 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2623 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2625 * win32-low.c (debug_registers_changed,
2626 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2627 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2628 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2629 (thread_rec): Get context using the low target.
2630 (child_add_thread): Call thread_added on the low target,
2631 which does the same thing.
2633 (do_initial_child_stuff): Remove debug registers references.
2634 Set context using the low target. Resume threads after
2635 setting the contexts.
2636 (child_continue): Remove dead variable. Remove debug
2637 registers references.
2638 (child_fetch_inferior_registers): Go through the low target.
2639 (do_child_store_inferior_registers): Remove.
2640 (child_store_inferior_registers): Go through the low target.
2641 (win32_resume): Remove debug registers references.
2642 Set context using the low target.
2643 (handle_exception): Change return type to void. Don't record
2644 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2645 first chance exception.
2646 (get_child_debug_event): Change return type to void. Remove
2647 goto loop. Always return after waiting for debug event.
2648 (win32_wait): Convert to switch statement. Handle spurious
2651 * win32-i386-low.c (debug_registers_changed,
2652 debug_registers_used): New.
2653 (initial_stuff): Rename to ...
2654 (i386_initial_stuff): ... this. Clear debug registers
2656 (store_debug_registers): Delete.
2657 (i386_get_thread_context): New.
2658 (load_debug_registers): Delete.
2659 (i386_set_thread_context): New.
2660 (i386_thread_added): New.
2661 (single_step): Rename to ...
2662 (i386_single_step): ... this.
2663 (do_fetch_inferior_registers): Rename to ...
2664 (i386_fetch_inferior_register): ... this.
2665 (i386_store_inferior_register): New.
2666 (the_low_target): Adapt to new interface.
2668 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2669 (arm_get_thread_context): New.
2670 (arm_set_thread_context): New.
2672 (do_fetch_inferior_registers): Rename to ...
2673 (arm_fetch_inferior_register): ... this.
2674 (arm_store_inferior_register): New.
2675 (arm_wince_breakpoint): Reimplement as unsigned long.
2676 (arm_wince_breakpoint_len): Define.
2677 (the_low_target): Adapt to new interface.
2679 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2680 load_debug_registers. Add get_thread_context, set_thread_context,
2681 thread_added and store_inferior_register. Rename
2682 fetch_inferior_registers to fetch_inferior_register.
2683 (regptr): Remove declaration.
2685 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2687 * linux-low.c (linux_detach): Change return type to int. Return 0.
2688 * spu-low.c (spu_detach): Likewise.
2690 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2692 * target.h (target_ops): Change return type of detach to int.
2694 (join_inferior): New.
2695 * server.c (main): Don't skip detach support on mingw32.
2696 If the inferior doesn't support detaching return error.
2697 Call join_inferior instead of using waitpid.
2698 * linux-low.c (linux_join): New.
2699 (linux_target_op): Add linux_join.
2700 * spu-low.c (spu_join): New.
2701 (spu_target_ops): Add spu_join.
2702 * win32-low.c (win32_detach): Adapt to new interface.
2703 Reopen current_process_handle before detaching. Issue a child
2704 resume before detaching.
2706 (win32_target_op): Add win32_join.
2708 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2710 * win32-low.c (win32-attach): Fix return value.
2711 * target.h (target_ops): Describe ATTACH return values.
2713 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2715 * win32-low.c (GETPROCADDRESS): Define.
2716 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2717 (winapi_DebugSetProcessKillOnExit): Likewise.
2718 (win32_create_inferior): Force usage of ansi CreateProcessA.
2719 (win32_attach): Use GETPROCADDRESS.
2720 (win32_detach): Likewise.
2722 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2724 * win32-low.c (win32_wait): Don't use WSTOPSIG.
2726 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
2728 * win32-low.c: Commit leftover changes from 2007-03-29.
2730 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2732 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
2733 fields short instead of int. Add explicit padding.
2734 (i387_cache_to_fsave): Remove unnecessary casts.
2735 (i387_fsave_to_cache): Doc fix.
2736 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
2738 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
2740 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
2741 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
2743 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2745 * configure.srv (arm*-*-mingw32ce*): Move near the other
2748 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
2750 * configure.ac: Add errno checking.
2751 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
2752 sys/file.h and malloc.h.
2753 (AC_CHECK_DECLS): Add perror.
2754 (srv_mingwce): Handle.
2755 * configure.srv (i[34567]86-*-cygwin*): Add
2756 win32-i386-low.o to srv_tgtobj.
2757 (i[34567]86-*-mingw*): Likewise.
2758 (arm*-*-mingw32ce*): Add case.
2759 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2760 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
2761 [__MINGW32CE__] (strerror): New function.
2762 [__MINGW32CE__] (errno): Define to GetLastError.
2763 [__MINGW32CE__] (COUNTOF): New macro.
2764 (remote_open): Remove extra close call.
2765 * mem-break.c (delete_breakpoint_at): New function.
2766 * mem-break.h (delete_breakpoint_at): Declare.
2767 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
2768 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
2769 [USE_WIN32API] (read, write): Add char* casts.
2770 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
2771 * server.h: Include wincecompat.h on Windows CE.
2772 [HAVE_ERRNO_H]: Check.
2773 (perror): Declare if not declared.
2774 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
2775 (perror_with_name): Remove errno declaration.
2776 * wincecompat.h: New.
2777 * wincecompat.c: New.
2779 * win32-arm-low.c: New.
2780 * win32-i386-low.c: New.
2781 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
2782 (OUTMSG2): Make it safe.
2784 (COUNTOF): New macro.
2785 (NUM_REGS): Get it from the low target.
2786 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
2787 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
2788 (thread_rec): Let low target handle debug registers.
2789 (child_add_thread): Likewise.
2790 (child_init_thread_list): Likewise.
2791 (continue_one_thread): Likewise.
2793 (do_child_fetch_inferior_registers): Move to ...
2794 * win32-i386-low.c: ... here, and rename to ...
2795 (do_fetch_inferior_registers): ... this.
2796 * win32-low.c (child_fetch_inferior_registers):
2797 Go through the low target.
2798 (do_child_store_inferior_registers): Use regptr.
2799 (strwinerror): New function.
2800 (win32_create_inferior): Handle Windows CE.
2801 Use strwinerror instead of strerror on Windows error
2802 codes. Add program to the error output.
2803 Don't close the main thread handle on Windows CE.
2804 (win32_attach): Use coredll.dll on Windows CE.
2805 (win32_kill): Close current process and current
2807 (win32_detach): Use coredll.dll on Windows CE.
2808 (win32_resume): Let low target handle debug registers, and
2810 (handle_exception): Add/Remove initial breakpoint. Avoid
2811 non-existant WSTOPSIG on Windows CE.
2812 (win32_read_inferior_memory): Cast to remove warning.
2813 (win32_arch_string): Go through the low target.
2814 (initialize_low): Call set_breakpoint_data with the low
2815 target's breakpoint.
2816 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2817 FOP_REGNUM, mappings): Move to ...
2818 * win32-i386-low.c: ... here.
2819 * win32-low.c (win32_thread_info): Move to ...
2820 * win32-low.h: ... here.
2821 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2822 win32-arm-low.c and wincecompat.c.
2823 (all:): Add $EXEEXT.
2824 (install-only:): Likewise.
2825 (gdbserver:): Likewise.
2826 (gdbreplay:): Likewise.
2827 * config.in: Regenerate.
2828 * configure: Regenerate.
2830 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2832 * win32-low.c: Rename typedef thread_info to
2833 win32_thread_info throughout.
2835 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2837 * win32-i386-low.c: Rename to ...
2838 * win32-low.c: ... this.
2839 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2840 * Makefile.in: Likewise.
2842 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2844 * remote-utils.c (monitor_output): Constify msg parameter.
2845 * server.h (monitor_output): Likewise.
2846 * win32-i386-low.c (handle_output_debug_string): New.
2847 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2848 handle_output_debug_string.
2849 (get_child_debug_event): Likewise.
2851 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2853 * server.c (main): Correct strtoul check.
2855 2007-03-27 Jon Ringle <jon@ringle.org>
2857 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2859 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2861 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2863 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2865 * terminal.h: Check HAVE_SGTTY_H.
2867 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
2869 * remote-utils.c (remote_open): Print out the assigned port number.
2871 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2873 * remote-utils.c (monitor_output): New function.
2874 * server.c (debug_threads): Define here.
2875 (monitor_show_help): New function.
2876 (handle_query): Handle qRcmd.
2877 (main): Do not handle 'd' packet.
2878 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2879 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2882 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2884 * Makefile.in (EXEEXT): New.
2885 (clean): Use $(EXEEXT).
2887 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2889 * target.h (target_ops): Rename send_signal to request_interrupt,
2890 and remove enum target_signal parameter.
2891 * linux-low.c (linux_request_interrupt): Rename from
2892 linux_send_signal, and always send SIGINT.
2893 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2894 and always send SIGINT.
2895 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2897 (input_interrupt): Likewise.
2899 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2901 * server.c (get_features_xml): Check if target implemented
2903 * win32-i386-low.c (win32_arch_string): New.
2904 (win32_target_ops): Add win32_arch_string as arch_string member.
2906 2007-02-22 Markus Deuling <deuling@de.ibm.com>
2908 * spu-low.c (spu_arch_string): New.
2909 (spu_target_ops): Add spu_arch_string.
2911 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2913 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2914 * configure.ac: Do not check for terminal.h.
2915 * configure, config.in: Regenerated.
2917 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2919 * Makefile.in (OBS): Add $(XML_BUILTIN).
2920 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2922 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2923 (arm-with-iwmmxt.c): New.
2924 * config.in, configure: Regenerate.
2925 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2926 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2927 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2928 (arm*-*-linux*): Add iWMMXt and regset support.
2929 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2930 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2931 (arm_store_wmmxregset, target_regsets): New.
2932 * server.c (get_features_xml): Take annex argument. Check builtin
2934 (handle_query): Handle multiple annexes.
2936 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2938 * remote-utils.c [USE_WIN32API] (read, write): Define.
2939 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2942 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2944 * linux-i386-low.c (the_low_target): Set arch_string.
2945 * linux-x86-64-low.c (the_low_target): Likewise.
2946 * linux-low.c (linux_arch_string): New.
2947 (linux_target_ops): Add it.
2948 * linux-low.h (struct linux_target_ops): Add arch_string.
2949 * server.c (write_qxfer_response): Use const void * for DATA.
2950 (get_features_xml): New.
2951 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2952 * target.h (struct target_ops): Add arch_string method.
2954 2007-01-03 Denis Pilat <denis.pilat@st.com>
2955 Daniel Jacobowitz <dan@codesourcery.com>
2957 * linux-low.c (linux_kill): Handle being called with no threads.
2958 * win32-i386-low.c (win32_kill): Likewise.
2959 (get_child_debug_event): Clear current_process_handle.
2961 2006-12-30 Denis PILAT <denis.pilat@st.com>
2962 Daniel Jacobowitz <dan@codesourcery.com>
2964 * remote-utils.c (remote_open): Check the type of specified
2965 serial port devices before opening them.
2966 * server.c (main): Kill the inferior if an error occurs during
2967 the first remote_open.
2969 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2971 * README: Update supported targets.
2973 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2975 * Makefile.in (clean): Remove reg-mips64.c.
2976 (reg-mips64.c, reg-mips64.o): New rules.
2977 * configure.srv: Handle mips64. Include regset support for mips.
2978 * linux-mips-low.c (union mips_register): New.
2979 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2980 (mips_breakpoint, mips_breakpoint_at): Use int.
2981 (mips_collect_register, mips_supply_register)
2982 (mips_collect_register_32bit, mips_supply_register_32bit)
2983 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2984 (mips_store_fpregset, target_regsets): New.
2985 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2987 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2989 * configure.srv: Add target "spu*-*-*".
2990 * Makefile.in (clean): Remove reg-spu.c.
2991 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2992 * spu-low.c: New file.
2994 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2996 * configure.ac: Correct td_thr_tls_get_addr test.
2997 * configure: Regenerated.
2999 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3001 * linux-low.c (linux_wait_for_event): Reformat. Use the
3003 * remote-utils.c (decode_address_to_semicolon): New.
3004 * server.c (pass_signals, handle_general_set): New.
3005 (handle_query): Mention QPassSignals for qSupported.
3006 (main): Call handle_general_set.
3007 * server.h (pass_signals, decode_address_to_semicolon): New.
3009 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3011 * server.c (handle_query): Correct error handling for read_auxv.
3013 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3015 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3016 and srv_linux_thread_db to yes.
3017 * linux-s390-low.c (s390_fill_gregset): New function.
3018 (target_regsets): Define data structure.
3020 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3022 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3023 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3024 * config.in, configure: Regenerated.
3025 * inferiors.c (gdb_id_to_thread): New function.
3026 (gdb_id_to_thread_id): Use it.
3027 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3028 * linux-low.h (struct process_info): Add th member.
3029 (thread_db_get_tls_address): New prototype.
3030 * remote-utils.c (decode_address): Make non-static.
3031 * server.c (handle_query): Handle qGetTLSAddr.
3032 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3033 * target.h (struct target_ops): Add get_tls_address.
3034 * thread-db.c (maybe_attach_thread): Save the thread handle.
3035 (thread_db_get_tls_address): New.
3037 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3039 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3040 (linux_resume_one_process): Take a siginfo_t *. Update all
3041 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3042 (struct pending_signals): Add a siginfo_t.
3043 (linux_wait_for_process): Always set last_status.
3044 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3045 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3046 * linux-low.h (struct process_info): Add last_status.
3048 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3050 * remote-utils.c (try_rle): New function.
3051 (putpkt_binary): Use it.
3053 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3055 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3056 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3057 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3058 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3059 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3062 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3064 * server.c (terminal_fd): New variable.
3065 (old_foreground_pgrp): Likewise.
3066 (restore_old_foreground_pgrp): New function.
3067 (start_inferior): Record the terminal file descriptor in terminal_fd
3068 and its original foreground group in old_foreground_pgrp. Register
3069 restore_old_foreground_pgrp with atexit().
3071 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3073 * server.c (handle_query): Correct qPart to qXfer.
3075 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3077 * configure.ac: Check for more headers which are missing on
3078 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3079 * configure.srv: Add Cygwin and mingw32.
3080 * remote-utils.c: Don't include headers unconditionally which
3081 are missing on mingw32. Include <winsock.h> for mingw32.
3082 (remote_open): Adjust for mingw32 support. Flush
3083 standard error after writing to it.
3084 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3085 (unblock_async_io, enable_async_io, disable_async_io)
3086 (readchar, getpkt): Update for Winsock support.
3087 (prepare_resume_reply): Expect a protocol signal number.
3088 * server.c: Disable <sys/wait.h> on mingw32.
3089 (start_inferior): Adjust for mingw32 support. Flush
3090 standard error after writing to it.
3091 (attach_inferior): Likewise. Use protocol signal
3093 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3095 * win32-i386-low.c: New file.
3096 * Makefile.in (XM_CLIBS): Set.
3097 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3098 (win32-i386-low.o): New dependency rule.
3099 * linux-low.c (linux_wait): Use target signal numbers.
3100 * target.h (struct target_ops): Doc fix.
3101 * server.h (target_signal_to_name): New prototype.
3102 * gdbreplay.c: Don't include headers unconditionally which
3103 are missing on mingw32. Include <winsock.h> for mingw32.
3104 (remote_close, remote_open): Adjust for Winsock support.
3105 * configure, config.in: Regenerated.
3107 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3109 * server.c (decode_xfer_read, write_qxfer_response): New.
3110 (handle_query): Take a packet length argument. Handle
3111 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3112 the qSupported response.
3113 (main): Update call to handle_query.
3115 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3117 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3118 (putpkt_binary): Renamed from putpkt and adjusted for binary
3120 (putpkt): New wrapper for putpkt_binary.
3121 (readchar): Don't mask off the high bit.
3122 (decode_X_packet): New function.
3123 * server.c (main): Call putpkt_binary if a handler sets the packet
3124 length. Save the length of the incoming packet. Handle 'X'.
3125 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3127 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3129 * server.c (handle_query): Handle qSupported.
3131 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3133 * remote-utils.c (all_symbols_looked_up): New variable.
3134 (look_up_one_symbol): Check it.
3135 * server.h (look_up_one_symbol): New declaration.
3136 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3138 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3140 * Makefile.in (linux-arm-low.o): Update dependencies.
3141 * linux-arm-low.c: Include "gdb_proc_service.h".
3142 (PTRACE_GET_THREAD_AREA): Define.
3143 (ps_get_thread_area): New function.
3145 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3147 * configure.srv (m68k*-*-uclinux*): New target.
3148 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3149 (linux_resume_one_process): Remove extraneous cast.
3150 (linux_read_offsets): New.
3151 (linux_target_op): Add linux_read_offsets on mmuless systems.
3152 * server.c (handle_query): Add qOffsets logic.
3153 * target.h (struct target_ops): Add read_offsets.
3155 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3157 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3158 (PTRACE_GET_THREAD_AREA): Define.
3159 (ps_get_thread_area): New function.
3160 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3161 (linux-x86-64-low.o): Update.
3163 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3165 * configure.ac: Remove checks for prfpregset_t.
3166 * gdb_proc_service.h: New file.
3167 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3168 new "gdb_proc_service.h".
3169 * proc-service.c: Likewise.
3170 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3171 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3172 * Makefile.in (gdb_proc_service_h): Updated.
3173 * configure, config.in: Regenerated.
3175 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3177 * remote-utils.c (prepare_resume_reply): Move declaration
3178 of gdb_id_from_wait to the top of the block.
3180 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3182 * linux-low.c (regsets_store_inferior_registers): Read the regset
3183 from the target before filling it.
3185 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3187 * server.c (attach_inferior): Return SIGTRAP for a successful
3190 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3192 * Makefile.in (OBS): Add version.o.
3193 (STAGESTUFF): Delete.
3194 (version.o): Add dependencies.
3195 (version.c): Replace rule.
3196 (clean): Remove version.c.
3197 * server.c (gdbserver_version): New.
3198 (gdbserver_usage): Use printf.
3199 (main): Handle --version and --help.
3200 * server.h (version, host_name): Add declarations.
3202 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3214 * linux-x86-64-low.c:
3217 * linux-ppc64-low.c:
3226 * linux-crisv32-low.c:
3238 * gdbserver.1: Add (C) after Copyright. Update the FSF
3241 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3243 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3244 (arm_breakpoint_at): Recognize both breakpoints.
3245 (the_low_target): Use the correct breakpoint instruction.
3247 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3249 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3250 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3251 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3252 (the_low_target): Update.
3254 2005-10-25 Andreas Schwab <schwab@suse.de>
3256 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3258 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3259 (ia64_num_regs): Reduce to 462.
3261 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3263 * acinclude.m4: Correct quoting.
3264 * aclocal.m4: Regenerated.
3266 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3267 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3268 (thread_db_init): Call thread_db_err_str.
3269 * configure.ac: Check for TD_VERSION.
3270 * config.in, configure: Regenerated.
3272 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3274 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3276 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3278 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3279 is not available. Define HAVE_PTRACE_GETREGS if it is.
3280 * config.in, configure: Regenerated.
3281 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3282 * linux-i386-low.c, linux-m68k-low.c: Update to use
3283 HAVE_PTRACE_GETREGS.
3284 * linux-low.c (regsets_fetch_inferior_registers)
3285 (regsets_store_inferior_registers): Only return 0 if we processed
3287 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3288 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3290 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3292 * inferiors.c (struct thread_info): Add gdb_id.
3293 (add_thread): Add gdb_id argument.
3294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3295 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3296 calls to add_thread.
3297 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3298 * server.c (handle_query): Use thread_to_gdb_id.
3299 (handle_v_cont, main): Use gdb_id_to_thread_id.
3300 * server.h (add_thread): Update prototype.
3301 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3304 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3306 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3307 left-padded registers.
3308 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3309 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3311 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3313 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3314 * configure: Regenerate.
3315 * config.in: Regenerate.
3316 * server.h (NEED_DECLARATION_STRERROR):
3317 Replace with !HAVE_DECL_STRERROR.
3319 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3321 * linux-low.c (linux_wait, linux_send_signal): Don't test
3322 an unsigned long variable for > 0 if it could be MAX_ULONG.
3323 * server.c (myresume): Likewise.
3324 * target.c (set_desired_inferior): Likewise.
3326 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3328 * configure.ac: Simplify and improve check for socklen_t.
3329 * configure, config.in: Regenerate.
3331 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3333 * acconfig.h: Remove.
3334 * configure.ac: Add a test for socklen_t. Use three-argument
3335 AC_DEFINE throughout.
3336 * config.in: Regenerated using autoheader 2.59.
3337 * configure: Regenerated.
3339 * gdbreplay.c (socklen_t): Provide a default.
3340 (remote_open): Use socklen_t.
3341 * remote-utils.c (socklen_t): Provide a default.
3342 (remote_open): Use socklen_t.
3343 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3346 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3348 * linux-low.c (linux_read_memory, linux_write_memory)
3349 (linux_read_auxv): Likewise.
3350 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3351 (check_mem_write): Likewise.
3352 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3354 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3355 (registers_from_string, register_data): Likewise.
3356 * server.c (handle_query, main): Likewise.
3357 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3358 (decode_M_packet): Likewise.
3359 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3360 * target.h (struct target_ops): Update read_memory, write_memory,
3362 (read_inferior_memory, write_inferior_memory): Update.
3363 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3365 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3366 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3367 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3368 linux-s390-low.c, linux-sh-low.c: Update for changes in
3369 read_inferior_memory and the_low_target->breakpoint.
3371 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3373 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3374 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3375 * configure.srv: Add powerpc64-*-linux*.
3376 * linux-ppc64-low.c: New file.
3378 2005-05-23 Orjan Friberg <orjanf@axis.com>
3380 * linux-cris-low.c: New file with support for CRIS.
3381 * linux-crisv32-low.c: Ditto for CRISv32.
3382 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3383 (clean): Add reg-cris.c and reg-crisv32.c.
3384 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3385 reg-crisv32.o, and reg-crisv32.c to make rules.
3386 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3389 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3391 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3392 of sizeof (PTRACE_XFER_TYPE).
3393 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3395 2005-05-12 Orjan Friberg <orjanf@axis.com>
3397 * target.h (struct target_ops): Add insert_watchpoint,
3398 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3399 pointers for hardware watchpoint support.
3400 * linux-low.h (struct linux_target_ops): Ditto.
3401 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3402 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3403 to linux_target_ops.
3404 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3406 * server.c (main): Recognize 'Z' and 'z' packets.
3408 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3410 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3411 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3412 (the_low_target): Add new members.
3414 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3416 * proc-service.c (ps_lgetregs): Search all_processes instead of
3419 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3421 * server.c (start_inferior): Change return type to int.
3422 (attach_inferior): Change sigptr to int *.
3423 (handle_v_cont, handle_v_requests): Change signal to int *.
3424 (main): Change signal to int.
3426 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3428 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3429 * configure.srv: Add m32r*-*-linux*.
3430 * linux-m32r-low.c: New file.
3432 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3434 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3436 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3438 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3439 Take unsigned long arguments for PIDs.
3440 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3441 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3442 (wait_for_sigstop, linux_resume_one_process)
3443 (regsets_fetch_inferior_registers, linux_send_signal)
3444 (linux_read_auxv): Likewise. Update the types of variables holding
3445 PIDs. Update format string specifiers.
3446 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3447 * remote-utils.c (prepare_resume_reply): Likewise.
3448 * server.c (cont_thread, general_thread, step_thread)
3449 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3451 (handle_query): Update format specifiers.
3452 (handle_v_cont, main): Use strtoul for thread IDs.
3453 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3454 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3455 (general_thread, step_thread, thread_from_wait)
3456 (old_thread_from_wait): Update.
3457 * target.h (struct thread_resume): Use unsigned long for THREAD.
3458 (struct target_ops): Use unsigned long for arguments to attach and
3461 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3463 * acinclude.m4: Include bfd/bfd.m4 directly.
3464 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3465 <agriffis@toolchain.org>.
3466 * aclocal.m4, configure: Regenerated.
3468 2005-01-07 Andrew Cagney <cagney@gnu.org>
3470 * configure.ac: Rename configure.in, require autoconf 2.59.
3471 * configure: Re-generate.
3473 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3475 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3477 * aclocal.m4: Regenerated.
3478 * configure: Regenerated.
3480 2004-11-21 Andreas Schwab <schwab@suse.de>
3482 * linux-m68k-low.c (m68k_num_gregs): Define.
3483 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3484 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3485 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3486 (m68k_breakpoint_at): New. Add to the_low_target.
3488 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3489 srv_linux_thread_db to yes.
3491 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3493 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3494 (ARCH_SET_FS): Likewise.
3495 (ARCH_GET_FS): Likewise.
3496 (ARCH_GET_GS): Likewise.
3498 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3500 * linux-i386-low.c (ps_get_thread_area): New.
3501 * linux-x86-64-low.c (ps_get_thread_area): New.
3502 * linux-low.c: Include <sys/syscall.h>.
3503 (linux_kill_one_process): Don't kill the first thread here.
3504 (linux_kill): Kill the first thread here.
3505 (kill_lwp): New function.
3506 (send_sigstop, linux_send_signal): Use it.
3507 * proc-service.c: Clean up #ifdefs.
3508 (fpregset_info): Delete.
3509 (ps_lgetregs): Update and enable implementation.
3510 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3512 * remote-utils.c (struct sym_cache, symbol_cache): New.
3513 (input_interrupt): Print a clearer message.
3514 (async_io_enabled): New variable.
3515 (enable_async_io, disable_async_io): Use it. Update comments.
3516 (look_up_one_symbol): Use the symbol cache.
3517 * thread-db.c (thread_db_look_up_symbols): New function.
3518 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3520 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3522 * configure.in: Test for -rdynamic.
3523 * configure: Regenerated.
3524 * Makefile (INTERNAL_LDFLAGS): New.
3525 (gdbserver, gdbreplay): Use it.
3527 2004-09-02 Andrew Cagney <cagney@gnu.org>
3529 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3531 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3533 * linux-low.c (linux_wait): Clear all_processes list also.
3535 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3537 * linux-low.c: Include <errno.h>. Remove extern declaration of
3540 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3542 * gdbreplay.c, server.h, utils.c: Update copyright years.
3544 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3546 * server.c (main): Print child status or termination signal from
3547 variable 'signal', not 'sig'.
3549 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3551 * linux-low.c (linux_read_memory): Change return type to
3552 int. Check for and return error from ptrace().
3553 * target.c (read_inferior_memory): Change return type to int. Pass
3554 back return status from the_target->read_memory().
3555 * target.h (struct target_ops): Adapt *read_memory() prototype.
3557 (read_inferior_memory): Adapt prototype.
3558 * server.c (main): Return an error packet if
3559 read_inferior_memory() returns an error.
3561 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3563 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3564 Unify with other clean targets.
3566 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3568 * server.c (handle_v_cont): Call set_desired_inferior.
3570 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3572 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3574 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3576 * linux-low.c (linux_wait): Unblock async I/O.
3577 (linux_resume): Block and enable async I/O.
3578 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3579 * server.h (block_async_io, unblock_async_io): Add prototypes.
3581 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3583 * remote-utils.c (remote_open): Print a status notice after
3585 * server.c (attach_inferior): Print a status notice after
3588 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3590 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3592 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3594 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3596 * server.c, target.h: Update copyright years.
3598 2004-02-25 Roland McGrath <roland@redhat.com>
3600 * target.h (struct target_ops): New member `read_auxv'.
3601 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3602 * linux-low.c (linux_read_auxv): New function.
3603 (linux_target_ops): Initialize `read_auxv' member to that.
3605 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3607 Committed by Jim Blandy <jimb@redhat.com>.
3609 * linux-s390-low.c (s390_num_regs): Update.
3610 (s390_regmap): Remove control registers. Use __s390x__ predefine
3611 instead of GPR_SIZE to distiguish s390 and s390x targets.
3613 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3615 * linux-low.c: Update copyright year.
3616 (check_removed_breakpoint): Clear pending_is_breakpoint.
3617 (linux_set_resume_request, linux_queue_one_thread)
3618 (resume_status_pending_p): New functions.
3619 (linux_continue_one_thread): Use process->resume.
3620 (linux_resume): Only resume threads if there are no pending events.
3621 * linux-low.h (struct process_info): Add resume request
3624 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3626 * regcache.c (new_register_cache): Clear the allocated register
3627 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3629 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3631 * linux-low.c (linux_resume): Take a struct thread_resume *
3633 (linux_wait): Update call.
3634 (resume_ptr): New static variable.
3635 (linux_continue_one_thread): Renamed from
3636 linux_continue_one_process. Use resume_ptr.
3637 (linux_resume): Use linux_continue_one_thread.
3638 * server.c (handle_v_cont, handle_v_requests): New functions.
3639 (myresume): New function.
3640 (main): Handle 'v' case.
3641 * target.h (struct thread_resume): New type.
3642 (struct target_ops): Change argument of "resume" to struct
3644 (myresume): Delete macro.
3646 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3648 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3649 (uninstall): Support DESTDIR.
3651 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3653 * configure.srv: Add xscale*linux copy of arm*linux entry.
3655 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3657 * linux-arm-low.c (arm_reinsert_addr): New function.
3658 (the_low_target): Add arm_reinsert_addr.
3660 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3662 * mem-break.c: Remove whitespace at end of file.
3664 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3666 * configure.in: Check whether we need to prototype strerror.
3667 * server.h: Optionally prototype strerror.
3668 * gdbreplay.c (perror_with_name): Use strerror.
3669 * linux-low.c (linux_attach_lwp): Use strerror.
3670 * utils.c (perror_with_name): Use strerror.
3671 * config.in, configure: Regenerated.
3673 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3675 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3676 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3678 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3680 * Makefile.in (SFILES): Update.
3681 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3682 low-sun3.c: Remove files.
3684 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3686 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3687 (linux_detach_one_process, linux_detach): New functions.
3688 (linux_target_ops): Add linux_detach.
3689 * server.c (main): Handle 'D' packet.
3690 * target.h (struct target_ops): Add "detach" member.
3691 (detach_inferior): Define.
3693 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3695 From Kelley Cook <kelleycook@wideopenwest.com>:
3696 * configure.srv: Accept i[34567]86 variants.
3698 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3700 * linux-low.c (linux_wait_for_event): Correct comment typos.
3701 (linux_resume_one_process): Call check_removed_breakpoint.
3702 (linux_send_signal): New function.
3703 (linux_target_ops): Add linux_send_signal.
3704 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3706 * target.h (struct target_ops): Add send_signal.
3708 2003-05-29 Jim Blandy <jimb@redhat.com>
3710 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3711 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3712 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3713 away part of the register's value.
3715 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3717 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
3718 (linux_wait_for_event, linux_init_signals): Likewise.
3720 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
3722 * configure.in: Check for stdlib.h.
3723 * configure: Regenerated.
3724 * config.in: Regenerated.
3726 2003-01-04 Andreas Schwab <schwab@suse.de>
3728 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
3730 2003-01-02 Andrew Cagney <ac131313@redhat.com>
3732 * Makefile.in: Remove obsolete code.
3734 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3736 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
3737 defined(PT_FPR0_HI).
3739 2002-11-17 Stuart Hughes <seh@zee2.com>
3741 * linux-arm-low.c (arm_num_regs): Increase.
3742 (arm_regmap): Include status register.
3744 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
3746 * linux-low.c (register_addr): Remove incorrect -1 check.
3748 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
3750 * linux-low.c (linux_create_inferior): Call setpgid. Return
3752 (unstopped_p, linux_signal_pid): Remove.
3753 (linux_target_ops): Remove linux_signal_pid.
3754 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
3755 global instead of target method.
3756 * target.h (struct target_ops): Remove signal_pid. Update comment
3757 for create_inferior.
3758 * server.c (signal_pid): New variable.
3759 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
3760 gdbserver. Set the child to be the foreground process group.
3761 (attach_inferior): Set signal_pid.
3763 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
3765 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
3767 2002-08-20 Jim Blandy <jimb@redhat.com>
3769 * Makefile.in (LDFLAGS): Allow the configure script to establish a
3772 2002-08-01 Andrew Cagney <cagney@redhat.com>
3774 * Makefile.in: Make chill references obsolete.
3776 2002-07-24 Kevin Buettner <kevinb@redhat.com>
3778 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
3779 * configure: Regenerate.
3780 * config.in: Regenerate.
3782 2002-07-09 David O'Brien <obrien@FreeBSD.org>
3784 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
3785 (perror_with_name, remote_close, remote_open, expect, play): Static.
3787 2002-07-04 Michal Ludvig <mludvig@suse.cz>
3789 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
3790 byte offsets instead of an array of indexes.
3791 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
3793 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
3795 * regcache.c: Add comment.
3797 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
3799 * thread-db.c: New file.
3800 * proc-service.c: New file.
3801 * acinclude.m4: New file.
3802 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3803 proc-service.o, and thread-db.o.
3804 (linux-low.o): Add USE_THREAD_DB.
3805 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3806 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3807 * aclocal.m4: Regenerated.
3808 * config.in: Regenerated.
3809 * configure: Regenerated.
3810 * configure.in: Check for proc_service.h, sys/procfs.h,
3811 thread_db.h, and linux/elf.h headrs.
3812 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3813 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3814 Check for -lthread_db and thread support.
3815 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3816 PowerPC, and SuperH.
3817 * i387-fp.c: Constify arguments.
3818 * i387-fp.h: Likewise.
3819 * inferiors.c: (struct thread_info): Renamed from
3820 `struct inferior_info'. Remove PID member. Use generic inferior
3821 list header. All uses updated.
3822 (inferiors, signal_pid): Removed.
3823 (all_threads): New variable.
3824 (get_thread): Define.
3825 (add_inferior_to_list): New function.
3826 (for_each_inferior): New function.
3827 (change_inferior_id): New function.
3828 (add_inferior): Removed.
3829 (remove_inferior): New function.
3830 (add_thread): New function.
3831 (free_one_thread): New function.
3832 (remove_thread): New function.
3833 (clear_inferiors): Use for_each_inferior and free_one_thread.
3834 (find_inferior): New function.
3835 (find_inferior_id): New function.
3836 (inferior_target_data): Update argument type.
3837 (set_inferior_target_data): Likewise.
3838 (inferior_regcache_data): Likewise.
3839 (set_inferior_regcache_data): Likewise.
3840 * linux-low.c (linux_bp_reinsert): Remove.
3841 (all_processes, stopping_threads, using_thrads)
3842 (struct pending_signals, debug_threads, pid_of): New.
3843 (inferior_pid): Replace with macro.
3844 (struct inferior_linux_data): Remove.
3845 (get_stop_pc, add_process): New functions.
3846 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3847 Use add_process and add_thread.
3848 (linux_attach_lwp): New function, based on old linux_attach. Use
3849 add_process and add_thread. Set stop_expected for new threads.
3850 (linux_attach): New function.
3851 (linux_kill_one_process): New function.
3852 (linux_kill): Kill all LWPs.
3853 (linux_thread_alive): Use find_inferior_id.
3854 (check_removed_breakpoints, status_pending_p): New functions.
3855 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3856 Update. Use WNOHANG. Wait for cloned processes also. Update process
3857 struct for the found process.
3858 (linux_wait_for_event): New function.
3859 (linux_wait): Use it. Support LWPs.
3860 (send_sigstop, wait_for_sigstop, stop_all_processes)
3861 (linux_resume_one_process, linux_continue_one_process): New functions.
3862 (linux_resume): Support LWPs.
3863 (REGISTER_RAW_SIZE): Remove.
3864 (fetch_register): Use register_size instead. Call supply_register.
3865 (usr_store_inferior_registers): Likewise. Call collect_register.
3867 (regsets_fetch_inferior_registers): Improve error message.
3868 (regsets_store_inferior_registers): Add debugging.
3869 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3870 (unstopped_p, linux_signal_pid): New functions.
3871 (linux_target_ops): Add linux_signal_pid.
3872 (linux_init_signals): New function.
3873 (initialize_low): Call it. Initialize using_threads.
3874 * regcache.c (inferior_regcache_data): Add valid
3876 (get_regcache): Fetch registers lazily. Add fetch argument
3877 and update all callers.
3878 (regcache_invalidate_one, regcache_invalidate): New
3880 (new_register_cache): Renamed from create_register_cache.
3881 Return the new regcache.
3882 (free_register_cache): Change argument to a void *.
3883 (registers_to_string, registers_from_string): Call get_regcache
3884 with fetch flag set.
3885 (register_data): Make static. Pass fetch flag to get_regcache.
3886 (supply_register): Call get_regcache with fetch flag clear.
3887 (collect_register): Call get_regcache with fetch flag set.
3888 (collect_register_as_string): New function.
3889 * regcache.h: Update.
3890 * remote-utils.c (putpkt): Flush after debug output and use
3892 Handle input interrupts while waiting for an ACK.
3893 (input_interrupt): Use signal_pid method.
3894 (getpkt): Flush after debug output and use stderr.
3895 (outreg): Use collect_register_as_string.
3896 (new_thread_notify, dead_thread_notify): New functions.
3897 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3899 (look_up_one_symbol): Flush after debug output.
3900 * server.c (step_thread, server_waiting): New variables.
3901 (start_inferior): Don't use signal_pid. Update call to mywait.
3902 (attach_inferior): Update call to mywait.
3903 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3904 (main): Don't fetch/store registers explicitly. Use
3905 set_desired_inferior. Support proposed ``Hs'' packet. Update
3908 (struct inferior_list, struct_inferior_list_entry): New.
3909 * target.c (set_desired_inferior): New.
3910 (write_inferior_memory): Constify.
3911 (mywait): New function.
3913 (struct target_ops): New signal_pid method.
3914 (mywait): Removed macro, added prototype.
3916 * linux-low.h (regset_func): Removed.
3917 (regset_fill_func, regset_store_func): New.
3918 (enum regset_type): New.
3919 (struct regset_info): Add type field. Use new operation types.
3920 (struct linux_target_ops): stop_pc renamed to get_pc.
3921 Add decr_pc_after_break and breakpoint_at.
3922 (get_process, get_thread_proess, get_process_thread)
3923 (strut process_info, all_processes, linux_attach_lwp)
3924 (thread_db_init): New.
3926 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3927 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3928 (the_low_target): Add new members.
3929 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3930 (i386_store_fpxregset): Constify.
3931 (target_regsets): Add new kind identifier.
3932 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3933 (i386_set_pc): Add debugging.
3934 (i386_breakpoint_at): New function.
3935 (the_low_target): Add new members.
3936 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3937 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3938 (mips_breakpoint_at): New.
3939 (the_low_target): Add new members.
3940 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3941 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3942 (the_low_target): Add new members.
3943 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3944 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3945 (the_low_target): Add new members.
3946 * linux-x86-64-low.c (target_regsets): Add new kind
3949 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3951 From Martin Pool <mbp@samba.org>:
3952 * server.c (gdbserver_usage): New function.
3955 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3957 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3960 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3962 * Makefile.in: Remove obsolete code.
3964 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3966 * linux-low.c (regsets_fetch_inferior_registers),
3967 (regsets_store_inferior_registers): Removed cast to int from
3969 * regcache.h: Added declaration of struct inferior_info.
3971 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3973 * inferiors.c (struct inferior_info): Add regcache_data.
3974 (add_inferior): Call create_register_cache.
3975 (clear_inferiors): Call free_register_cache.
3976 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3977 * regcache.c (struct inferior_regcache_data): New.
3978 (registers): Remove.
3979 (get_regcache): New function.
3980 (create_register_cache, free_register_cache): New functions.
3981 (set_register_cache): Don't initialize the register cache here.
3982 (registers_to_string, registers_from_string, register_data): Call
3984 * regcache.h: Add prototypes.
3985 * server.h: Likewise.
3987 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3989 * mem-break.c: New file.
3990 * mem-break.h: New file.
3991 * Makefile.in: Add mem-break.o rule; update server.h
3993 * inferiors.c (struct inferior_info): Add target_data
3995 (clear_inferiors): Free target_data member if set.
3996 (inferior_target_data, set_inferior_target_data): New functions.
3997 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3998 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3999 * linux-low.c (linux_bp_reinsert): New variable.
4000 (struct inferior_linux_data): New.
4001 (linux_create_inferior): Use set_inferior_target_data.
4002 (linux_attach): Likewise. Call add_inferior.
4003 (linux_wait_for_one_inferior): New function.
4004 (linux_wait): Call it.
4005 (linux_write_memory): Add const.
4006 (initialize_low): Call set_breakpoint_data.
4007 * linux-low.h (struct linux_target_ops): Add breakpoint
4009 * server.c (attach_inferior): Remove extra add_inferior
4011 * server.h: Include mem-break.h. Update inferior.c
4013 * target.c (read_inferior_memory)
4014 (write_inferior_memory): New functions.
4015 * target.h (read_inferior_memory)
4016 (write_inferior_memory): Change macros to prototypes.
4017 (struct target_ops): Update comments. Add const to write_memory
4020 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4022 * linux-low.c (usr_store_inferior_registers): Support
4023 registers which are allowed to fail to store.
4024 * linux-low.h (linux_target_ops): Likewise.
4025 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4026 (ppc_cannot_store_register): FPSCR may not be storable.
4028 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4030 * server.h: Include <string.h> if HAVE_STRING_H.
4031 * ChangeLog: Correct paths in last ChangeLog entry.
4033 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4035 * linux-low.h: Remove obsolete prototypes.
4036 (struct linux_target_ops): New.
4037 (extern the_low_target): New.
4038 * linux-low.c (num_regs, regmap): Remove declarations.
4039 (register_addr): Use the_low_target explicitly.
4040 (fetch_register): Likewise.
4041 (usr_fetch_inferior_registers): Likewise.
4042 (usr_store_inferior_registers): Likewise.
4043 * linux-arm-low.c (num_regs): Remove.
4044 (arm_num_regs): Define.
4045 (arm_regmap): Renamed from regmap, made static.
4046 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4048 (arm_cannot_store_register): Renamed from cannot_store_register,
4050 (the_low_target): New.
4051 * linux-i386-low.c (num_regs): Remove.
4052 (i386_num_regs): Define.
4053 (i386_regmap): Renamed from regmap, made static.
4054 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4056 (i386_cannot_store_register): Renamed from cannot_store_register,
4058 (the_low_target): New.
4059 * linux-ia64-low.c (num_regs): Remove.
4060 (ia64_num_regs): Define.
4061 (ia64_regmap): Renamed from regmap, made static.
4062 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4064 (ia64_cannot_store_register): Renamed from cannot_store_register,
4066 (the_low_target): New.
4067 * linux-m68k-low.c (num_regs): Remove.
4068 (m68k_num_regs): Define.
4069 (m68k_regmap): Renamed from regmap, made static.
4070 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4072 (m68k_cannot_store_register): Renamed from cannot_store_register,
4074 (the_low_target): New.
4075 * linux-mips-low.c (num_regs): Remove.
4076 (mips_num_regs): Define.
4077 (mips_regmap): Renamed from regmap, made static.
4078 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4080 (mips_cannot_store_register): Renamed from cannot_store_register,
4082 (the_low_target): New.
4083 * linux-ppc-low.c (num_regs): Remove.
4084 (ppc_num_regs): Define.
4085 (ppc_regmap): Renamed from regmap, made static.
4086 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4088 (ppc_cannot_store_register): Renamed from cannot_store_register,
4090 (the_low_target): New.
4091 * linux-s390-low.c (num_regs): Remove.
4092 (s390_num_regs): Define.
4093 (s390_regmap): Renamed from regmap, made static.
4094 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4096 (s390_cannot_store_register): Renamed from cannot_store_register,
4098 (the_low_target): New.
4099 * linux-sh-low.c (num_regs): Remove.
4100 (sh_num_regs): Define.
4101 (sh_regmap): Renamed from regmap, made static.
4102 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4104 (sh_cannot_store_register): Renamed from cannot_store_register,
4106 (the_low_target): New.
4107 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4108 (the_low_target): New.
4110 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4112 * Makefile.in: Add stamp-h target.
4113 * configure.in: Create stamp-h.
4114 * configure: Regenerated.
4116 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4118 * inferiors.c: New file.
4119 * target.c: New file.
4120 * target.h: New file.
4121 * Makefile.in: Add target.o and inferiors.o. Update
4123 * linux-low.c (inferior_pid): New static variable,
4124 moved from server.c.
4125 (linux_create_inferior): Renamed from create_inferior.
4126 Call add_inferior. Return 0 on success instead of a PID.
4127 (linux_attach): Renamed from myattach.
4128 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4129 (linux_thread_alive): Renamed from mythread_alive.
4130 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4132 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4133 (regsets_store_inferior_registers): Correct error message.
4134 Add missing ``return 0''.
4135 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4136 (linux_store_registers): Renamed from store_inferior_registers.
4137 (linux_read_memory): Renamed from read_inferior_memory.
4138 (linux_write_memory): Renamed from write_inferior_memory.
4139 (linux_target_ops): New structure.
4140 (initialize_low): Call set_target_ops ().
4141 * remote-utils.c (unhexify): New function.
4142 (hexify): New function.
4143 (input_interrupt): Send signals to ``signal_pid''.
4144 * server.c (inferior_pid): Remove.
4145 (start_inferior): Update create_inferior call.
4146 (attach_inferior): Call add_inferior.
4147 (handle_query): New function.
4148 (main): Call handle_query for `q' packets.
4149 * server.h: Include "target.h". Remove obsolete prototypes.
4150 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4152 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4154 * Makefile.in: Add WARN_CFLAGS. Update configury
4156 * configure.in: Check for <string.h>
4157 * configure: Regenerate.
4158 * config.in: Regenerate.
4159 * gdbreplay.c: Include needed system headers.
4160 (remote_open): Remove strchr prototype.
4161 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4162 * regcache.c (supply_register): Change buf argument to const void *.
4163 (supply_register_by_name): Likewise.
4164 (collect_register): Change buf argument to void *.
4165 (collect_register_by_name): Likewise.
4166 * regcache.h: Add missing prototypes.
4167 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4168 * server.c (handle_query): New function.
4169 (attached): New static variable, moved out of main.
4170 (main): Quiet longjmp clobber warnings.
4171 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4172 * utils.c (error): Remove NORETURN.