1 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3 * Makefile.in (LIBOBJS): New.
6 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7 * configure: Regenerated.
9 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11 * server.c (handle_query): Never return "unsupported" for
12 qXfer:features:read queries.
14 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16 * server.c (get_features_xml): Fix inverted condition.
17 (handle_query): Always support qXfer:feature:read.
19 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
21 * server.c (wrapper_argv): New.
22 (start_inferior): Handle wrapper_argv. If set, expect an extra
24 (gdbserver_usage): Document --wrapper.
25 (main): Parse --wrapper.
27 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
29 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
30 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
31 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
32 (ppc_set_pc): Likewise.
33 (ppc_arch_setup): New function.
34 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
36 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
38 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
40 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
41 instead of linux-ppc64-low.o.
42 * linux-ppc64-low.c: Remove file.
43 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
44 (linux-ppc64-low.o): Remove rule.
46 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
47 (init_registers_powerpc_64): Likewise.
48 (ppc_regmap): Conditionally define depending on __powerpc64__.
49 (ppc_cannot_store_register): Do not special-case "fpscr" when
50 compiled on __powerpc64__.
51 (ppc_collect_ptrace_register): New function.
52 (ppc_supply_ptrace_register): New function.
53 (ppc_breakpoint): Change type to "unsigned int".
54 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
55 (the_low_target): Conditionally provide initializers for the
56 arch_setup member depending on __powerpc64__. Install
57 collect_ptrace_register and supply_ptrace_register members.
59 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
61 * regcache.h (gdbserver_xmltarget): Add extern declaration.
62 * server.c (gdbserver_xmltarget): Define.
63 (get_features_xml): Use it to replace "target.xml" and arch_string.
65 * configure.srv: Remove srv_xmltarget. Add XML files that were
66 mentioned there to srv_xmlfiles instead. Remove conditional tests
67 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
68 srv_xmlfiles and srv_regobj to include all possible choices.
69 * configure.ac (srv_xmltarget): Remove.
70 (srv_xmlfiles): Do not add "target.xml".
71 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
72 checks for supplementary target information.
73 * configure: Regenerate.
74 * Makefile.in (XML_TARGET): Remove.
75 (target.xml): Remove rule.
76 (clean): Do not clean up target.xml.
77 (.PRECIOUS): Do not mention target.xml.
79 * target.h (struct target_ops): Remove arch_string member.
80 * linux-low.c (linux_arch_string): Remove.
81 (linux_target_ops): Remove arch_string initializer.
82 * linux-low.h (struct linux_target_ops): Remove arch_string member.
83 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
84 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
85 * spu-low.c (spu_arch_string): Remove.
86 (spu_target_ops): Remove arch_string initializer.
87 * win32-low.c (win32_arch_string): Remove.
88 (win32_target_ops): Remove arch_string initializer.
89 * win32-low.h (struct win32_target_ops): Remove arch_string member.
90 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
91 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
93 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
95 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
96 by collect_ptrace_register and supply_ptrace_register hooks.
97 * linux-low.c (fetch_register): Use supply_ptrace_register callback
98 instead of checking for the_low_target.left_pad_xfer.
99 (usr_store_inferior_registers): Use collect_ptrace_register callback
100 instead of checking for the_low_target.left_pad_xfer.
102 * linux-s390-low.c (s390_collect_ptrace_register): New function.
103 (s390_supply_ptrace_register): Likewise.
104 (s390_fill_gregset): Call s390_collect_ptrace_register.
105 (the_low_target): Update.
107 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
108 (ppc_supply_ptrace_register): Likewise.
109 (the_low_target): Update.
111 * linux-i386-low.c (the_low_target): Update.
112 * linux-x86-64-low.c (the_low_target): Update.
114 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
116 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
117 reg-s390.o and reg-s390x.o.
119 * linux-low.c (new_inferior): New global variable.
120 (linux_create_inferior, linux_attach): Set it.
121 (linux_wait_for_process): Call the_low_target.arch_setup after the
122 target has stopped for the first time.
123 (initialize_low): Do not call the_low_target.arch_setup.
125 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
126 (s390_set_pc): Likewise.
127 (s390_arch_setup): New function.
128 (the_low_target): Use s390_arch_setup as arch_setup routine.
130 * regcache.c (realloc_register_cache): New function.
131 (set_register_cache): Call it for each existing regcache.
133 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
135 * server.h (init_registers): Remove prototype.
137 * linux-low.h (struct linux_target_ops): Add arch_setup field.
138 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
139 instead of init_registers ().
140 * linux-arm-low.c (init_registers_arm): Add prototype.
141 (init_registers_arm_with_iwmmxt): Likewise.
142 (the_low_target): Add initializer for arch_setup field.
143 * linux-cris-low.c (init_registers_cris): Add prototype.
144 (the_low_target): Add initializer for arch_setup field.
145 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
146 (the_low_target): Add initializer for arch_setup field.
147 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
148 (the_low_target): Add initializer for arch_setup field.
149 * linux-ia64-low.c (init_registers_ia64): Add prototype.
150 (the_low_target): Add initializer for arch_setup field.
151 * linux-m32r-low.c (init_registers_m32r): Add prototype.
152 (the_low_target): Add initializer for arch_setup field.
153 * linux-m68k-low.c (init_registers_m68k): Add prototype.
154 (the_low_target): Add initializer for arch_setup field.
155 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
156 (init_registers_mips64_linux): Likewise.
157 (the_low_target): Add initializer for arch_setup field.
158 * linux-ppc-low.c (init_registers_ppc): Add prototype.
159 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
160 (the_low_target): Add initializer for arch_setup field.
161 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
162 (init_registers_powerpc_64): Likewise.
163 (the_low_target): Add initializer for arch_setup field.
164 * linux-s390-low.c (init_registers_s390): Add prototype.
165 (init_registers_s390x): Likewise.
166 (the_low_target): Add initializer for arch_setup field.
167 * linux-sh-low.c (init_registers_sh): Add prototype.
168 (the_low_target): Add initializer for arch_setup field.
169 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
170 (the_low_target): Add initializer for arch_setup field.
171 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
172 (the_low_target): Add initializer for arch_setup field.
174 * win32-low.h (struct win32_target_ops): Add arch_setup field.
175 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
176 instead of init_registers ().
177 * win32-arm-low.c (init_registers_arm): Add prototype.
178 (the_low_target): Add initializer for arch_setup field.
179 * win32-i386-low.c (init_registers_i386): Add prototype.
180 (the_low_target): Add initializer for arch_setup field.
182 * spu-low.c (init_registers_spu): Add prototype.
183 (initialize_low): Call initialie_registers_spu () instead of
184 initialize_registers ().
186 2008-02-19 Pedro Alves <pedro@codesourcery.com>
188 * server.c (handle_v_requests): When handling the vRun and vAttach
189 packets, if already debugging a process, don't kill it. Return an
192 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
194 * server.c (handle_query): Correct length check.
196 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
198 * win32-low.c (do_initial_child_stuff): Add process handle
199 parameter. Set current_process_handle and current_process_id from the
200 parameters. Clear globals.
201 (win32_create_inferior): Don't set current_process_handle and
202 current_process_id here. Instead pass them on the call to
203 do_initial_child_stuff.
204 (win32_attach): Likewise.
205 (win32_clear_inferiors): New.
206 (win32_kill): Don't close the current process handle or the
207 current thread handle here. Instead call win32_clear_inferiors.
208 (win32_detach): Don't open a new handle to the process. Call
209 win32_clear_inferiors.
210 (win32_join): Don't rely on current_process_handle; open a new
211 handle using the process id.
212 (win32_wait): Call win32_clear_inferiors when the inferior process
215 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
217 * server.c (monitor_show_help): Add "exit".
219 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
221 * Makefile.in (SFILES): Add linux-xtensa-low.c.
222 (clean): Add reg-xtensa.c.
223 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
224 * configure.srv (xtensa*-*-linux*) New target.
225 * linux-xtensa-low.c: New.
226 * xtensa-xtregs.c: New.
228 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
230 * hostio.c: Don't include errno.h.
231 (errno_to_fileio_errno): Move to hostio-errno.
232 * hostio.c: (hostio_error): Remove the error parameter. Defer the
233 error number outputting to the target->hostio_last_error callback.
234 (hostio_packet_error): Use FILEIO_EINVAL directly.
235 (handle_open, handle_pread, hostio_error, handle_unlink): Update
236 calls to hostio_error.
237 * hostio-errno.c: New.
238 * server.h (hostio_last_error_from_errno): Declare.
239 * target.h (target_ops): Add hostio_last_error member.
240 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
241 as hostio_last_error handler.
242 * spu-low.c (spu_target_ops): Likewise.
243 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
244 (wince_hostio_last_error): New functions.
245 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
246 as hostio_last_error handler.
247 (win32_target_ops) [!_WIN32_WCE]: Register
248 hostio_last_error_from_errno as hostio_last_error handler.
249 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
250 (hostio-errno.o): New rule.
251 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
252 * configure.srv (srv_hostio_err_objs): New variable. Default to
254 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
255 * configure: Regenerate.
257 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
259 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
260 (linux_kill, linux_detach): Clean up the process list.
261 * remote-utils.c (remote_open): Improve port number parsing.
262 (putpkt_binary, input_interrupt): Only send interrupts if the target
264 * server.c (extended_protocol): Make static.
265 (attached): Define earlier.
266 (exit_requested, response_needed, program_argv): New variables.
267 (target_running): New.
268 (start_inferior): Clear attached here.
269 (attach_inferior): Set attached here.
270 (require_running): Define.
271 (handle_query): Use require_running and target_running. Implement
273 (handle_v_attach, handle_v_run): New.
274 (handle_v_requests): Use require_running. Handle vAttach and vRun.
275 (gdbserver_usage): Update.
276 (main): Redo argument parsing. Handle --debug and --multi. Handle
277 --attach along with other options or after the port. Save
278 program_argv. Support no initial program. Resynchronize
279 communication with GDB after an error. Handle "monitor exit".
280 Use require_running and target_running. Always allow the extended
281 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
282 restart in extended mode.
283 * README: Refer to the GDB manual. Update --attach usage.
285 2007-12-20 Andreas Schwab <schwab@suse.de>
287 * linux-low.c (STACK_SIZE): Define.
288 (linux_tracefork_child): Use it. Use __clone2 on ia64.
289 (linux_test_for_tracefork): Likewise.
291 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
293 * linux-low.c (linux_wait_for_event): Update messages. Do not
294 reinsert auto-delete breakpoints.
295 * mem-break.c (struct breakpoint): Change return type of handler to
297 (set_breakpoint_at): Update handler type.
298 (reinsert_breakpoint_handler): Return 1 instead of calling
300 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
302 (check_breakpoints): Delete auto-delete breakpoints and return 2.
303 * mem-break.h (set_breakpoint_at): Update handler type.
304 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
305 * win32-low.c (auto_delete_breakpoint): New.
306 (get_child_debug_event): Use it.
308 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
310 * configure.ac: Check for pread and pwrite.
311 * hostio.c (handle_pread): Fall back to lseek and read.
312 (handle_pwrite): Fall back to lseek and write.
313 * config.in, configure: Regenerated.
315 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
317 * server.c (myresume): Add own_buf argument.
318 (main): Update calls.
320 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
322 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
323 * remote-utils.c (remote_open): Do not call disable_async_io.
324 (block_async_io): Delete.
325 (unblock_async_io): Make static.
326 (initialize_async_io): New.
327 * server.c (handle_v_cont): Handle async I/O here.
328 (myresume): Likewise. Move other common resume tasks here...
329 (main): ... from here. Call initialize_async_io. Disable async
330 I/O before the main loop.
331 * server.h (initialize_async_io): Declare.
332 (block_async_io, unblock_async_io): Delete prototypes.
333 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
335 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
337 * remote-utils.c (readchar): Allow binary data in received messages.
339 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
341 * win32-low.c (attaching): New global.
342 (win32_create_inferior): Clear the `attaching' global.
343 (win32_attach): Set the `attaching' global.
344 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
345 attaching. Only set a breakpoint at the entry point if not
348 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
350 * server.c (main): Don't report dll events on the initial
351 connection on attaches.
353 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
355 * server.c (main): Relax numerical bases supported for the pid of
356 the --attach command line argument.
358 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
360 * win32-low.c (win32_attach): Call OpenProcess before
361 DebugActiveProcess, not after. Add last error output to error
364 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
366 * win32-low.c (win32_get_thread_context)
367 (win32_set_thread_context): New functions.
368 (thread_rec): Use win32_get_thread_context.
369 (continue_one_thread, win32_resume): Use win32_set_thread_context.
370 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
374 Pedro Alves <pedro_alves@portugalmail.pt>
376 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
378 (child_add_thread): Minor cleanup.
379 (child_continue): Resume artificially suspended threads before
380 calling ContinueDebugEvent.
381 (suspend_one_thread): New.
382 (fake_breakpoint_event): New.
383 (get_child_debug_event): Change return type to int. Check here if
384 gdb sent an interrupt request. If a soft interrupt was requested,
385 fake a breakpoint event. Return 0 if there is no event to handle,
387 (win32_wait): Don't check here if gdb sent an interrupt request.
388 Ensure there is a valid event to handle.
389 (win32_request_interrupt): Add soft interruption method as last
393 Pedro Alves <pedro_alves@portugalmail.pt>
395 * win32-low.h (win32_thread_info): Add descriptions to the
396 structure members. Replace `suspend_count' counter by a
398 * win32-low.c (thread_rec): Update condition of when to get the
399 context from the inferior. Rely on ContextFlags being set if it
400 has already been retrieved. Only suspend the inferior thread if
401 we haven't already. Warn if that fails.
402 (continue_one_thread): s/suspend_count/suspended/. Only call
403 ResumeThread once. Warn if that fails.
405 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
407 * win32-low.c (win32_wait): Don't read from the inferior when it
410 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
412 * Makefile.in (win32_low_h): New variable.
413 (win32-low.o): Add dependency on $(win32_low_h).
414 (win32-arm-low.o, win32-i386-low.o): New rules.
416 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
418 * hostio.c: Correct copyright year.
420 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
422 * Makefile.in (OBS): Add hostio.o.
423 (hostio.o): New rule.
424 * server.h (handle_vFile): Declare.
425 * hostio.c: New file.
426 * server.c (handle_v_requests): Take packet_len and new_packet_len
427 for binary packets. Call handle_vFile.
428 (main): Update call to handle_v_requests.
430 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
432 * linux-low.c: Include <sched.h>.
434 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
436 * linux-low.c (linux_tracefork_grandchild): New.
437 (linux_tracefork_child): Use clone.
438 (linux_test_for_tracefork): Use clone; allocate and free a stack.
440 2007-10-31 Joel Brobecker <brobecker@adacore.com>
442 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
444 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
446 * linux-low.c (handle_extended_wait): Handle unexpected signals.
448 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
450 * inferiors.c (change_inferior_id): Delete.
451 (add_pid_to_list, pull_pid_from_list): New.
452 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
453 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
454 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
455 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
456 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
457 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
458 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
459 (using_threads): Always set to 1.
460 (handle_extended_wait): New.
461 (add_process): Do not set TID.
462 (linux_create_inferior): Set must_set_ptrace_flags.
463 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
464 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
465 (linux_thread_alive): Rename TID argument to LWPID.
466 (linux_wait_for_process): Handle unknown processes. Do not use TID.
467 (linux_wait_for_event): Do not use TID or check using_threads. Update
468 call to dead_thread_notify. Call handle_extended_wait.
469 (linux_create_inferior): Use PTRACE_SETOPTIONS.
470 (send_sigstop): Delete sigstop_sent.
471 (wait_for_sigstop): Avoid TID.
472 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
473 (linux_test_for_tracefork): New.
474 (linux_lookup_signals): Use thread_db_active and
475 linux_supports_tracefork_flag.
476 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
477 * linux-low.h (get_process_thread): Avoid TID.
478 (struct process_ifo): Move thread_known and tid to the end. Remove
480 (linux_attach_lwp, thread_db_init): Update prototypes.
481 * server.h (change_inferior_id): Delete prototype.
482 (add_pid_to_list, pull_pid_from_list): New prototypes.
483 * thread-db.c (thread_db_use_events): New.
484 (find_first_thread): Rename to...
485 (find_one_thread): ...this. Update callers and messages. Do not
486 call fatal. Check thread_db_use_events. Do not call
487 change_inferior_id or new_thread_notify.
488 (maybe_attach_thread): Update. Do not call new_thread_notify.
489 (thread_db_init): Set thread_db_use_events. Check use_events.
490 * utils.c (fatal, warning): Correct message prefix.
492 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
494 * Makefile.in (clean): Remove new files.
495 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
496 (powerpc-64.o, powerpc-64.c): New rules.
497 * configure.srv: Use alternate register sets for powerpc64-*-linux*
498 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
500 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
502 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
503 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
504 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
505 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
506 (target_regsets): Add AltiVec and SPE register sets.
507 * configure.ac: Check for AltiVec and SPE.
508 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
509 (ppc_fill_vrregset, ppc_store_vrregset): New.
510 (target_regsets): Add AltiVec register set.
511 * configure: Regenerated.
513 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
515 * linux-low.c (O_LARGEFILE): Define.
516 (linux_read_memory): Use /proc/PID/mem.
517 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
518 * configure, config.in: Regenerated.
520 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
522 * linux-low.c (linux_wait_for_event): Do not pass signals while
525 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
527 * win32-low.c (create_process): New.
528 (win32_create_inferior): Use create_process instead of
529 CreateProcess. If create_process failed retry appending an ".exe"
530 suffix. Store the GetLastError result immediatelly after
531 create_process calls and use it on the call to error.
533 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
535 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
537 2007-08-23 Joel Brobecker <brobecker@adacore.com>
539 * configure.ac: Switch license to GPLv3.
541 2007-08-01 Michael Snyder <msnyder@access-company.com>
543 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
545 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
547 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
549 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
550 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
551 CloseToolhelp32Snapshot.
552 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
553 CloseToolhelp32Snapshot.
555 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
557 * server.c (main): Check for inferior exit before main loop.
559 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
561 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
562 instead of on tmp_desc.
564 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
565 Daniel Jacobowitz <dan@codesourcery.com>
567 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
568 (add_thread): Minor cleanups.
569 (clear_inferiors): Move lower in the file. Clear the DLL
571 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
572 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
573 (xml_escape_text): New.
574 * server.c (handle_query): Handle qXfer:libraries:read. Report it
576 (handle_v_cont): Report errors.
577 (gdbserver_version): Update.
578 (main): Correct size of own_buf. Do not report initial DLL events.
579 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
580 (unloaded_dll, xml_escape_text): New.
581 * win32-low.c (enum target_waitkind): Update comments.
582 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
583 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
584 (win32_EnumProcessModules, win32_GetModuleInformation)
585 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
586 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
587 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
588 (win32_Module32First, win32_Module32Next, load_toolhelp)
589 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
590 (get_child_debug_event): Handle DLL events.
591 (win32_wait): Likewise.
593 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
595 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
596 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
598 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
600 * win32-low.c (handle_output_debug_string): Ignore event if not
603 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
605 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
607 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
609 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
611 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
613 * inferiors.c (change_inferior_id): Add comment.
614 * linux-low.c (check_removed_breakpoint): Add an early
615 prototype. Improve debug output.
616 (linux_attach): Doc update.
617 (linux_detach_one_process, linux_detach): Clean up before releasing
619 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
620 * linux-low.h (struct process_info): Doc improvement.
621 * mem-break.c (delete_all_breakpoints): New.
622 * mem-break.h (delete_all_breakpoints): New prototype.
623 * thread-db.c (find_first_thread): New.
624 (thread_db_create_event): Call it instead of
625 thread_db_find_new_threads. Clean up unused variables.
626 (maybe_attach_thread): Remove first thread handling.
627 (thread_db_find_new_threads): Use find_first_thread.
628 (thread_db_get_tls_address): Likewise.
630 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
632 * thread-db.c (thread_db_find_new_threads): Add prototype.
633 (thread_db_create_event): Check for the main thread before adding
635 (maybe_attach_thread): Only enable event reporting if TID == 0.
636 (thread_db_get_tls_address): Check for new threads.
638 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
640 * linux-low.c (linux_create_inferior): Try execv before execvp.
641 * spu-low.c (spu_create_inferior): Likewise.
643 2007-06-13 Mike Frysinger <vapier@gentoo.org>
645 * linux-low.c (linux_create_inferior): Change execv to execvp.
646 * spu-low.c (spu_create_inferior): Likewies.
648 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
650 * Makefile.in (clean): Clean new files instead of deleted ones.
651 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
652 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
654 * configure.srv: Specify XML files and new regformats for MIPS and
656 * linux-mips-low.c (mips_num_regs): Set to only used registers.
657 (mips_regmap): Do not fetch $0. Remove unused registers. Add
658 an entry for the restart register.
659 (mips_cannot_fetch_register, mips_cannot_store_register)
660 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
661 register names to match the XML descriptions.
662 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
663 restart register instead of $0.
665 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
666 Markus Deuling <deuling@de.ibm.com>
668 * remote-utils.c (decode_xfer_write): New function.
669 * server.h (decode_xfer_write): Add prototype.
670 * server.c (handle_query): Add PACKET_LEN argument. Support
671 qXfer:spu:read and qXfer:spu:write packets.
672 (main): Pass packet_len to handle_query.
673 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
674 * target.h (target_ops): Add qxfer_spu.
676 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
678 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
679 accessing non-seekable spufs files.
681 2007-05-16 Markus Deuling <deuling@de.ibm.com>
683 * server.c (handle_query): Add reply for qC packet.
685 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
686 Leo Zayas <lerele@champenstudios@com>
688 * server.h (check_remote_input_interrupt_request): New function.
689 * remote_utils.c (INVALID_DESCRIPTOR): New define.
690 (remote_desc): Initialize with INVALID_DESCRIPTOR.
691 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
692 (check_remote_input_interrupt_request): New function.
693 * server.h (check_remote_input_interrupt_request): Declare.
694 * win32-low.c (winapi_DebugBreakProcess,
695 winapi_GenerateConsoleCtrlEvent): New typedefs.
696 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
698 (win32_wait): Check for remote interrupt request
699 with check_remote_input_interrupt_request.
700 (win32_request_interrupt): New function.
701 (win32_target_op): Set request_interrupt to win32_request_interrupt.
703 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
705 * win32-low.c (debug_registers_changed,
706 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
707 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
708 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
709 (thread_rec): Get context using the low target.
710 (child_add_thread): Call thread_added on the low target,
711 which does the same thing.
713 (do_initial_child_stuff): Remove debug registers references.
714 Set context using the low target. Resume threads after
715 setting the contexts.
716 (child_continue): Remove dead variable. Remove debug
717 registers references.
718 (child_fetch_inferior_registers): Go through the low target.
719 (do_child_store_inferior_registers): Remove.
720 (child_store_inferior_registers): Go through the low target.
721 (win32_resume): Remove debug registers references.
722 Set context using the low target.
723 (handle_exception): Change return type to void. Don't record
724 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
725 first chance exception.
726 (get_child_debug_event): Change return type to void. Remove
727 goto loop. Always return after waiting for debug event.
728 (win32_wait): Convert to switch statement. Handle spurious
731 * win32-i386-low.c (debug_registers_changed,
732 debug_registers_used): New.
733 (initial_stuff): Rename to ...
734 (i386_initial_stuff): ... this. Clear debug registers
736 (store_debug_registers): Delete.
737 (i386_get_thread_context): New.
738 (load_debug_registers): Delete.
739 (i386_set_thread_context): New.
740 (i386_thread_added): New.
741 (single_step): Rename to ...
742 (i386_single_step): ... this.
743 (do_fetch_inferior_registers): Rename to ...
744 (i386_fetch_inferior_register): ... this.
745 (i386_store_inferior_register): New.
746 (the_low_target): Adapt to new interface.
748 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
749 (arm_get_thread_context): New.
750 (arm_set_thread_context): New.
752 (do_fetch_inferior_registers): Rename to ...
753 (arm_fetch_inferior_register): ... this.
754 (arm_store_inferior_register): New.
755 (arm_wince_breakpoint): Reimplement as unsigned long.
756 (arm_wince_breakpoint_len): Define.
757 (the_low_target): Adapt to new interface.
759 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
760 load_debug_registers. Add get_thread_context, set_thread_context,
761 thread_added and store_inferior_register. Rename
762 fetch_inferior_registers to fetch_inferior_register.
763 (regptr): Remove declaration.
765 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
767 * linux-low.c (linux_detach): Change return type to int. Return 0.
768 * spu-low.c (spu_detach): Likewise.
770 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
772 * target.h (target_ops): Change return type of detach to int.
774 (join_inferior): New.
775 * server.c (main): Don't skip detach support on mingw32.
776 If the inferior doesn't support detaching return error.
777 Call join_inferior instead of using waitpid.
778 * linux-low.c (linux_join): New.
779 (linux_target_op): Add linux_join.
780 * spu-low.c (spu_join): New.
781 (spu_target_ops): Add spu_join.
782 * win32-low.c (win32_detach): Adapt to new interface.
783 Reopen current_process_handle before detaching. Issue a child
784 resume before detaching.
786 (win32_target_op): Add win32_join.
788 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
790 * win32-low.c (win32-attach): Fix return value.
791 * target.h (target_ops): Describe ATTACH return values.
793 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
795 * win32-low.c (GETPROCADDRESS): Define.
796 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
797 (winapi_DebugSetProcessKillOnExit): Likewise.
798 (win32_create_inferior): Force usage of ansi CreateProcessA.
799 (win32_attach): Use GETPROCADDRESS.
800 (win32_detach): Likewise.
802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
804 * win32-low.c (win32_wait): Don't use WSTOPSIG.
806 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
808 * win32-low.c: Commit leftover changes from 2007-03-29.
810 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
812 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
813 fields short instead of int. Add explicit padding.
814 (i387_cache_to_fsave): Remove unnecessary casts.
815 (i387_fsave_to_cache): Doc fix.
816 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
818 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
820 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
821 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
823 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
825 * configure.srv (arm*-*-mingw32ce*): Move near the other
828 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
830 * configure.ac: Add errno checking.
831 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
832 sys/file.h and malloc.h.
833 (AC_CHECK_DECLS): Add perror.
834 (srv_mingwce): Handle.
835 * configure.srv (i[34567]86-*-cygwin*): Add
836 win32-i386-low.o to srv_tgtobj.
837 (i[34567]86-*-mingw*): Likewise.
838 (arm*-*-mingw32ce*): Add case.
839 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
840 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
841 [__MINGW32CE__] (strerror): New function.
842 [__MINGW32CE__] (errno): Define to GetLastError.
843 [__MINGW32CE__] (COUNTOF): New macro.
844 (remote_open): Remove extra close call.
845 * mem-break.c (delete_breakpoint_at): New function.
846 * mem-break.h (delete_breakpoint_at): Declare.
847 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
848 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
849 [USE_WIN32API] (read, write): Add char* casts.
850 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
851 * server.h: Include wincecompat.h on Windows CE.
852 [HAVE_ERRNO_H]: Check.
853 (perror): Declare if not declared.
854 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
855 (perror_with_name): Remove errno declaration.
856 * wincecompat.h: New.
857 * wincecompat.c: New.
859 * win32-arm-low.c: New.
860 * win32-i386-low.c: New.
861 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
862 (OUTMSG2): Make it safe.
864 (COUNTOF): New macro.
865 (NUM_REGS): Get it from the low target.
866 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
867 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
868 (thread_rec): Let low target handle debug registers.
869 (child_add_thread): Likewise.
870 (child_init_thread_list): Likewise.
871 (continue_one_thread): Likewise.
873 (do_child_fetch_inferior_registers): Move to ...
874 * win32-i386-low.c: ... here, and rename to ...
875 (do_fetch_inferior_registers): ... this.
876 * win32-low.c (child_fetch_inferior_registers):
877 Go through the low target.
878 (do_child_store_inferior_registers): Use regptr.
879 (strwinerror): New function.
880 (win32_create_inferior): Handle Windows CE.
881 Use strwinerror instead of strerror on Windows error
882 codes. Add program to the error output.
883 Don't close the main thread handle on Windows CE.
884 (win32_attach): Use coredll.dll on Windows CE.
885 (win32_kill): Close current process and current
887 (win32_detach): Use coredll.dll on Windows CE.
888 (win32_resume): Let low target handle debug registers, and
890 (handle_exception): Add/Remove initial breakpoint. Avoid
891 non-existant WSTOPSIG on Windows CE.
892 (win32_read_inferior_memory): Cast to remove warning.
893 (win32_arch_string): Go through the low target.
894 (initialize_low): Call set_breakpoint_data with the low
896 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
897 FOP_REGNUM, mappings): Move to ...
898 * win32-i386-low.c: ... here.
899 * win32-low.c (win32_thread_info): Move to ...
900 * win32-low.h: ... here.
901 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
902 win32-arm-low.c and wincecompat.c.
904 (install-only:): Likewise.
905 (gdbserver:): Likewise.
906 (gdbreplay:): Likewise.
907 * config.in: Regenerate.
908 * configure: Regenerate.
910 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
912 * win32-low.c: Rename typedef thread_info to
913 win32_thread_info throughout.
915 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
917 * win32-i386-low.c: Rename to ...
918 * win32-low.c: ... this.
919 * configure.srv: Replace win32-i386-low.o with win32-low.o.
920 * Makefile.in: Likewise.
922 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
924 * remote-utils.c (monitor_output): Constify msg parameter.
925 * server.h (monitor_output): Likewise.
926 * win32-i386-low.c (handle_output_debug_string): New.
927 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
928 handle_output_debug_string.
929 (get_child_debug_event): Likewise.
931 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
933 * server.c (main): Correct strtoul check.
935 2007-03-27 Jon Ringle <jon@ringle.org>
937 * linux-low.c: Check __ARCH_HAS_MMU__ also.
939 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
941 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
943 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
945 * terminal.h: Check HAVE_SGTTY_H.
947 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
949 * remote-utils.c (remote_open): Print out the assigned port number.
951 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
953 * remote-utils.c (monitor_output): New function.
954 * server.c (debug_threads): Define here.
955 (monitor_show_help): New function.
956 (handle_query): Handle qRcmd.
957 (main): Do not handle 'd' packet.
958 * server.h (debug_threads, remote_debug, monitor_output): Declare.
959 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
962 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
964 * Makefile.in (EXEEXT): New.
965 (clean): Use $(EXEEXT).
967 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
969 * target.h (target_ops): Rename send_signal to request_interrupt,
970 and remove enum target_signal parameter.
971 * linux-low.c (linux_request_interrupt): Rename from
972 linux_send_signal, and always send SIGINT.
973 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
974 and always send SIGINT.
975 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
977 (input_interrupt): Likewise.
979 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
981 * server.c (get_features_xml): Check if target implemented
983 * win32-i386-low.c (win32_arch_string): New.
984 (win32_target_ops): Add win32_arch_string as arch_string member.
986 2007-02-22 Markus Deuling <deuling@de.ibm.com>
988 * spu-low.c (spu_arch_string): New.
989 (spu_target_ops): Add spu_arch_string.
991 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
993 * remote-utils.c: Remove HAVE_TERMINAL_H check.
994 * configure.ac: Do not check for terminal.h.
995 * configure, config.in: Regenerated.
997 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
999 * Makefile.in (OBS): Add $(XML_BUILTIN).
1000 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1002 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1003 (arm-with-iwmmxt.c): New.
1004 * config.in, configure: Regenerate.
1005 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1006 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1007 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1008 (arm*-*-linux*): Add iWMMXt and regset support.
1009 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1010 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1011 (arm_store_wmmxregset, target_regsets): New.
1012 * server.c (get_features_xml): Take annex argument. Check builtin
1014 (handle_query): Handle multiple annexes.
1016 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1018 * remote-utils.c [USE_WIN32API] (read, write): Define.
1019 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1022 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1024 * linux-i386-low.c (the_low_target): Set arch_string.
1025 * linux-x86-64-low.c (the_low_target): Likewise.
1026 * linux-low.c (linux_arch_string): New.
1027 (linux_target_ops): Add it.
1028 * linux-low.h (struct linux_target_ops): Add arch_string.
1029 * server.c (write_qxfer_response): Use const void * for DATA.
1030 (get_features_xml): New.
1031 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1032 * target.h (struct target_ops): Add arch_string method.
1034 2007-01-03 Denis Pilat <denis.pilat@st.com>
1035 Daniel Jacobowitz <dan@codesourcery.com>
1037 * linux-low.c (linux_kill): Handle being called with no threads.
1038 * win32-i386-low.c (win32_kill): Likewise.
1039 (get_child_debug_event): Clear current_process_handle.
1041 2006-12-30 Denis PILAT <denis.pilat@st.com>
1042 Daniel Jacobowitz <dan@codesourcery.com>
1044 * remote-utils.c (remote_open): Check the type of specified
1045 serial port devices before opening them.
1046 * server.c (main): Kill the inferior if an error occurs during
1047 the first remote_open.
1049 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1051 * README: Update supported targets.
1053 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1055 * Makefile.in (clean): Remove reg-mips64.c.
1056 (reg-mips64.c, reg-mips64.o): New rules.
1057 * configure.srv: Handle mips64. Include regset support for mips.
1058 * linux-mips-low.c (union mips_register): New.
1059 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1060 (mips_breakpoint, mips_breakpoint_at): Use int.
1061 (mips_collect_register, mips_supply_register)
1062 (mips_collect_register_32bit, mips_supply_register_32bit)
1063 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1064 (mips_store_fpregset, target_regsets): New.
1065 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1067 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1069 * configure.srv: Add target "spu*-*-*".
1070 * Makefile.in (clean): Remove reg-spu.c.
1071 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1072 * spu-low.c: New file.
1074 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1076 * configure.ac: Correct td_thr_tls_get_addr test.
1077 * configure: Regenerated.
1079 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1081 * linux-low.c (linux_wait_for_event): Reformat. Use the
1083 * remote-utils.c (decode_address_to_semicolon): New.
1084 * server.c (pass_signals, handle_general_set): New.
1085 (handle_query): Mention QPassSignals for qSupported.
1086 (main): Call handle_general_set.
1087 * server.h (pass_signals, decode_address_to_semicolon): New.
1089 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1091 * server.c (handle_query): Correct error handling for read_auxv.
1093 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1095 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1096 and srv_linux_thread_db to yes.
1097 * linux-s390-low.c (s390_fill_gregset): New function.
1098 (target_regsets): Define data structure.
1100 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1102 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1103 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1104 * config.in, configure: Regenerated.
1105 * inferiors.c (gdb_id_to_thread): New function.
1106 (gdb_id_to_thread_id): Use it.
1107 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1108 * linux-low.h (struct process_info): Add th member.
1109 (thread_db_get_tls_address): New prototype.
1110 * remote-utils.c (decode_address): Make non-static.
1111 * server.c (handle_query): Handle qGetTLSAddr.
1112 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1113 * target.h (struct target_ops): Add get_tls_address.
1114 * thread-db.c (maybe_attach_thread): Save the thread handle.
1115 (thread_db_get_tls_address): New.
1117 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1119 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1120 (linux_resume_one_process): Take a siginfo_t *. Update all
1121 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1122 (struct pending_signals): Add a siginfo_t.
1123 (linux_wait_for_process): Always set last_status.
1124 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1125 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1126 * linux-low.h (struct process_info): Add last_status.
1128 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1130 * remote-utils.c (try_rle): New function.
1131 (putpkt_binary): Use it.
1133 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1135 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1136 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1137 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1138 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1139 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1142 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1144 * server.c (terminal_fd): New variable.
1145 (old_foreground_pgrp): Likewise.
1146 (restore_old_foreground_pgrp): New function.
1147 (start_inferior): Record the terminal file descriptor in terminal_fd
1148 and its original foreground group in old_foreground_pgrp. Register
1149 restore_old_foreground_pgrp with atexit().
1151 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1153 * server.c (handle_query): Correct qPart to qXfer.
1155 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1157 * configure.ac: Check for more headers which are missing on
1158 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1159 * configure.srv: Add Cygwin and mingw32.
1160 * remote-utils.c: Don't include headers unconditionally which
1161 are missing on mingw32. Include <winsock.h> for mingw32.
1162 (remote_open): Adjust for mingw32 support. Flush
1163 standard error after writing to it.
1164 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1165 (unblock_async_io, enable_async_io, disable_async_io)
1166 (readchar, getpkt): Update for Winsock support.
1167 (prepare_resume_reply): Expect a protocol signal number.
1168 * server.c: Disable <sys/wait.h> on mingw32.
1169 (start_inferior): Adjust for mingw32 support. Flush
1170 standard error after writing to it.
1171 (attach_inferior): Likewise. Use protocol signal
1173 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1175 * win32-i386-low.c: New file.
1176 * Makefile.in (XM_CLIBS): Set.
1177 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1178 (win32-i386-low.o): New dependency rule.
1179 * linux-low.c (linux_wait): Use target signal numbers.
1180 * target.h (struct target_ops): Doc fix.
1181 * server.h (target_signal_to_name): New prototype.
1182 * gdbreplay.c: Don't include headers unconditionally which
1183 are missing on mingw32. Include <winsock.h> for mingw32.
1184 (remote_close, remote_open): Adjust for Winsock support.
1185 * configure, config.in: Regenerated.
1187 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1189 * server.c (decode_xfer_read, write_qxfer_response): New.
1190 (handle_query): Take a packet length argument. Handle
1191 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1192 the qSupported response.
1193 (main): Update call to handle_query.
1195 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1197 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1198 (putpkt_binary): Renamed from putpkt and adjusted for binary
1200 (putpkt): New wrapper for putpkt_binary.
1201 (readchar): Don't mask off the high bit.
1202 (decode_X_packet): New function.
1203 * server.c (main): Call putpkt_binary if a handler sets the packet
1204 length. Save the length of the incoming packet. Handle 'X'.
1205 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1207 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1209 * server.c (handle_query): Handle qSupported.
1211 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1213 * remote-utils.c (all_symbols_looked_up): New variable.
1214 (look_up_one_symbol): Check it.
1215 * server.h (look_up_one_symbol): New declaration.
1216 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1218 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1220 * Makefile.in (linux-arm-low.o): Update dependencies.
1221 * linux-arm-low.c: Include "gdb_proc_service.h".
1222 (PTRACE_GET_THREAD_AREA): Define.
1223 (ps_get_thread_area): New function.
1225 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1227 * configure.srv (m68k*-*-uclinux*): New target.
1228 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1229 (linux_resume_one_process): Remove extraneous cast.
1230 (linux_read_offsets): New.
1231 (linux_target_op): Add linux_read_offsets on mmuless systems.
1232 * server.c (handle_query): Add qOffsets logic.
1233 * target.h (struct target_ops): Add read_offsets.
1235 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1237 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1238 (PTRACE_GET_THREAD_AREA): Define.
1239 (ps_get_thread_area): New function.
1240 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1241 (linux-x86-64-low.o): Update.
1243 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1245 * configure.ac: Remove checks for prfpregset_t.
1246 * gdb_proc_service.h: New file.
1247 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1248 new "gdb_proc_service.h".
1249 * proc-service.c: Likewise.
1250 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1251 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1252 * Makefile.in (gdb_proc_service_h): Updated.
1253 * configure, config.in: Regenerated.
1255 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1257 * remote-utils.c (prepare_resume_reply): Move declaration
1258 of gdb_id_from_wait to the top of the block.
1260 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1262 * linux-low.c (regsets_store_inferior_registers): Read the regset
1263 from the target before filling it.
1265 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1267 * server.c (attach_inferior): Return SIGTRAP for a successful
1270 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1272 * Makefile.in (OBS): Add version.o.
1273 (STAGESTUFF): Delete.
1274 (version.o): Add dependencies.
1275 (version.c): Replace rule.
1276 (clean): Remove version.c.
1277 * server.c (gdbserver_version): New.
1278 (gdbserver_usage): Use printf.
1279 (main): Handle --version and --help.
1280 * server.h (version, host_name): Add declarations.
1282 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1294 * linux-x86-64-low.c:
1297 * linux-ppc64-low.c:
1306 * linux-crisv32-low.c:
1318 * gdbserver.1: Add (C) after Copyright. Update the FSF
1321 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1323 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1324 (arm_breakpoint_at): Recognize both breakpoints.
1325 (the_low_target): Use the correct breakpoint instruction.
1327 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1329 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1330 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1331 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1332 (the_low_target): Update.
1334 2005-10-25 Andreas Schwab <schwab@suse.de>
1336 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1338 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1339 (ia64_num_regs): Reduce to 462.
1341 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1343 * acinclude.m4: Correct quoting.
1344 * aclocal.m4: Regenerated.
1346 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1347 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1348 (thread_db_init): Call thread_db_err_str.
1349 * configure.ac: Check for TD_VERSION.
1350 * config.in, configure: Regenerated.
1352 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1354 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1356 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1358 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1359 is not available. Define HAVE_PTRACE_GETREGS if it is.
1360 * config.in, configure: Regenerated.
1361 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1362 * linux-i386-low.c, linux-m68k-low.c: Update to use
1363 HAVE_PTRACE_GETREGS.
1364 * linux-low.c (regsets_fetch_inferior_registers)
1365 (regsets_store_inferior_registers): Only return 0 if we processed
1367 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1368 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1370 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1372 * inferiors.c (struct thread_info): Add gdb_id.
1373 (add_thread): Add gdb_id argument.
1374 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1375 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1376 calls to add_thread.
1377 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1378 * server.c (handle_query): Use thread_to_gdb_id.
1379 (handle_v_cont, main): Use gdb_id_to_thread_id.
1380 * server.h (add_thread): Update prototype.
1381 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1384 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1386 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1387 left-padded registers.
1388 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1389 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1391 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1393 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1394 * configure: Regenerate.
1395 * config.in: Regenerate.
1396 * server.h (NEED_DECLARATION_STRERROR):
1397 Replace with !HAVE_DECL_STRERROR.
1399 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1401 * linux-low.c (linux_wait, linux_send_signal): Don't test
1402 an unsigned long variable for > 0 if it could be MAX_ULONG.
1403 * server.c (myresume): Likewise.
1404 * target.c (set_desired_inferior): Likewise.
1406 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1408 * configure.ac: Simplify and improve check for socklen_t.
1409 * configure, config.in: Regenerate.
1411 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1413 * acconfig.h: Remove.
1414 * configure.ac: Add a test for socklen_t. Use three-argument
1415 AC_DEFINE throughout.
1416 * config.in: Regenerated using autoheader 2.59.
1417 * configure: Regenerated.
1419 * gdbreplay.c (socklen_t): Provide a default.
1420 (remote_open): Use socklen_t.
1421 * remote-utils.c (socklen_t): Provide a default.
1422 (remote_open): Use socklen_t.
1423 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1426 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1428 * linux-low.c (linux_read_memory, linux_write_memory)
1429 (linux_read_auxv): Likewise.
1430 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1431 (check_mem_write): Likewise.
1432 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1434 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1435 (registers_from_string, register_data): Likewise.
1436 * server.c (handle_query, main): Likewise.
1437 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1438 (decode_M_packet): Likewise.
1439 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1440 * target.h (struct target_ops): Update read_memory, write_memory,
1442 (read_inferior_memory, write_inferior_memory): Update.
1443 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1445 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1446 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1447 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1448 linux-s390-low.c, linux-sh-low.c: Update for changes in
1449 read_inferior_memory and the_low_target->breakpoint.
1451 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1453 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1454 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1455 * configure.srv: Add powerpc64-*-linux*.
1456 * linux-ppc64-low.c: New file.
1458 2005-05-23 Orjan Friberg <orjanf@axis.com>
1460 * linux-cris-low.c: New file with support for CRIS.
1461 * linux-crisv32-low.c: Ditto for CRISv32.
1462 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1463 (clean): Add reg-cris.c and reg-crisv32.c.
1464 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1465 reg-crisv32.o, and reg-crisv32.c to make rules.
1466 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1469 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1471 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1472 of sizeof (PTRACE_XFER_TYPE).
1473 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1475 2005-05-12 Orjan Friberg <orjanf@axis.com>
1477 * target.h (struct target_ops): Add insert_watchpoint,
1478 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1479 pointers for hardware watchpoint support.
1480 * linux-low.h (struct linux_target_ops): Ditto.
1481 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1482 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1483 to linux_target_ops.
1484 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1486 * server.c (main): Recognize 'Z' and 'z' packets.
1488 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1490 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1491 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1492 (the_low_target): Add new members.
1494 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1496 * proc-service.c (ps_lgetregs): Search all_processes instead of
1499 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1501 * server.c (start_inferior): Change return type to int.
1502 (attach_inferior): Change sigptr to int *.
1503 (handle_v_cont, handle_v_requests): Change signal to int *.
1504 (main): Change signal to int.
1506 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1508 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1509 * configure.srv: Add m32r*-*-linux*.
1510 * linux-m32r-low.c: New file.
1512 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1514 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1516 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1518 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1519 Take unsigned long arguments for PIDs.
1520 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1521 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1522 (wait_for_sigstop, linux_resume_one_process)
1523 (regsets_fetch_inferior_registers, linux_send_signal)
1524 (linux_read_auxv): Likewise. Update the types of variables holding
1525 PIDs. Update format string specifiers.
1526 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1527 * remote-utils.c (prepare_resume_reply): Likewise.
1528 * server.c (cont_thread, general_thread, step_thread)
1529 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1531 (handle_query): Update format specifiers.
1532 (handle_v_cont, main): Use strtoul for thread IDs.
1533 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1534 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1535 (general_thread, step_thread, thread_from_wait)
1536 (old_thread_from_wait): Update.
1537 * target.h (struct thread_resume): Use unsigned long for THREAD.
1538 (struct target_ops): Use unsigned long for arguments to attach and
1541 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1543 * acinclude.m4: Include bfd/bfd.m4 directly.
1544 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1545 <agriffis@toolchain.org>.
1546 * aclocal.m4, configure: Regenerated.
1548 2005-01-07 Andrew Cagney <cagney@gnu.org>
1550 * configure.ac: Rename configure.in, require autoconf 2.59.
1551 * configure: Re-generate.
1553 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1555 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1557 * aclocal.m4: Regenerated.
1558 * configure: Regenerated.
1560 2004-11-21 Andreas Schwab <schwab@suse.de>
1562 * linux-m68k-low.c (m68k_num_gregs): Define.
1563 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1564 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1565 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1566 (m68k_breakpoint_at): New. Add to the_low_target.
1568 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1569 srv_linux_thread_db to yes.
1571 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1573 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1574 (ARCH_SET_FS): Likewise.
1575 (ARCH_GET_FS): Likewise.
1576 (ARCH_GET_GS): Likewise.
1578 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1580 * linux-i386-low.c (ps_get_thread_area): New.
1581 * linux-x86-64-low.c (ps_get_thread_area): New.
1582 * linux-low.c: Include <sys/syscall.h>.
1583 (linux_kill_one_process): Don't kill the first thread here.
1584 (linux_kill): Kill the first thread here.
1585 (kill_lwp): New function.
1586 (send_sigstop, linux_send_signal): Use it.
1587 * proc-service.c: Clean up #ifdefs.
1588 (fpregset_info): Delete.
1589 (ps_lgetregs): Update and enable implementation.
1590 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1592 * remote-utils.c (struct sym_cache, symbol_cache): New.
1593 (input_interrupt): Print a clearer message.
1594 (async_io_enabled): New variable.
1595 (enable_async_io, disable_async_io): Use it. Update comments.
1596 (look_up_one_symbol): Use the symbol cache.
1597 * thread-db.c (thread_db_look_up_symbols): New function.
1598 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1600 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1602 * configure.in: Test for -rdynamic.
1603 * configure: Regenerated.
1604 * Makefile (INTERNAL_LDFLAGS): New.
1605 (gdbserver, gdbreplay): Use it.
1607 2004-09-02 Andrew Cagney <cagney@gnu.org>
1609 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1611 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1613 * linux-low.c (linux_wait): Clear all_processes list also.
1615 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1617 * linux-low.c: Include <errno.h>. Remove extern declaration of
1620 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1622 * gdbreplay.c, server.h, utils.c: Update copyright years.
1624 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1626 * server.c (main): Print child status or termination signal from
1627 variable 'signal', not 'sig'.
1629 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1631 * linux-low.c (linux_read_memory): Change return type to
1632 int. Check for and return error from ptrace().
1633 * target.c (read_inferior_memory): Change return type to int. Pass
1634 back return status from the_target->read_memory().
1635 * target.h (struct target_ops): Adapt *read_memory() prototype.
1637 (read_inferior_memory): Adapt prototype.
1638 * server.c (main): Return an error packet if
1639 read_inferior_memory() returns an error.
1641 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1643 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1644 Unify with other clean targets.
1646 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1648 * server.c (handle_v_cont): Call set_desired_inferior.
1650 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1652 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1654 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1656 * linux-low.c (linux_wait): Unblock async I/O.
1657 (linux_resume): Block and enable async I/O.
1658 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1659 * server.h (block_async_io, unblock_async_io): Add prototypes.
1661 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1663 * remote-utils.c (remote_open): Print a status notice after
1665 * server.c (attach_inferior): Print a status notice after
1668 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1670 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1672 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1674 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1676 * server.c, target.h: Update copyright years.
1678 2004-02-25 Roland McGrath <roland@redhat.com>
1680 * target.h (struct target_ops): New member `read_auxv'.
1681 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1682 * linux-low.c (linux_read_auxv): New function.
1683 (linux_target_ops): Initialize `read_auxv' member to that.
1685 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1687 Committed by Jim Blandy <jimb@redhat.com>.
1689 * linux-s390-low.c (s390_num_regs): Update.
1690 (s390_regmap): Remove control registers. Use __s390x__ predefine
1691 instead of GPR_SIZE to distiguish s390 and s390x targets.
1693 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1695 * linux-low.c: Update copyright year.
1696 (check_removed_breakpoint): Clear pending_is_breakpoint.
1697 (linux_set_resume_request, linux_queue_one_thread)
1698 (resume_status_pending_p): New functions.
1699 (linux_continue_one_thread): Use process->resume.
1700 (linux_resume): Only resume threads if there are no pending events.
1701 * linux-low.h (struct process_info): Add resume request
1704 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1706 * regcache.c (new_register_cache): Clear the allocated register
1707 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1709 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1711 * linux-low.c (linux_resume): Take a struct thread_resume *
1713 (linux_wait): Update call.
1714 (resume_ptr): New static variable.
1715 (linux_continue_one_thread): Renamed from
1716 linux_continue_one_process. Use resume_ptr.
1717 (linux_resume): Use linux_continue_one_thread.
1718 * server.c (handle_v_cont, handle_v_requests): New functions.
1719 (myresume): New function.
1720 (main): Handle 'v' case.
1721 * target.h (struct thread_resume): New type.
1722 (struct target_ops): Change argument of "resume" to struct
1724 (myresume): Delete macro.
1726 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1728 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1729 (uninstall): Support DESTDIR.
1731 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1733 * configure.srv: Add xscale*linux copy of arm*linux entry.
1735 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1737 * linux-arm-low.c (arm_reinsert_addr): New function.
1738 (the_low_target): Add arm_reinsert_addr.
1740 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1742 * mem-break.c: Remove whitespace at end of file.
1744 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1746 * configure.in: Check whether we need to prototype strerror.
1747 * server.h: Optionally prototype strerror.
1748 * gdbreplay.c (perror_with_name): Use strerror.
1749 * linux-low.c (linux_attach_lwp): Use strerror.
1750 * utils.c (perror_with_name): Use strerror.
1751 * config.in, configure: Regenerated.
1753 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1755 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1756 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1758 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1760 * Makefile.in (SFILES): Update.
1761 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1762 low-sun3.c: Remove files.
1764 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1766 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1767 (linux_detach_one_process, linux_detach): New functions.
1768 (linux_target_ops): Add linux_detach.
1769 * server.c (main): Handle 'D' packet.
1770 * target.h (struct target_ops): Add "detach" member.
1771 (detach_inferior): Define.
1773 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1775 From Kelley Cook <kelleycook@wideopenwest.com>:
1776 * configure.srv: Accept i[34567]86 variants.
1778 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1780 * linux-low.c (linux_wait_for_event): Correct comment typos.
1781 (linux_resume_one_process): Call check_removed_breakpoint.
1782 (linux_send_signal): New function.
1783 (linux_target_ops): Add linux_send_signal.
1784 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1786 * target.h (struct target_ops): Add send_signal.
1788 2003-05-29 Jim Blandy <jimb@redhat.com>
1790 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1791 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1792 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1793 away part of the register's value.
1795 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1797 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1798 (linux_wait_for_event, linux_init_signals): Likewise.
1800 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1802 * configure.in: Check for stdlib.h.
1803 * configure: Regenerated.
1804 * config.in: Regenerated.
1806 2003-01-04 Andreas Schwab <schwab@suse.de>
1808 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1810 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1812 * Makefile.in: Remove obsolete code.
1814 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1816 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1817 defined(PT_FPR0_HI).
1819 2002-11-17 Stuart Hughes <seh@zee2.com>
1821 * linux-arm-low.c (arm_num_regs): Increase.
1822 (arm_regmap): Include status register.
1824 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1826 * linux-low.c (register_addr): Remove incorrect -1 check.
1828 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1830 * linux-low.c (linux_create_inferior): Call setpgid. Return
1832 (unstopped_p, linux_signal_pid): Remove.
1833 (linux_target_ops): Remove linux_signal_pid.
1834 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1835 global instead of target method.
1836 * target.h (struct target_ops): Remove signal_pid. Update comment
1837 for create_inferior.
1838 * server.c (signal_pid): New variable.
1839 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1840 gdbserver. Set the child to be the foreground process group.
1841 (attach_inferior): Set signal_pid.
1843 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1845 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1847 2002-08-20 Jim Blandy <jimb@redhat.com>
1849 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1852 2002-08-01 Andrew Cagney <cagney@redhat.com>
1854 * Makefile.in: Make chill references obsolete.
1856 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1858 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1859 * configure: Regenerate.
1860 * config.in: Regenerate.
1862 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1864 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1865 (perror_with_name, remote_close, remote_open, expect, play): Static.
1867 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1869 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1870 byte offsets instead of an array of indexes.
1871 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1873 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1875 * regcache.c: Add comment.
1877 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1879 * thread-db.c: New file.
1880 * proc-service.c: New file.
1881 * acinclude.m4: New file.
1882 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1883 proc-service.o, and thread-db.o.
1884 (linux-low.o): Add USE_THREAD_DB.
1885 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1886 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1887 * aclocal.m4: Regenerated.
1888 * config.in: Regenerated.
1889 * configure: Regenerated.
1890 * configure.in: Check for proc_service.h, sys/procfs.h,
1891 thread_db.h, and linux/elf.h headrs.
1892 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1893 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1894 Check for -lthread_db and thread support.
1895 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1896 PowerPC, and SuperH.
1897 * i387-fp.c: Constify arguments.
1898 * i387-fp.h: Likewise.
1899 * inferiors.c: (struct thread_info): Renamed from
1900 `struct inferior_info'. Remove PID member. Use generic inferior
1901 list header. All uses updated.
1902 (inferiors, signal_pid): Removed.
1903 (all_threads): New variable.
1904 (get_thread): Define.
1905 (add_inferior_to_list): New function.
1906 (for_each_inferior): New function.
1907 (change_inferior_id): New function.
1908 (add_inferior): Removed.
1909 (remove_inferior): New function.
1910 (add_thread): New function.
1911 (free_one_thread): New function.
1912 (remove_thread): New function.
1913 (clear_inferiors): Use for_each_inferior and free_one_thread.
1914 (find_inferior): New function.
1915 (find_inferior_id): New function.
1916 (inferior_target_data): Update argument type.
1917 (set_inferior_target_data): Likewise.
1918 (inferior_regcache_data): Likewise.
1919 (set_inferior_regcache_data): Likewise.
1920 * linux-low.c (linux_bp_reinsert): Remove.
1921 (all_processes, stopping_threads, using_thrads)
1922 (struct pending_signals, debug_threads, pid_of): New.
1923 (inferior_pid): Replace with macro.
1924 (struct inferior_linux_data): Remove.
1925 (get_stop_pc, add_process): New functions.
1926 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1927 Use add_process and add_thread.
1928 (linux_attach_lwp): New function, based on old linux_attach. Use
1929 add_process and add_thread. Set stop_expected for new threads.
1930 (linux_attach): New function.
1931 (linux_kill_one_process): New function.
1932 (linux_kill): Kill all LWPs.
1933 (linux_thread_alive): Use find_inferior_id.
1934 (check_removed_breakpoints, status_pending_p): New functions.
1935 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1936 Update. Use WNOHANG. Wait for cloned processes also. Update process
1937 struct for the found process.
1938 (linux_wait_for_event): New function.
1939 (linux_wait): Use it. Support LWPs.
1940 (send_sigstop, wait_for_sigstop, stop_all_processes)
1941 (linux_resume_one_process, linux_continue_one_process): New functions.
1942 (linux_resume): Support LWPs.
1943 (REGISTER_RAW_SIZE): Remove.
1944 (fetch_register): Use register_size instead. Call supply_register.
1945 (usr_store_inferior_registers): Likewise. Call collect_register.
1947 (regsets_fetch_inferior_registers): Improve error message.
1948 (regsets_store_inferior_registers): Add debugging.
1949 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1950 (unstopped_p, linux_signal_pid): New functions.
1951 (linux_target_ops): Add linux_signal_pid.
1952 (linux_init_signals): New function.
1953 (initialize_low): Call it. Initialize using_threads.
1954 * regcache.c (inferior_regcache_data): Add valid
1956 (get_regcache): Fetch registers lazily. Add fetch argument
1957 and update all callers.
1958 (regcache_invalidate_one, regcache_invalidate): New
1960 (new_register_cache): Renamed from create_register_cache.
1961 Return the new regcache.
1962 (free_register_cache): Change argument to a void *.
1963 (registers_to_string, registers_from_string): Call get_regcache
1964 with fetch flag set.
1965 (register_data): Make static. Pass fetch flag to get_regcache.
1966 (supply_register): Call get_regcache with fetch flag clear.
1967 (collect_register): Call get_regcache with fetch flag set.
1968 (collect_register_as_string): New function.
1969 * regcache.h: Update.
1970 * remote-utils.c (putpkt): Flush after debug output and use
1972 Handle input interrupts while waiting for an ACK.
1973 (input_interrupt): Use signal_pid method.
1974 (getpkt): Flush after debug output and use stderr.
1975 (outreg): Use collect_register_as_string.
1976 (new_thread_notify, dead_thread_notify): New functions.
1977 (prepare_resume_reply): Check using_threads. Set thread_from_wait
1979 (look_up_one_symbol): Flush after debug output.
1980 * server.c (step_thread, server_waiting): New variables.
1981 (start_inferior): Don't use signal_pid. Update call to mywait.
1982 (attach_inferior): Update call to mywait.
1983 (handle_query): Handle qfThreadInfo and qsThreadInfo.
1984 (main): Don't fetch/store registers explicitly. Use
1985 set_desired_inferior. Support proposed ``Hs'' packet. Update
1988 (struct inferior_list, struct_inferior_list_entry): New.
1989 * target.c (set_desired_inferior): New.
1990 (write_inferior_memory): Constify.
1991 (mywait): New function.
1993 (struct target_ops): New signal_pid method.
1994 (mywait): Removed macro, added prototype.
1996 * linux-low.h (regset_func): Removed.
1997 (regset_fill_func, regset_store_func): New.
1998 (enum regset_type): New.
1999 (struct regset_info): Add type field. Use new operation types.
2000 (struct linux_target_ops): stop_pc renamed to get_pc.
2001 Add decr_pc_after_break and breakpoint_at.
2002 (get_process, get_thread_proess, get_process_thread)
2003 (strut process_info, all_processes, linux_attach_lwp)
2004 (thread_db_init): New.
2006 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2007 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2008 (the_low_target): Add new members.
2009 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2010 (i386_store_fpxregset): Constify.
2011 (target_regsets): Add new kind identifier.
2012 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2013 (i386_set_pc): Add debugging.
2014 (i386_breakpoint_at): New function.
2015 (the_low_target): Add new members.
2016 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2017 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2018 (mips_breakpoint_at): New.
2019 (the_low_target): Add new members.
2020 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2021 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2022 (the_low_target): Add new members.
2023 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2024 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2025 (the_low_target): Add new members.
2026 * linux-x86-64-low.c (target_regsets): Add new kind
2029 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2031 From Martin Pool <mbp@samba.org>:
2032 * server.c (gdbserver_usage): New function.
2035 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2037 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2040 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2042 * Makefile.in: Remove obsolete code.
2044 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2046 * linux-low.c (regsets_fetch_inferior_registers),
2047 (regsets_store_inferior_registers): Removed cast to int from
2049 * regcache.h: Added declaration of struct inferior_info.
2051 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2053 * inferiors.c (struct inferior_info): Add regcache_data.
2054 (add_inferior): Call create_register_cache.
2055 (clear_inferiors): Call free_register_cache.
2056 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2057 * regcache.c (struct inferior_regcache_data): New.
2058 (registers): Remove.
2059 (get_regcache): New function.
2060 (create_register_cache, free_register_cache): New functions.
2061 (set_register_cache): Don't initialize the register cache here.
2062 (registers_to_string, registers_from_string, register_data): Call
2064 * regcache.h: Add prototypes.
2065 * server.h: Likewise.
2067 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2069 * mem-break.c: New file.
2070 * mem-break.h: New file.
2071 * Makefile.in: Add mem-break.o rule; update server.h
2073 * inferiors.c (struct inferior_info): Add target_data
2075 (clear_inferiors): Free target_data member if set.
2076 (inferior_target_data, set_inferior_target_data): New functions.
2077 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2078 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2079 * linux-low.c (linux_bp_reinsert): New variable.
2080 (struct inferior_linux_data): New.
2081 (linux_create_inferior): Use set_inferior_target_data.
2082 (linux_attach): Likewise. Call add_inferior.
2083 (linux_wait_for_one_inferior): New function.
2084 (linux_wait): Call it.
2085 (linux_write_memory): Add const.
2086 (initialize_low): Call set_breakpoint_data.
2087 * linux-low.h (struct linux_target_ops): Add breakpoint
2089 * server.c (attach_inferior): Remove extra add_inferior
2091 * server.h: Include mem-break.h. Update inferior.c
2093 * target.c (read_inferior_memory)
2094 (write_inferior_memory): New functions.
2095 * target.h (read_inferior_memory)
2096 (write_inferior_memory): Change macros to prototypes.
2097 (struct target_ops): Update comments. Add const to write_memory
2100 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2102 * linux-low.c (usr_store_inferior_registers): Support
2103 registers which are allowed to fail to store.
2104 * linux-low.h (linux_target_ops): Likewise.
2105 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2106 (ppc_cannot_store_register): FPSCR may not be storable.
2108 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2110 * server.h: Include <string.h> if HAVE_STRING_H.
2111 * ChangeLog: Correct paths in last ChangeLog entry.
2113 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2115 * linux-low.h: Remove obsolete prototypes.
2116 (struct linux_target_ops): New.
2117 (extern the_low_target): New.
2118 * linux-low.c (num_regs, regmap): Remove declarations.
2119 (register_addr): Use the_low_target explicitly.
2120 (fetch_register): Likewise.
2121 (usr_fetch_inferior_registers): Likewise.
2122 (usr_store_inferior_registers): Likewise.
2123 * linux-arm-low.c (num_regs): Remove.
2124 (arm_num_regs): Define.
2125 (arm_regmap): Renamed from regmap, made static.
2126 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2128 (arm_cannot_store_register): Renamed from cannot_store_register,
2130 (the_low_target): New.
2131 * linux-i386-low.c (num_regs): Remove.
2132 (i386_num_regs): Define.
2133 (i386_regmap): Renamed from regmap, made static.
2134 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2136 (i386_cannot_store_register): Renamed from cannot_store_register,
2138 (the_low_target): New.
2139 * linux-ia64-low.c (num_regs): Remove.
2140 (ia64_num_regs): Define.
2141 (ia64_regmap): Renamed from regmap, made static.
2142 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2144 (ia64_cannot_store_register): Renamed from cannot_store_register,
2146 (the_low_target): New.
2147 * linux-m68k-low.c (num_regs): Remove.
2148 (m68k_num_regs): Define.
2149 (m68k_regmap): Renamed from regmap, made static.
2150 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2152 (m68k_cannot_store_register): Renamed from cannot_store_register,
2154 (the_low_target): New.
2155 * linux-mips-low.c (num_regs): Remove.
2156 (mips_num_regs): Define.
2157 (mips_regmap): Renamed from regmap, made static.
2158 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2160 (mips_cannot_store_register): Renamed from cannot_store_register,
2162 (the_low_target): New.
2163 * linux-ppc-low.c (num_regs): Remove.
2164 (ppc_num_regs): Define.
2165 (ppc_regmap): Renamed from regmap, made static.
2166 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2168 (ppc_cannot_store_register): Renamed from cannot_store_register,
2170 (the_low_target): New.
2171 * linux-s390-low.c (num_regs): Remove.
2172 (s390_num_regs): Define.
2173 (s390_regmap): Renamed from regmap, made static.
2174 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2176 (s390_cannot_store_register): Renamed from cannot_store_register,
2178 (the_low_target): New.
2179 * linux-sh-low.c (num_regs): Remove.
2180 (sh_num_regs): Define.
2181 (sh_regmap): Renamed from regmap, made static.
2182 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2184 (sh_cannot_store_register): Renamed from cannot_store_register,
2186 (the_low_target): New.
2187 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2188 (the_low_target): New.
2190 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2192 * Makefile.in: Add stamp-h target.
2193 * configure.in: Create stamp-h.
2194 * configure: Regenerated.
2196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2198 * inferiors.c: New file.
2199 * target.c: New file.
2200 * target.h: New file.
2201 * Makefile.in: Add target.o and inferiors.o. Update
2203 * linux-low.c (inferior_pid): New static variable,
2204 moved from server.c.
2205 (linux_create_inferior): Renamed from create_inferior.
2206 Call add_inferior. Return 0 on success instead of a PID.
2207 (linux_attach): Renamed from myattach.
2208 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2209 (linux_thread_alive): Renamed from mythread_alive.
2210 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2212 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2213 (regsets_store_inferior_registers): Correct error message.
2214 Add missing ``return 0''.
2215 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2216 (linux_store_registers): Renamed from store_inferior_registers.
2217 (linux_read_memory): Renamed from read_inferior_memory.
2218 (linux_write_memory): Renamed from write_inferior_memory.
2219 (linux_target_ops): New structure.
2220 (initialize_low): Call set_target_ops ().
2221 * remote-utils.c (unhexify): New function.
2222 (hexify): New function.
2223 (input_interrupt): Send signals to ``signal_pid''.
2224 * server.c (inferior_pid): Remove.
2225 (start_inferior): Update create_inferior call.
2226 (attach_inferior): Call add_inferior.
2227 (handle_query): New function.
2228 (main): Call handle_query for `q' packets.
2229 * server.h: Include "target.h". Remove obsolete prototypes.
2230 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2232 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2234 * Makefile.in: Add WARN_CFLAGS. Update configury
2236 * configure.in: Check for <string.h>
2237 * configure: Regenerate.
2238 * config.in: Regenerate.
2239 * gdbreplay.c: Include needed system headers.
2240 (remote_open): Remove strchr prototype.
2241 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2242 * regcache.c (supply_register): Change buf argument to const void *.
2243 (supply_register_by_name): Likewise.
2244 (collect_register): Change buf argument to void *.
2245 (collect_register_by_name): Likewise.
2246 * regcache.h: Add missing prototypes.
2247 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2248 * server.c (handle_query): New function.
2249 (attached): New static variable, moved out of main.
2250 (main): Quiet longjmp clobber warnings.
2251 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2252 * utils.c (error): Remove NORETURN.