1 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6 * linux-ppc-low.c: Include <elf.h>.
7 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8 (ppc_hwcap): New global variable.
9 (ppc_regmap): Remove __SPE__ #ifdef sections.
10 (ppc_regmap_e500): New global variable.
11 (ppc_cannot_store_register): Update __SPE__ special case.
12 (ppc_get_hwcap): New function.
13 (ppc_arch_setup): Use it to determine whether inferior supports
14 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16 Do not access registers if target does not support AltiVec.
17 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18 Do not access registers if target does not support SPE.
19 (target_regsets): Unconditionally include AltiVec and SPE regsets.
21 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
23 * linux-low.c (disabled_regsets, num_regsets): New.
24 (use_regsets_p): Delete.
25 (linux_wait_for_process): Clear disabled_regsets.
26 (regsets_fetch_inferior_registers): Check and set it.
27 (regsets_store_inferior_registers): Likewise.
28 (linux_fetch_registers, linux_store_registers): Do not use
30 (initialize_low): Allocate disabled_regsets.
32 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
34 * Makefile.in (LIBOBJS): New.
37 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
38 * configure: Regenerated.
40 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
42 * server.c (handle_query): Never return "unsupported" for
43 qXfer:features:read queries.
45 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
47 * server.c (get_features_xml): Fix inverted condition.
48 (handle_query): Always support qXfer:feature:read.
50 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
52 * server.c (wrapper_argv): New.
53 (start_inferior): Handle wrapper_argv. If set, expect an extra
55 (gdbserver_usage): Document --wrapper.
56 (main): Parse --wrapper.
58 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
60 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
61 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
62 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
63 (ppc_set_pc): Likewise.
64 (ppc_arch_setup): New function.
65 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
67 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
69 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
71 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
72 instead of linux-ppc64-low.o.
73 * linux-ppc64-low.c: Remove file.
74 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
75 (linux-ppc64-low.o): Remove rule.
77 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
78 (init_registers_powerpc_64): Likewise.
79 (ppc_regmap): Conditionally define depending on __powerpc64__.
80 (ppc_cannot_store_register): Do not special-case "fpscr" when
81 compiled on __powerpc64__.
82 (ppc_collect_ptrace_register): New function.
83 (ppc_supply_ptrace_register): New function.
84 (ppc_breakpoint): Change type to "unsigned int".
85 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
86 (the_low_target): Conditionally provide initializers for the
87 arch_setup member depending on __powerpc64__. Install
88 collect_ptrace_register and supply_ptrace_register members.
90 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
92 * regcache.h (gdbserver_xmltarget): Add extern declaration.
93 * server.c (gdbserver_xmltarget): Define.
94 (get_features_xml): Use it to replace "target.xml" and arch_string.
96 * configure.srv: Remove srv_xmltarget. Add XML files that were
97 mentioned there to srv_xmlfiles instead. Remove conditional tests
98 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
99 srv_xmlfiles and srv_regobj to include all possible choices.
100 * configure.ac (srv_xmltarget): Remove.
101 (srv_xmlfiles): Do not add "target.xml".
102 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
103 checks for supplementary target information.
104 * configure: Regenerate.
105 * Makefile.in (XML_TARGET): Remove.
106 (target.xml): Remove rule.
107 (clean): Do not clean up target.xml.
108 (.PRECIOUS): Do not mention target.xml.
110 * target.h (struct target_ops): Remove arch_string member.
111 * linux-low.c (linux_arch_string): Remove.
112 (linux_target_ops): Remove arch_string initializer.
113 * linux-low.h (struct linux_target_ops): Remove arch_string member.
114 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
115 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
116 * spu-low.c (spu_arch_string): Remove.
117 (spu_target_ops): Remove arch_string initializer.
118 * win32-low.c (win32_arch_string): Remove.
119 (win32_target_ops): Remove arch_string initializer.
120 * win32-low.h (struct win32_target_ops): Remove arch_string member.
121 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
122 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
124 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
126 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
127 by collect_ptrace_register and supply_ptrace_register hooks.
128 * linux-low.c (fetch_register): Use supply_ptrace_register callback
129 instead of checking for the_low_target.left_pad_xfer.
130 (usr_store_inferior_registers): Use collect_ptrace_register callback
131 instead of checking for the_low_target.left_pad_xfer.
133 * linux-s390-low.c (s390_collect_ptrace_register): New function.
134 (s390_supply_ptrace_register): Likewise.
135 (s390_fill_gregset): Call s390_collect_ptrace_register.
136 (the_low_target): Update.
138 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
139 (ppc_supply_ptrace_register): Likewise.
140 (the_low_target): Update.
142 * linux-i386-low.c (the_low_target): Update.
143 * linux-x86-64-low.c (the_low_target): Update.
145 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
147 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
148 reg-s390.o and reg-s390x.o.
150 * linux-low.c (new_inferior): New global variable.
151 (linux_create_inferior, linux_attach): Set it.
152 (linux_wait_for_process): Call the_low_target.arch_setup after the
153 target has stopped for the first time.
154 (initialize_low): Do not call the_low_target.arch_setup.
156 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
157 (s390_set_pc): Likewise.
158 (s390_arch_setup): New function.
159 (the_low_target): Use s390_arch_setup as arch_setup routine.
161 * regcache.c (realloc_register_cache): New function.
162 (set_register_cache): Call it for each existing regcache.
164 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
166 * server.h (init_registers): Remove prototype.
168 * linux-low.h (struct linux_target_ops): Add arch_setup field.
169 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
170 instead of init_registers ().
171 * linux-arm-low.c (init_registers_arm): Add prototype.
172 (init_registers_arm_with_iwmmxt): Likewise.
173 (the_low_target): Add initializer for arch_setup field.
174 * linux-cris-low.c (init_registers_cris): Add prototype.
175 (the_low_target): Add initializer for arch_setup field.
176 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
177 (the_low_target): Add initializer for arch_setup field.
178 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
179 (the_low_target): Add initializer for arch_setup field.
180 * linux-ia64-low.c (init_registers_ia64): Add prototype.
181 (the_low_target): Add initializer for arch_setup field.
182 * linux-m32r-low.c (init_registers_m32r): Add prototype.
183 (the_low_target): Add initializer for arch_setup field.
184 * linux-m68k-low.c (init_registers_m68k): Add prototype.
185 (the_low_target): Add initializer for arch_setup field.
186 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
187 (init_registers_mips64_linux): Likewise.
188 (the_low_target): Add initializer for arch_setup field.
189 * linux-ppc-low.c (init_registers_ppc): Add prototype.
190 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
191 (the_low_target): Add initializer for arch_setup field.
192 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
193 (init_registers_powerpc_64): Likewise.
194 (the_low_target): Add initializer for arch_setup field.
195 * linux-s390-low.c (init_registers_s390): Add prototype.
196 (init_registers_s390x): Likewise.
197 (the_low_target): Add initializer for arch_setup field.
198 * linux-sh-low.c (init_registers_sh): Add prototype.
199 (the_low_target): Add initializer for arch_setup field.
200 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
201 (the_low_target): Add initializer for arch_setup field.
202 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
203 (the_low_target): Add initializer for arch_setup field.
205 * win32-low.h (struct win32_target_ops): Add arch_setup field.
206 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
207 instead of init_registers ().
208 * win32-arm-low.c (init_registers_arm): Add prototype.
209 (the_low_target): Add initializer for arch_setup field.
210 * win32-i386-low.c (init_registers_i386): Add prototype.
211 (the_low_target): Add initializer for arch_setup field.
213 * spu-low.c (init_registers_spu): Add prototype.
214 (initialize_low): Call initialie_registers_spu () instead of
215 initialize_registers ().
217 2008-02-19 Pedro Alves <pedro@codesourcery.com>
219 * server.c (handle_v_requests): When handling the vRun and vAttach
220 packets, if already debugging a process, don't kill it. Return an
223 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
225 * server.c (handle_query): Correct length check.
227 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
229 * win32-low.c (do_initial_child_stuff): Add process handle
230 parameter. Set current_process_handle and current_process_id from the
231 parameters. Clear globals.
232 (win32_create_inferior): Don't set current_process_handle and
233 current_process_id here. Instead pass them on the call to
234 do_initial_child_stuff.
235 (win32_attach): Likewise.
236 (win32_clear_inferiors): New.
237 (win32_kill): Don't close the current process handle or the
238 current thread handle here. Instead call win32_clear_inferiors.
239 (win32_detach): Don't open a new handle to the process. Call
240 win32_clear_inferiors.
241 (win32_join): Don't rely on current_process_handle; open a new
242 handle using the process id.
243 (win32_wait): Call win32_clear_inferiors when the inferior process
246 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
248 * server.c (monitor_show_help): Add "exit".
250 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
252 * Makefile.in (SFILES): Add linux-xtensa-low.c.
253 (clean): Add reg-xtensa.c.
254 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
255 * configure.srv (xtensa*-*-linux*) New target.
256 * linux-xtensa-low.c: New.
257 * xtensa-xtregs.c: New.
259 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
261 * hostio.c: Don't include errno.h.
262 (errno_to_fileio_errno): Move to hostio-errno.
263 * hostio.c: (hostio_error): Remove the error parameter. Defer the
264 error number outputting to the target->hostio_last_error callback.
265 (hostio_packet_error): Use FILEIO_EINVAL directly.
266 (handle_open, handle_pread, hostio_error, handle_unlink): Update
267 calls to hostio_error.
268 * hostio-errno.c: New.
269 * server.h (hostio_last_error_from_errno): Declare.
270 * target.h (target_ops): Add hostio_last_error member.
271 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
272 as hostio_last_error handler.
273 * spu-low.c (spu_target_ops): Likewise.
274 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
275 (wince_hostio_last_error): New functions.
276 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
277 as hostio_last_error handler.
278 (win32_target_ops) [!_WIN32_WCE]: Register
279 hostio_last_error_from_errno as hostio_last_error handler.
280 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
281 (hostio-errno.o): New rule.
282 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
283 * configure.srv (srv_hostio_err_objs): New variable. Default to
285 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
286 * configure: Regenerate.
288 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
290 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
291 (linux_kill, linux_detach): Clean up the process list.
292 * remote-utils.c (remote_open): Improve port number parsing.
293 (putpkt_binary, input_interrupt): Only send interrupts if the target
295 * server.c (extended_protocol): Make static.
296 (attached): Define earlier.
297 (exit_requested, response_needed, program_argv): New variables.
298 (target_running): New.
299 (start_inferior): Clear attached here.
300 (attach_inferior): Set attached here.
301 (require_running): Define.
302 (handle_query): Use require_running and target_running. Implement
304 (handle_v_attach, handle_v_run): New.
305 (handle_v_requests): Use require_running. Handle vAttach and vRun.
306 (gdbserver_usage): Update.
307 (main): Redo argument parsing. Handle --debug and --multi. Handle
308 --attach along with other options or after the port. Save
309 program_argv. Support no initial program. Resynchronize
310 communication with GDB after an error. Handle "monitor exit".
311 Use require_running and target_running. Always allow the extended
312 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
313 restart in extended mode.
314 * README: Refer to the GDB manual. Update --attach usage.
316 2007-12-20 Andreas Schwab <schwab@suse.de>
318 * linux-low.c (STACK_SIZE): Define.
319 (linux_tracefork_child): Use it. Use __clone2 on ia64.
320 (linux_test_for_tracefork): Likewise.
322 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
324 * linux-low.c (linux_wait_for_event): Update messages. Do not
325 reinsert auto-delete breakpoints.
326 * mem-break.c (struct breakpoint): Change return type of handler to
328 (set_breakpoint_at): Update handler type.
329 (reinsert_breakpoint_handler): Return 1 instead of calling
331 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
333 (check_breakpoints): Delete auto-delete breakpoints and return 2.
334 * mem-break.h (set_breakpoint_at): Update handler type.
335 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
336 * win32-low.c (auto_delete_breakpoint): New.
337 (get_child_debug_event): Use it.
339 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
341 * configure.ac: Check for pread and pwrite.
342 * hostio.c (handle_pread): Fall back to lseek and read.
343 (handle_pwrite): Fall back to lseek and write.
344 * config.in, configure: Regenerated.
346 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
348 * server.c (myresume): Add own_buf argument.
349 (main): Update calls.
351 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
353 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
354 * remote-utils.c (remote_open): Do not call disable_async_io.
355 (block_async_io): Delete.
356 (unblock_async_io): Make static.
357 (initialize_async_io): New.
358 * server.c (handle_v_cont): Handle async I/O here.
359 (myresume): Likewise. Move other common resume tasks here...
360 (main): ... from here. Call initialize_async_io. Disable async
361 I/O before the main loop.
362 * server.h (initialize_async_io): Declare.
363 (block_async_io, unblock_async_io): Delete prototypes.
364 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
366 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
368 * remote-utils.c (readchar): Allow binary data in received messages.
370 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
372 * win32-low.c (attaching): New global.
373 (win32_create_inferior): Clear the `attaching' global.
374 (win32_attach): Set the `attaching' global.
375 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
376 attaching. Only set a breakpoint at the entry point if not
379 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
381 * server.c (main): Don't report dll events on the initial
382 connection on attaches.
384 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
386 * server.c (main): Relax numerical bases supported for the pid of
387 the --attach command line argument.
389 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
391 * win32-low.c (win32_attach): Call OpenProcess before
392 DebugActiveProcess, not after. Add last error output to error
395 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
397 * win32-low.c (win32_get_thread_context)
398 (win32_set_thread_context): New functions.
399 (thread_rec): Use win32_get_thread_context.
400 (continue_one_thread, win32_resume): Use win32_set_thread_context.
401 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
405 Pedro Alves <pedro_alves@portugalmail.pt>
407 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
409 (child_add_thread): Minor cleanup.
410 (child_continue): Resume artificially suspended threads before
411 calling ContinueDebugEvent.
412 (suspend_one_thread): New.
413 (fake_breakpoint_event): New.
414 (get_child_debug_event): Change return type to int. Check here if
415 gdb sent an interrupt request. If a soft interrupt was requested,
416 fake a breakpoint event. Return 0 if there is no event to handle,
418 (win32_wait): Don't check here if gdb sent an interrupt request.
419 Ensure there is a valid event to handle.
420 (win32_request_interrupt): Add soft interruption method as last
424 Pedro Alves <pedro_alves@portugalmail.pt>
426 * win32-low.h (win32_thread_info): Add descriptions to the
427 structure members. Replace `suspend_count' counter by a
429 * win32-low.c (thread_rec): Update condition of when to get the
430 context from the inferior. Rely on ContextFlags being set if it
431 has already been retrieved. Only suspend the inferior thread if
432 we haven't already. Warn if that fails.
433 (continue_one_thread): s/suspend_count/suspended/. Only call
434 ResumeThread once. Warn if that fails.
436 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
438 * win32-low.c (win32_wait): Don't read from the inferior when it
441 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
443 * Makefile.in (win32_low_h): New variable.
444 (win32-low.o): Add dependency on $(win32_low_h).
445 (win32-arm-low.o, win32-i386-low.o): New rules.
447 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
449 * hostio.c: Correct copyright year.
451 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
453 * Makefile.in (OBS): Add hostio.o.
454 (hostio.o): New rule.
455 * server.h (handle_vFile): Declare.
456 * hostio.c: New file.
457 * server.c (handle_v_requests): Take packet_len and new_packet_len
458 for binary packets. Call handle_vFile.
459 (main): Update call to handle_v_requests.
461 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
463 * linux-low.c: Include <sched.h>.
465 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
467 * linux-low.c (linux_tracefork_grandchild): New.
468 (linux_tracefork_child): Use clone.
469 (linux_test_for_tracefork): Use clone; allocate and free a stack.
471 2007-10-31 Joel Brobecker <brobecker@adacore.com>
473 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
475 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
477 * linux-low.c (handle_extended_wait): Handle unexpected signals.
479 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
481 * inferiors.c (change_inferior_id): Delete.
482 (add_pid_to_list, pull_pid_from_list): New.
483 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
484 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
485 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
486 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
487 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
488 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
489 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
490 (using_threads): Always set to 1.
491 (handle_extended_wait): New.
492 (add_process): Do not set TID.
493 (linux_create_inferior): Set must_set_ptrace_flags.
494 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
495 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
496 (linux_thread_alive): Rename TID argument to LWPID.
497 (linux_wait_for_process): Handle unknown processes. Do not use TID.
498 (linux_wait_for_event): Do not use TID or check using_threads. Update
499 call to dead_thread_notify. Call handle_extended_wait.
500 (linux_create_inferior): Use PTRACE_SETOPTIONS.
501 (send_sigstop): Delete sigstop_sent.
502 (wait_for_sigstop): Avoid TID.
503 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
504 (linux_test_for_tracefork): New.
505 (linux_lookup_signals): Use thread_db_active and
506 linux_supports_tracefork_flag.
507 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
508 * linux-low.h (get_process_thread): Avoid TID.
509 (struct process_ifo): Move thread_known and tid to the end. Remove
511 (linux_attach_lwp, thread_db_init): Update prototypes.
512 * server.h (change_inferior_id): Delete prototype.
513 (add_pid_to_list, pull_pid_from_list): New prototypes.
514 * thread-db.c (thread_db_use_events): New.
515 (find_first_thread): Rename to...
516 (find_one_thread): ...this. Update callers and messages. Do not
517 call fatal. Check thread_db_use_events. Do not call
518 change_inferior_id or new_thread_notify.
519 (maybe_attach_thread): Update. Do not call new_thread_notify.
520 (thread_db_init): Set thread_db_use_events. Check use_events.
521 * utils.c (fatal, warning): Correct message prefix.
523 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
525 * Makefile.in (clean): Remove new files.
526 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
527 (powerpc-64.o, powerpc-64.c): New rules.
528 * configure.srv: Use alternate register sets for powerpc64-*-linux*
529 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
531 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
533 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
534 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
535 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
536 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
537 (target_regsets): Add AltiVec and SPE register sets.
538 * configure.ac: Check for AltiVec and SPE.
539 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
540 (ppc_fill_vrregset, ppc_store_vrregset): New.
541 (target_regsets): Add AltiVec register set.
542 * configure: Regenerated.
544 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
546 * linux-low.c (O_LARGEFILE): Define.
547 (linux_read_memory): Use /proc/PID/mem.
548 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
549 * configure, config.in: Regenerated.
551 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
553 * linux-low.c (linux_wait_for_event): Do not pass signals while
556 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
558 * win32-low.c (create_process): New.
559 (win32_create_inferior): Use create_process instead of
560 CreateProcess. If create_process failed retry appending an ".exe"
561 suffix. Store the GetLastError result immediatelly after
562 create_process calls and use it on the call to error.
564 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
566 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
568 2007-08-23 Joel Brobecker <brobecker@adacore.com>
570 * configure.ac: Switch license to GPLv3.
572 2007-08-01 Michael Snyder <msnyder@access-company.com>
574 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
576 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
578 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
580 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
581 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
582 CloseToolhelp32Snapshot.
583 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
584 CloseToolhelp32Snapshot.
586 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
588 * server.c (main): Check for inferior exit before main loop.
590 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
592 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
593 instead of on tmp_desc.
595 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
596 Daniel Jacobowitz <dan@codesourcery.com>
598 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
599 (add_thread): Minor cleanups.
600 (clear_inferiors): Move lower in the file. Clear the DLL
602 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
603 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
604 (xml_escape_text): New.
605 * server.c (handle_query): Handle qXfer:libraries:read. Report it
607 (handle_v_cont): Report errors.
608 (gdbserver_version): Update.
609 (main): Correct size of own_buf. Do not report initial DLL events.
610 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
611 (unloaded_dll, xml_escape_text): New.
612 * win32-low.c (enum target_waitkind): Update comments.
613 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
614 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
615 (win32_EnumProcessModules, win32_GetModuleInformation)
616 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
617 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
618 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
619 (win32_Module32First, win32_Module32Next, load_toolhelp)
620 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
621 (get_child_debug_event): Handle DLL events.
622 (win32_wait): Likewise.
624 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
626 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
627 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
629 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
631 * win32-low.c (handle_output_debug_string): Ignore event if not
634 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
636 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
638 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
640 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
642 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
644 * inferiors.c (change_inferior_id): Add comment.
645 * linux-low.c (check_removed_breakpoint): Add an early
646 prototype. Improve debug output.
647 (linux_attach): Doc update.
648 (linux_detach_one_process, linux_detach): Clean up before releasing
650 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
651 * linux-low.h (struct process_info): Doc improvement.
652 * mem-break.c (delete_all_breakpoints): New.
653 * mem-break.h (delete_all_breakpoints): New prototype.
654 * thread-db.c (find_first_thread): New.
655 (thread_db_create_event): Call it instead of
656 thread_db_find_new_threads. Clean up unused variables.
657 (maybe_attach_thread): Remove first thread handling.
658 (thread_db_find_new_threads): Use find_first_thread.
659 (thread_db_get_tls_address): Likewise.
661 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
663 * thread-db.c (thread_db_find_new_threads): Add prototype.
664 (thread_db_create_event): Check for the main thread before adding
666 (maybe_attach_thread): Only enable event reporting if TID == 0.
667 (thread_db_get_tls_address): Check for new threads.
669 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
671 * linux-low.c (linux_create_inferior): Try execv before execvp.
672 * spu-low.c (spu_create_inferior): Likewise.
674 2007-06-13 Mike Frysinger <vapier@gentoo.org>
676 * linux-low.c (linux_create_inferior): Change execv to execvp.
677 * spu-low.c (spu_create_inferior): Likewies.
679 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
681 * Makefile.in (clean): Clean new files instead of deleted ones.
682 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
683 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
685 * configure.srv: Specify XML files and new regformats for MIPS and
687 * linux-mips-low.c (mips_num_regs): Set to only used registers.
688 (mips_regmap): Do not fetch $0. Remove unused registers. Add
689 an entry for the restart register.
690 (mips_cannot_fetch_register, mips_cannot_store_register)
691 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
692 register names to match the XML descriptions.
693 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
694 restart register instead of $0.
696 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
697 Markus Deuling <deuling@de.ibm.com>
699 * remote-utils.c (decode_xfer_write): New function.
700 * server.h (decode_xfer_write): Add prototype.
701 * server.c (handle_query): Add PACKET_LEN argument. Support
702 qXfer:spu:read and qXfer:spu:write packets.
703 (main): Pass packet_len to handle_query.
704 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
705 * target.h (target_ops): Add qxfer_spu.
707 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
709 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
710 accessing non-seekable spufs files.
712 2007-05-16 Markus Deuling <deuling@de.ibm.com>
714 * server.c (handle_query): Add reply for qC packet.
716 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
717 Leo Zayas <lerele@champenstudios@com>
719 * server.h (check_remote_input_interrupt_request): New function.
720 * remote_utils.c (INVALID_DESCRIPTOR): New define.
721 (remote_desc): Initialize with INVALID_DESCRIPTOR.
722 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
723 (check_remote_input_interrupt_request): New function.
724 * server.h (check_remote_input_interrupt_request): Declare.
725 * win32-low.c (winapi_DebugBreakProcess,
726 winapi_GenerateConsoleCtrlEvent): New typedefs.
727 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
729 (win32_wait): Check for remote interrupt request
730 with check_remote_input_interrupt_request.
731 (win32_request_interrupt): New function.
732 (win32_target_op): Set request_interrupt to win32_request_interrupt.
734 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
736 * win32-low.c (debug_registers_changed,
737 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
738 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
739 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
740 (thread_rec): Get context using the low target.
741 (child_add_thread): Call thread_added on the low target,
742 which does the same thing.
744 (do_initial_child_stuff): Remove debug registers references.
745 Set context using the low target. Resume threads after
746 setting the contexts.
747 (child_continue): Remove dead variable. Remove debug
748 registers references.
749 (child_fetch_inferior_registers): Go through the low target.
750 (do_child_store_inferior_registers): Remove.
751 (child_store_inferior_registers): Go through the low target.
752 (win32_resume): Remove debug registers references.
753 Set context using the low target.
754 (handle_exception): Change return type to void. Don't record
755 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
756 first chance exception.
757 (get_child_debug_event): Change return type to void. Remove
758 goto loop. Always return after waiting for debug event.
759 (win32_wait): Convert to switch statement. Handle spurious
762 * win32-i386-low.c (debug_registers_changed,
763 debug_registers_used): New.
764 (initial_stuff): Rename to ...
765 (i386_initial_stuff): ... this. Clear debug registers
767 (store_debug_registers): Delete.
768 (i386_get_thread_context): New.
769 (load_debug_registers): Delete.
770 (i386_set_thread_context): New.
771 (i386_thread_added): New.
772 (single_step): Rename to ...
773 (i386_single_step): ... this.
774 (do_fetch_inferior_registers): Rename to ...
775 (i386_fetch_inferior_register): ... this.
776 (i386_store_inferior_register): New.
777 (the_low_target): Adapt to new interface.
779 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
780 (arm_get_thread_context): New.
781 (arm_set_thread_context): New.
783 (do_fetch_inferior_registers): Rename to ...
784 (arm_fetch_inferior_register): ... this.
785 (arm_store_inferior_register): New.
786 (arm_wince_breakpoint): Reimplement as unsigned long.
787 (arm_wince_breakpoint_len): Define.
788 (the_low_target): Adapt to new interface.
790 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
791 load_debug_registers. Add get_thread_context, set_thread_context,
792 thread_added and store_inferior_register. Rename
793 fetch_inferior_registers to fetch_inferior_register.
794 (regptr): Remove declaration.
796 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
798 * linux-low.c (linux_detach): Change return type to int. Return 0.
799 * spu-low.c (spu_detach): Likewise.
801 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
803 * target.h (target_ops): Change return type of detach to int.
805 (join_inferior): New.
806 * server.c (main): Don't skip detach support on mingw32.
807 If the inferior doesn't support detaching return error.
808 Call join_inferior instead of using waitpid.
809 * linux-low.c (linux_join): New.
810 (linux_target_op): Add linux_join.
811 * spu-low.c (spu_join): New.
812 (spu_target_ops): Add spu_join.
813 * win32-low.c (win32_detach): Adapt to new interface.
814 Reopen current_process_handle before detaching. Issue a child
815 resume before detaching.
817 (win32_target_op): Add win32_join.
819 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
821 * win32-low.c (win32-attach): Fix return value.
822 * target.h (target_ops): Describe ATTACH return values.
824 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
826 * win32-low.c (GETPROCADDRESS): Define.
827 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
828 (winapi_DebugSetProcessKillOnExit): Likewise.
829 (win32_create_inferior): Force usage of ansi CreateProcessA.
830 (win32_attach): Use GETPROCADDRESS.
831 (win32_detach): Likewise.
833 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
835 * win32-low.c (win32_wait): Don't use WSTOPSIG.
837 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
839 * win32-low.c: Commit leftover changes from 2007-03-29.
841 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
843 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
844 fields short instead of int. Add explicit padding.
845 (i387_cache_to_fsave): Remove unnecessary casts.
846 (i387_fsave_to_cache): Doc fix.
847 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
849 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
851 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
852 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
854 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
856 * configure.srv (arm*-*-mingw32ce*): Move near the other
859 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
861 * configure.ac: Add errno checking.
862 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
863 sys/file.h and malloc.h.
864 (AC_CHECK_DECLS): Add perror.
865 (srv_mingwce): Handle.
866 * configure.srv (i[34567]86-*-cygwin*): Add
867 win32-i386-low.o to srv_tgtobj.
868 (i[34567]86-*-mingw*): Likewise.
869 (arm*-*-mingw32ce*): Add case.
870 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
871 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
872 [__MINGW32CE__] (strerror): New function.
873 [__MINGW32CE__] (errno): Define to GetLastError.
874 [__MINGW32CE__] (COUNTOF): New macro.
875 (remote_open): Remove extra close call.
876 * mem-break.c (delete_breakpoint_at): New function.
877 * mem-break.h (delete_breakpoint_at): Declare.
878 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
879 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
880 [USE_WIN32API] (read, write): Add char* casts.
881 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
882 * server.h: Include wincecompat.h on Windows CE.
883 [HAVE_ERRNO_H]: Check.
884 (perror): Declare if not declared.
885 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
886 (perror_with_name): Remove errno declaration.
887 * wincecompat.h: New.
888 * wincecompat.c: New.
890 * win32-arm-low.c: New.
891 * win32-i386-low.c: New.
892 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
893 (OUTMSG2): Make it safe.
895 (COUNTOF): New macro.
896 (NUM_REGS): Get it from the low target.
897 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
898 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
899 (thread_rec): Let low target handle debug registers.
900 (child_add_thread): Likewise.
901 (child_init_thread_list): Likewise.
902 (continue_one_thread): Likewise.
904 (do_child_fetch_inferior_registers): Move to ...
905 * win32-i386-low.c: ... here, and rename to ...
906 (do_fetch_inferior_registers): ... this.
907 * win32-low.c (child_fetch_inferior_registers):
908 Go through the low target.
909 (do_child_store_inferior_registers): Use regptr.
910 (strwinerror): New function.
911 (win32_create_inferior): Handle Windows CE.
912 Use strwinerror instead of strerror on Windows error
913 codes. Add program to the error output.
914 Don't close the main thread handle on Windows CE.
915 (win32_attach): Use coredll.dll on Windows CE.
916 (win32_kill): Close current process and current
918 (win32_detach): Use coredll.dll on Windows CE.
919 (win32_resume): Let low target handle debug registers, and
921 (handle_exception): Add/Remove initial breakpoint. Avoid
922 non-existant WSTOPSIG on Windows CE.
923 (win32_read_inferior_memory): Cast to remove warning.
924 (win32_arch_string): Go through the low target.
925 (initialize_low): Call set_breakpoint_data with the low
927 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
928 FOP_REGNUM, mappings): Move to ...
929 * win32-i386-low.c: ... here.
930 * win32-low.c (win32_thread_info): Move to ...
931 * win32-low.h: ... here.
932 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
933 win32-arm-low.c and wincecompat.c.
935 (install-only:): Likewise.
936 (gdbserver:): Likewise.
937 (gdbreplay:): Likewise.
938 * config.in: Regenerate.
939 * configure: Regenerate.
941 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
943 * win32-low.c: Rename typedef thread_info to
944 win32_thread_info throughout.
946 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
948 * win32-i386-low.c: Rename to ...
949 * win32-low.c: ... this.
950 * configure.srv: Replace win32-i386-low.o with win32-low.o.
951 * Makefile.in: Likewise.
953 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
955 * remote-utils.c (monitor_output): Constify msg parameter.
956 * server.h (monitor_output): Likewise.
957 * win32-i386-low.c (handle_output_debug_string): New.
958 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
959 handle_output_debug_string.
960 (get_child_debug_event): Likewise.
962 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
964 * server.c (main): Correct strtoul check.
966 2007-03-27 Jon Ringle <jon@ringle.org>
968 * linux-low.c: Check __ARCH_HAS_MMU__ also.
970 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
972 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
974 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
976 * terminal.h: Check HAVE_SGTTY_H.
978 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
980 * remote-utils.c (remote_open): Print out the assigned port number.
982 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
984 * remote-utils.c (monitor_output): New function.
985 * server.c (debug_threads): Define here.
986 (monitor_show_help): New function.
987 (handle_query): Handle qRcmd.
988 (main): Do not handle 'd' packet.
989 * server.h (debug_threads, remote_debug, monitor_output): Declare.
990 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
993 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
995 * Makefile.in (EXEEXT): New.
996 (clean): Use $(EXEEXT).
998 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1000 * target.h (target_ops): Rename send_signal to request_interrupt,
1001 and remove enum target_signal parameter.
1002 * linux-low.c (linux_request_interrupt): Rename from
1003 linux_send_signal, and always send SIGINT.
1004 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1005 and always send SIGINT.
1006 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1008 (input_interrupt): Likewise.
1010 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1012 * server.c (get_features_xml): Check if target implemented
1014 * win32-i386-low.c (win32_arch_string): New.
1015 (win32_target_ops): Add win32_arch_string as arch_string member.
1017 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1019 * spu-low.c (spu_arch_string): New.
1020 (spu_target_ops): Add spu_arch_string.
1022 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1024 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1025 * configure.ac: Do not check for terminal.h.
1026 * configure, config.in: Regenerated.
1028 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1030 * Makefile.in (OBS): Add $(XML_BUILTIN).
1031 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1033 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1034 (arm-with-iwmmxt.c): New.
1035 * config.in, configure: Regenerate.
1036 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1037 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1038 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1039 (arm*-*-linux*): Add iWMMXt and regset support.
1040 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1041 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1042 (arm_store_wmmxregset, target_regsets): New.
1043 * server.c (get_features_xml): Take annex argument. Check builtin
1045 (handle_query): Handle multiple annexes.
1047 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1049 * remote-utils.c [USE_WIN32API] (read, write): Define.
1050 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1053 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1055 * linux-i386-low.c (the_low_target): Set arch_string.
1056 * linux-x86-64-low.c (the_low_target): Likewise.
1057 * linux-low.c (linux_arch_string): New.
1058 (linux_target_ops): Add it.
1059 * linux-low.h (struct linux_target_ops): Add arch_string.
1060 * server.c (write_qxfer_response): Use const void * for DATA.
1061 (get_features_xml): New.
1062 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1063 * target.h (struct target_ops): Add arch_string method.
1065 2007-01-03 Denis Pilat <denis.pilat@st.com>
1066 Daniel Jacobowitz <dan@codesourcery.com>
1068 * linux-low.c (linux_kill): Handle being called with no threads.
1069 * win32-i386-low.c (win32_kill): Likewise.
1070 (get_child_debug_event): Clear current_process_handle.
1072 2006-12-30 Denis PILAT <denis.pilat@st.com>
1073 Daniel Jacobowitz <dan@codesourcery.com>
1075 * remote-utils.c (remote_open): Check the type of specified
1076 serial port devices before opening them.
1077 * server.c (main): Kill the inferior if an error occurs during
1078 the first remote_open.
1080 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1082 * README: Update supported targets.
1084 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1086 * Makefile.in (clean): Remove reg-mips64.c.
1087 (reg-mips64.c, reg-mips64.o): New rules.
1088 * configure.srv: Handle mips64. Include regset support for mips.
1089 * linux-mips-low.c (union mips_register): New.
1090 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1091 (mips_breakpoint, mips_breakpoint_at): Use int.
1092 (mips_collect_register, mips_supply_register)
1093 (mips_collect_register_32bit, mips_supply_register_32bit)
1094 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1095 (mips_store_fpregset, target_regsets): New.
1096 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1098 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1100 * configure.srv: Add target "spu*-*-*".
1101 * Makefile.in (clean): Remove reg-spu.c.
1102 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1103 * spu-low.c: New file.
1105 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1107 * configure.ac: Correct td_thr_tls_get_addr test.
1108 * configure: Regenerated.
1110 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1112 * linux-low.c (linux_wait_for_event): Reformat. Use the
1114 * remote-utils.c (decode_address_to_semicolon): New.
1115 * server.c (pass_signals, handle_general_set): New.
1116 (handle_query): Mention QPassSignals for qSupported.
1117 (main): Call handle_general_set.
1118 * server.h (pass_signals, decode_address_to_semicolon): New.
1120 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1122 * server.c (handle_query): Correct error handling for read_auxv.
1124 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1126 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1127 and srv_linux_thread_db to yes.
1128 * linux-s390-low.c (s390_fill_gregset): New function.
1129 (target_regsets): Define data structure.
1131 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1133 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1134 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1135 * config.in, configure: Regenerated.
1136 * inferiors.c (gdb_id_to_thread): New function.
1137 (gdb_id_to_thread_id): Use it.
1138 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1139 * linux-low.h (struct process_info): Add th member.
1140 (thread_db_get_tls_address): New prototype.
1141 * remote-utils.c (decode_address): Make non-static.
1142 * server.c (handle_query): Handle qGetTLSAddr.
1143 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1144 * target.h (struct target_ops): Add get_tls_address.
1145 * thread-db.c (maybe_attach_thread): Save the thread handle.
1146 (thread_db_get_tls_address): New.
1148 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1150 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1151 (linux_resume_one_process): Take a siginfo_t *. Update all
1152 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1153 (struct pending_signals): Add a siginfo_t.
1154 (linux_wait_for_process): Always set last_status.
1155 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1156 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1157 * linux-low.h (struct process_info): Add last_status.
1159 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1161 * remote-utils.c (try_rle): New function.
1162 (putpkt_binary): Use it.
1164 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1166 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1167 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1168 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1169 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1170 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1173 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1175 * server.c (terminal_fd): New variable.
1176 (old_foreground_pgrp): Likewise.
1177 (restore_old_foreground_pgrp): New function.
1178 (start_inferior): Record the terminal file descriptor in terminal_fd
1179 and its original foreground group in old_foreground_pgrp. Register
1180 restore_old_foreground_pgrp with atexit().
1182 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1184 * server.c (handle_query): Correct qPart to qXfer.
1186 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1188 * configure.ac: Check for more headers which are missing on
1189 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1190 * configure.srv: Add Cygwin and mingw32.
1191 * remote-utils.c: Don't include headers unconditionally which
1192 are missing on mingw32. Include <winsock.h> for mingw32.
1193 (remote_open): Adjust for mingw32 support. Flush
1194 standard error after writing to it.
1195 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1196 (unblock_async_io, enable_async_io, disable_async_io)
1197 (readchar, getpkt): Update for Winsock support.
1198 (prepare_resume_reply): Expect a protocol signal number.
1199 * server.c: Disable <sys/wait.h> on mingw32.
1200 (start_inferior): Adjust for mingw32 support. Flush
1201 standard error after writing to it.
1202 (attach_inferior): Likewise. Use protocol signal
1204 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1206 * win32-i386-low.c: New file.
1207 * Makefile.in (XM_CLIBS): Set.
1208 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1209 (win32-i386-low.o): New dependency rule.
1210 * linux-low.c (linux_wait): Use target signal numbers.
1211 * target.h (struct target_ops): Doc fix.
1212 * server.h (target_signal_to_name): New prototype.
1213 * gdbreplay.c: Don't include headers unconditionally which
1214 are missing on mingw32. Include <winsock.h> for mingw32.
1215 (remote_close, remote_open): Adjust for Winsock support.
1216 * configure, config.in: Regenerated.
1218 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1220 * server.c (decode_xfer_read, write_qxfer_response): New.
1221 (handle_query): Take a packet length argument. Handle
1222 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1223 the qSupported response.
1224 (main): Update call to handle_query.
1226 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1228 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1229 (putpkt_binary): Renamed from putpkt and adjusted for binary
1231 (putpkt): New wrapper for putpkt_binary.
1232 (readchar): Don't mask off the high bit.
1233 (decode_X_packet): New function.
1234 * server.c (main): Call putpkt_binary if a handler sets the packet
1235 length. Save the length of the incoming packet. Handle 'X'.
1236 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1238 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1240 * server.c (handle_query): Handle qSupported.
1242 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1244 * remote-utils.c (all_symbols_looked_up): New variable.
1245 (look_up_one_symbol): Check it.
1246 * server.h (look_up_one_symbol): New declaration.
1247 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1249 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1251 * Makefile.in (linux-arm-low.o): Update dependencies.
1252 * linux-arm-low.c: Include "gdb_proc_service.h".
1253 (PTRACE_GET_THREAD_AREA): Define.
1254 (ps_get_thread_area): New function.
1256 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1258 * configure.srv (m68k*-*-uclinux*): New target.
1259 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1260 (linux_resume_one_process): Remove extraneous cast.
1261 (linux_read_offsets): New.
1262 (linux_target_op): Add linux_read_offsets on mmuless systems.
1263 * server.c (handle_query): Add qOffsets logic.
1264 * target.h (struct target_ops): Add read_offsets.
1266 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1268 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1269 (PTRACE_GET_THREAD_AREA): Define.
1270 (ps_get_thread_area): New function.
1271 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1272 (linux-x86-64-low.o): Update.
1274 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1276 * configure.ac: Remove checks for prfpregset_t.
1277 * gdb_proc_service.h: New file.
1278 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1279 new "gdb_proc_service.h".
1280 * proc-service.c: Likewise.
1281 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1282 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1283 * Makefile.in (gdb_proc_service_h): Updated.
1284 * configure, config.in: Regenerated.
1286 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1288 * remote-utils.c (prepare_resume_reply): Move declaration
1289 of gdb_id_from_wait to the top of the block.
1291 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1293 * linux-low.c (regsets_store_inferior_registers): Read the regset
1294 from the target before filling it.
1296 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1298 * server.c (attach_inferior): Return SIGTRAP for a successful
1301 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1303 * Makefile.in (OBS): Add version.o.
1304 (STAGESTUFF): Delete.
1305 (version.o): Add dependencies.
1306 (version.c): Replace rule.
1307 (clean): Remove version.c.
1308 * server.c (gdbserver_version): New.
1309 (gdbserver_usage): Use printf.
1310 (main): Handle --version and --help.
1311 * server.h (version, host_name): Add declarations.
1313 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1325 * linux-x86-64-low.c:
1328 * linux-ppc64-low.c:
1337 * linux-crisv32-low.c:
1349 * gdbserver.1: Add (C) after Copyright. Update the FSF
1352 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1354 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1355 (arm_breakpoint_at): Recognize both breakpoints.
1356 (the_low_target): Use the correct breakpoint instruction.
1358 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1360 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1361 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1362 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1363 (the_low_target): Update.
1365 2005-10-25 Andreas Schwab <schwab@suse.de>
1367 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1369 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1370 (ia64_num_regs): Reduce to 462.
1372 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1374 * acinclude.m4: Correct quoting.
1375 * aclocal.m4: Regenerated.
1377 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1378 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1379 (thread_db_init): Call thread_db_err_str.
1380 * configure.ac: Check for TD_VERSION.
1381 * config.in, configure: Regenerated.
1383 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1385 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1387 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1389 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1390 is not available. Define HAVE_PTRACE_GETREGS if it is.
1391 * config.in, configure: Regenerated.
1392 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1393 * linux-i386-low.c, linux-m68k-low.c: Update to use
1394 HAVE_PTRACE_GETREGS.
1395 * linux-low.c (regsets_fetch_inferior_registers)
1396 (regsets_store_inferior_registers): Only return 0 if we processed
1398 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1399 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1401 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1403 * inferiors.c (struct thread_info): Add gdb_id.
1404 (add_thread): Add gdb_id argument.
1405 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1406 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1407 calls to add_thread.
1408 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1409 * server.c (handle_query): Use thread_to_gdb_id.
1410 (handle_v_cont, main): Use gdb_id_to_thread_id.
1411 * server.h (add_thread): Update prototype.
1412 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1415 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1417 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1418 left-padded registers.
1419 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1420 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1422 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1424 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1425 * configure: Regenerate.
1426 * config.in: Regenerate.
1427 * server.h (NEED_DECLARATION_STRERROR):
1428 Replace with !HAVE_DECL_STRERROR.
1430 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1432 * linux-low.c (linux_wait, linux_send_signal): Don't test
1433 an unsigned long variable for > 0 if it could be MAX_ULONG.
1434 * server.c (myresume): Likewise.
1435 * target.c (set_desired_inferior): Likewise.
1437 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1439 * configure.ac: Simplify and improve check for socklen_t.
1440 * configure, config.in: Regenerate.
1442 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1444 * acconfig.h: Remove.
1445 * configure.ac: Add a test for socklen_t. Use three-argument
1446 AC_DEFINE throughout.
1447 * config.in: Regenerated using autoheader 2.59.
1448 * configure: Regenerated.
1450 * gdbreplay.c (socklen_t): Provide a default.
1451 (remote_open): Use socklen_t.
1452 * remote-utils.c (socklen_t): Provide a default.
1453 (remote_open): Use socklen_t.
1454 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1457 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1459 * linux-low.c (linux_read_memory, linux_write_memory)
1460 (linux_read_auxv): Likewise.
1461 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1462 (check_mem_write): Likewise.
1463 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1465 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1466 (registers_from_string, register_data): Likewise.
1467 * server.c (handle_query, main): Likewise.
1468 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1469 (decode_M_packet): Likewise.
1470 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1471 * target.h (struct target_ops): Update read_memory, write_memory,
1473 (read_inferior_memory, write_inferior_memory): Update.
1474 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1476 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1477 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1478 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1479 linux-s390-low.c, linux-sh-low.c: Update for changes in
1480 read_inferior_memory and the_low_target->breakpoint.
1482 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1484 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1485 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1486 * configure.srv: Add powerpc64-*-linux*.
1487 * linux-ppc64-low.c: New file.
1489 2005-05-23 Orjan Friberg <orjanf@axis.com>
1491 * linux-cris-low.c: New file with support for CRIS.
1492 * linux-crisv32-low.c: Ditto for CRISv32.
1493 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1494 (clean): Add reg-cris.c and reg-crisv32.c.
1495 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1496 reg-crisv32.o, and reg-crisv32.c to make rules.
1497 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1500 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1502 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1503 of sizeof (PTRACE_XFER_TYPE).
1504 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1506 2005-05-12 Orjan Friberg <orjanf@axis.com>
1508 * target.h (struct target_ops): Add insert_watchpoint,
1509 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1510 pointers for hardware watchpoint support.
1511 * linux-low.h (struct linux_target_ops): Ditto.
1512 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1513 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1514 to linux_target_ops.
1515 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1517 * server.c (main): Recognize 'Z' and 'z' packets.
1519 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1521 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1522 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1523 (the_low_target): Add new members.
1525 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1527 * proc-service.c (ps_lgetregs): Search all_processes instead of
1530 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1532 * server.c (start_inferior): Change return type to int.
1533 (attach_inferior): Change sigptr to int *.
1534 (handle_v_cont, handle_v_requests): Change signal to int *.
1535 (main): Change signal to int.
1537 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1539 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1540 * configure.srv: Add m32r*-*-linux*.
1541 * linux-m32r-low.c: New file.
1543 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1545 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1547 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1549 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1550 Take unsigned long arguments for PIDs.
1551 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1552 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1553 (wait_for_sigstop, linux_resume_one_process)
1554 (regsets_fetch_inferior_registers, linux_send_signal)
1555 (linux_read_auxv): Likewise. Update the types of variables holding
1556 PIDs. Update format string specifiers.
1557 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1558 * remote-utils.c (prepare_resume_reply): Likewise.
1559 * server.c (cont_thread, general_thread, step_thread)
1560 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1562 (handle_query): Update format specifiers.
1563 (handle_v_cont, main): Use strtoul for thread IDs.
1564 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1565 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1566 (general_thread, step_thread, thread_from_wait)
1567 (old_thread_from_wait): Update.
1568 * target.h (struct thread_resume): Use unsigned long for THREAD.
1569 (struct target_ops): Use unsigned long for arguments to attach and
1572 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1574 * acinclude.m4: Include bfd/bfd.m4 directly.
1575 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1576 <agriffis@toolchain.org>.
1577 * aclocal.m4, configure: Regenerated.
1579 2005-01-07 Andrew Cagney <cagney@gnu.org>
1581 * configure.ac: Rename configure.in, require autoconf 2.59.
1582 * configure: Re-generate.
1584 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1586 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1588 * aclocal.m4: Regenerated.
1589 * configure: Regenerated.
1591 2004-11-21 Andreas Schwab <schwab@suse.de>
1593 * linux-m68k-low.c (m68k_num_gregs): Define.
1594 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1595 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1596 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1597 (m68k_breakpoint_at): New. Add to the_low_target.
1599 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1600 srv_linux_thread_db to yes.
1602 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1604 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1605 (ARCH_SET_FS): Likewise.
1606 (ARCH_GET_FS): Likewise.
1607 (ARCH_GET_GS): Likewise.
1609 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1611 * linux-i386-low.c (ps_get_thread_area): New.
1612 * linux-x86-64-low.c (ps_get_thread_area): New.
1613 * linux-low.c: Include <sys/syscall.h>.
1614 (linux_kill_one_process): Don't kill the first thread here.
1615 (linux_kill): Kill the first thread here.
1616 (kill_lwp): New function.
1617 (send_sigstop, linux_send_signal): Use it.
1618 * proc-service.c: Clean up #ifdefs.
1619 (fpregset_info): Delete.
1620 (ps_lgetregs): Update and enable implementation.
1621 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1623 * remote-utils.c (struct sym_cache, symbol_cache): New.
1624 (input_interrupt): Print a clearer message.
1625 (async_io_enabled): New variable.
1626 (enable_async_io, disable_async_io): Use it. Update comments.
1627 (look_up_one_symbol): Use the symbol cache.
1628 * thread-db.c (thread_db_look_up_symbols): New function.
1629 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1631 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1633 * configure.in: Test for -rdynamic.
1634 * configure: Regenerated.
1635 * Makefile (INTERNAL_LDFLAGS): New.
1636 (gdbserver, gdbreplay): Use it.
1638 2004-09-02 Andrew Cagney <cagney@gnu.org>
1640 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1642 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1644 * linux-low.c (linux_wait): Clear all_processes list also.
1646 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1648 * linux-low.c: Include <errno.h>. Remove extern declaration of
1651 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1653 * gdbreplay.c, server.h, utils.c: Update copyright years.
1655 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1657 * server.c (main): Print child status or termination signal from
1658 variable 'signal', not 'sig'.
1660 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1662 * linux-low.c (linux_read_memory): Change return type to
1663 int. Check for and return error from ptrace().
1664 * target.c (read_inferior_memory): Change return type to int. Pass
1665 back return status from the_target->read_memory().
1666 * target.h (struct target_ops): Adapt *read_memory() prototype.
1668 (read_inferior_memory): Adapt prototype.
1669 * server.c (main): Return an error packet if
1670 read_inferior_memory() returns an error.
1672 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1674 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1675 Unify with other clean targets.
1677 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1679 * server.c (handle_v_cont): Call set_desired_inferior.
1681 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1683 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1685 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1687 * linux-low.c (linux_wait): Unblock async I/O.
1688 (linux_resume): Block and enable async I/O.
1689 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1690 * server.h (block_async_io, unblock_async_io): Add prototypes.
1692 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1694 * remote-utils.c (remote_open): Print a status notice after
1696 * server.c (attach_inferior): Print a status notice after
1699 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1701 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1703 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1705 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1707 * server.c, target.h: Update copyright years.
1709 2004-02-25 Roland McGrath <roland@redhat.com>
1711 * target.h (struct target_ops): New member `read_auxv'.
1712 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1713 * linux-low.c (linux_read_auxv): New function.
1714 (linux_target_ops): Initialize `read_auxv' member to that.
1716 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1718 Committed by Jim Blandy <jimb@redhat.com>.
1720 * linux-s390-low.c (s390_num_regs): Update.
1721 (s390_regmap): Remove control registers. Use __s390x__ predefine
1722 instead of GPR_SIZE to distiguish s390 and s390x targets.
1724 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1726 * linux-low.c: Update copyright year.
1727 (check_removed_breakpoint): Clear pending_is_breakpoint.
1728 (linux_set_resume_request, linux_queue_one_thread)
1729 (resume_status_pending_p): New functions.
1730 (linux_continue_one_thread): Use process->resume.
1731 (linux_resume): Only resume threads if there are no pending events.
1732 * linux-low.h (struct process_info): Add resume request
1735 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1737 * regcache.c (new_register_cache): Clear the allocated register
1738 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1740 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1742 * linux-low.c (linux_resume): Take a struct thread_resume *
1744 (linux_wait): Update call.
1745 (resume_ptr): New static variable.
1746 (linux_continue_one_thread): Renamed from
1747 linux_continue_one_process. Use resume_ptr.
1748 (linux_resume): Use linux_continue_one_thread.
1749 * server.c (handle_v_cont, handle_v_requests): New functions.
1750 (myresume): New function.
1751 (main): Handle 'v' case.
1752 * target.h (struct thread_resume): New type.
1753 (struct target_ops): Change argument of "resume" to struct
1755 (myresume): Delete macro.
1757 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1759 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1760 (uninstall): Support DESTDIR.
1762 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1764 * configure.srv: Add xscale*linux copy of arm*linux entry.
1766 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1768 * linux-arm-low.c (arm_reinsert_addr): New function.
1769 (the_low_target): Add arm_reinsert_addr.
1771 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1773 * mem-break.c: Remove whitespace at end of file.
1775 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1777 * configure.in: Check whether we need to prototype strerror.
1778 * server.h: Optionally prototype strerror.
1779 * gdbreplay.c (perror_with_name): Use strerror.
1780 * linux-low.c (linux_attach_lwp): Use strerror.
1781 * utils.c (perror_with_name): Use strerror.
1782 * config.in, configure: Regenerated.
1784 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1786 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1787 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1789 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1791 * Makefile.in (SFILES): Update.
1792 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1793 low-sun3.c: Remove files.
1795 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1797 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1798 (linux_detach_one_process, linux_detach): New functions.
1799 (linux_target_ops): Add linux_detach.
1800 * server.c (main): Handle 'D' packet.
1801 * target.h (struct target_ops): Add "detach" member.
1802 (detach_inferior): Define.
1804 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1806 From Kelley Cook <kelleycook@wideopenwest.com>:
1807 * configure.srv: Accept i[34567]86 variants.
1809 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1811 * linux-low.c (linux_wait_for_event): Correct comment typos.
1812 (linux_resume_one_process): Call check_removed_breakpoint.
1813 (linux_send_signal): New function.
1814 (linux_target_ops): Add linux_send_signal.
1815 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1817 * target.h (struct target_ops): Add send_signal.
1819 2003-05-29 Jim Blandy <jimb@redhat.com>
1821 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1822 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1823 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1824 away part of the register's value.
1826 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1828 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1829 (linux_wait_for_event, linux_init_signals): Likewise.
1831 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1833 * configure.in: Check for stdlib.h.
1834 * configure: Regenerated.
1835 * config.in: Regenerated.
1837 2003-01-04 Andreas Schwab <schwab@suse.de>
1839 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1841 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1843 * Makefile.in: Remove obsolete code.
1845 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1847 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1848 defined(PT_FPR0_HI).
1850 2002-11-17 Stuart Hughes <seh@zee2.com>
1852 * linux-arm-low.c (arm_num_regs): Increase.
1853 (arm_regmap): Include status register.
1855 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
1857 * linux-low.c (register_addr): Remove incorrect -1 check.
1859 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
1861 * linux-low.c (linux_create_inferior): Call setpgid. Return
1863 (unstopped_p, linux_signal_pid): Remove.
1864 (linux_target_ops): Remove linux_signal_pid.
1865 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1866 global instead of target method.
1867 * target.h (struct target_ops): Remove signal_pid. Update comment
1868 for create_inferior.
1869 * server.c (signal_pid): New variable.
1870 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
1871 gdbserver. Set the child to be the foreground process group.
1872 (attach_inferior): Set signal_pid.
1874 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
1876 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1878 2002-08-20 Jim Blandy <jimb@redhat.com>
1880 * Makefile.in (LDFLAGS): Allow the configure script to establish a
1883 2002-08-01 Andrew Cagney <cagney@redhat.com>
1885 * Makefile.in: Make chill references obsolete.
1887 2002-07-24 Kevin Buettner <kevinb@redhat.com>
1889 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1890 * configure: Regenerate.
1891 * config.in: Regenerate.
1893 2002-07-09 David O'Brien <obrien@FreeBSD.org>
1895 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1896 (perror_with_name, remote_close, remote_open, expect, play): Static.
1898 2002-07-04 Michal Ludvig <mludvig@suse.cz>
1900 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1901 byte offsets instead of an array of indexes.
1902 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1904 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
1906 * regcache.c: Add comment.
1908 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
1910 * thread-db.c: New file.
1911 * proc-service.c: New file.
1912 * acinclude.m4: New file.
1913 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1914 proc-service.o, and thread-db.o.
1915 (linux-low.o): Add USE_THREAD_DB.
1916 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1917 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1918 * aclocal.m4: Regenerated.
1919 * config.in: Regenerated.
1920 * configure: Regenerated.
1921 * configure.in: Check for proc_service.h, sys/procfs.h,
1922 thread_db.h, and linux/elf.h headrs.
1923 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1924 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
1925 Check for -lthread_db and thread support.
1926 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1927 PowerPC, and SuperH.
1928 * i387-fp.c: Constify arguments.
1929 * i387-fp.h: Likewise.
1930 * inferiors.c: (struct thread_info): Renamed from
1931 `struct inferior_info'. Remove PID member. Use generic inferior
1932 list header. All uses updated.
1933 (inferiors, signal_pid): Removed.
1934 (all_threads): New variable.
1935 (get_thread): Define.
1936 (add_inferior_to_list): New function.
1937 (for_each_inferior): New function.
1938 (change_inferior_id): New function.
1939 (add_inferior): Removed.
1940 (remove_inferior): New function.
1941 (add_thread): New function.
1942 (free_one_thread): New function.
1943 (remove_thread): New function.
1944 (clear_inferiors): Use for_each_inferior and free_one_thread.
1945 (find_inferior): New function.
1946 (find_inferior_id): New function.
1947 (inferior_target_data): Update argument type.
1948 (set_inferior_target_data): Likewise.
1949 (inferior_regcache_data): Likewise.
1950 (set_inferior_regcache_data): Likewise.
1951 * linux-low.c (linux_bp_reinsert): Remove.
1952 (all_processes, stopping_threads, using_thrads)
1953 (struct pending_signals, debug_threads, pid_of): New.
1954 (inferior_pid): Replace with macro.
1955 (struct inferior_linux_data): Remove.
1956 (get_stop_pc, add_process): New functions.
1957 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1958 Use add_process and add_thread.
1959 (linux_attach_lwp): New function, based on old linux_attach. Use
1960 add_process and add_thread. Set stop_expected for new threads.
1961 (linux_attach): New function.
1962 (linux_kill_one_process): New function.
1963 (linux_kill): Kill all LWPs.
1964 (linux_thread_alive): Use find_inferior_id.
1965 (check_removed_breakpoints, status_pending_p): New functions.
1966 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1967 Update. Use WNOHANG. Wait for cloned processes also. Update process
1968 struct for the found process.
1969 (linux_wait_for_event): New function.
1970 (linux_wait): Use it. Support LWPs.
1971 (send_sigstop, wait_for_sigstop, stop_all_processes)
1972 (linux_resume_one_process, linux_continue_one_process): New functions.
1973 (linux_resume): Support LWPs.
1974 (REGISTER_RAW_SIZE): Remove.
1975 (fetch_register): Use register_size instead. Call supply_register.
1976 (usr_store_inferior_registers): Likewise. Call collect_register.
1978 (regsets_fetch_inferior_registers): Improve error message.
1979 (regsets_store_inferior_registers): Add debugging.
1980 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1981 (unstopped_p, linux_signal_pid): New functions.
1982 (linux_target_ops): Add linux_signal_pid.
1983 (linux_init_signals): New function.
1984 (initialize_low): Call it. Initialize using_threads.
1985 * regcache.c (inferior_regcache_data): Add valid
1987 (get_regcache): Fetch registers lazily. Add fetch argument
1988 and update all callers.
1989 (regcache_invalidate_one, regcache_invalidate): New
1991 (new_register_cache): Renamed from create_register_cache.
1992 Return the new regcache.
1993 (free_register_cache): Change argument to a void *.
1994 (registers_to_string, registers_from_string): Call get_regcache
1995 with fetch flag set.
1996 (register_data): Make static. Pass fetch flag to get_regcache.
1997 (supply_register): Call get_regcache with fetch flag clear.
1998 (collect_register): Call get_regcache with fetch flag set.
1999 (collect_register_as_string): New function.
2000 * regcache.h: Update.
2001 * remote-utils.c (putpkt): Flush after debug output and use
2003 Handle input interrupts while waiting for an ACK.
2004 (input_interrupt): Use signal_pid method.
2005 (getpkt): Flush after debug output and use stderr.
2006 (outreg): Use collect_register_as_string.
2007 (new_thread_notify, dead_thread_notify): New functions.
2008 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2010 (look_up_one_symbol): Flush after debug output.
2011 * server.c (step_thread, server_waiting): New variables.
2012 (start_inferior): Don't use signal_pid. Update call to mywait.
2013 (attach_inferior): Update call to mywait.
2014 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2015 (main): Don't fetch/store registers explicitly. Use
2016 set_desired_inferior. Support proposed ``Hs'' packet. Update
2019 (struct inferior_list, struct_inferior_list_entry): New.
2020 * target.c (set_desired_inferior): New.
2021 (write_inferior_memory): Constify.
2022 (mywait): New function.
2024 (struct target_ops): New signal_pid method.
2025 (mywait): Removed macro, added prototype.
2027 * linux-low.h (regset_func): Removed.
2028 (regset_fill_func, regset_store_func): New.
2029 (enum regset_type): New.
2030 (struct regset_info): Add type field. Use new operation types.
2031 (struct linux_target_ops): stop_pc renamed to get_pc.
2032 Add decr_pc_after_break and breakpoint_at.
2033 (get_process, get_thread_proess, get_process_thread)
2034 (strut process_info, all_processes, linux_attach_lwp)
2035 (thread_db_init): New.
2037 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2038 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2039 (the_low_target): Add new members.
2040 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2041 (i386_store_fpxregset): Constify.
2042 (target_regsets): Add new kind identifier.
2043 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2044 (i386_set_pc): Add debugging.
2045 (i386_breakpoint_at): New function.
2046 (the_low_target): Add new members.
2047 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2048 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2049 (mips_breakpoint_at): New.
2050 (the_low_target): Add new members.
2051 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2052 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2053 (the_low_target): Add new members.
2054 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2055 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2056 (the_low_target): Add new members.
2057 * linux-x86-64-low.c (target_regsets): Add new kind
2060 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2062 From Martin Pool <mbp@samba.org>:
2063 * server.c (gdbserver_usage): New function.
2066 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2068 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2071 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2073 * Makefile.in: Remove obsolete code.
2075 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2077 * linux-low.c (regsets_fetch_inferior_registers),
2078 (regsets_store_inferior_registers): Removed cast to int from
2080 * regcache.h: Added declaration of struct inferior_info.
2082 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2084 * inferiors.c (struct inferior_info): Add regcache_data.
2085 (add_inferior): Call create_register_cache.
2086 (clear_inferiors): Call free_register_cache.
2087 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2088 * regcache.c (struct inferior_regcache_data): New.
2089 (registers): Remove.
2090 (get_regcache): New function.
2091 (create_register_cache, free_register_cache): New functions.
2092 (set_register_cache): Don't initialize the register cache here.
2093 (registers_to_string, registers_from_string, register_data): Call
2095 * regcache.h: Add prototypes.
2096 * server.h: Likewise.
2098 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2100 * mem-break.c: New file.
2101 * mem-break.h: New file.
2102 * Makefile.in: Add mem-break.o rule; update server.h
2104 * inferiors.c (struct inferior_info): Add target_data
2106 (clear_inferiors): Free target_data member if set.
2107 (inferior_target_data, set_inferior_target_data): New functions.
2108 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2109 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2110 * linux-low.c (linux_bp_reinsert): New variable.
2111 (struct inferior_linux_data): New.
2112 (linux_create_inferior): Use set_inferior_target_data.
2113 (linux_attach): Likewise. Call add_inferior.
2114 (linux_wait_for_one_inferior): New function.
2115 (linux_wait): Call it.
2116 (linux_write_memory): Add const.
2117 (initialize_low): Call set_breakpoint_data.
2118 * linux-low.h (struct linux_target_ops): Add breakpoint
2120 * server.c (attach_inferior): Remove extra add_inferior
2122 * server.h: Include mem-break.h. Update inferior.c
2124 * target.c (read_inferior_memory)
2125 (write_inferior_memory): New functions.
2126 * target.h (read_inferior_memory)
2127 (write_inferior_memory): Change macros to prototypes.
2128 (struct target_ops): Update comments. Add const to write_memory
2131 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2133 * linux-low.c (usr_store_inferior_registers): Support
2134 registers which are allowed to fail to store.
2135 * linux-low.h (linux_target_ops): Likewise.
2136 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2137 (ppc_cannot_store_register): FPSCR may not be storable.
2139 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2141 * server.h: Include <string.h> if HAVE_STRING_H.
2142 * ChangeLog: Correct paths in last ChangeLog entry.
2144 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2146 * linux-low.h: Remove obsolete prototypes.
2147 (struct linux_target_ops): New.
2148 (extern the_low_target): New.
2149 * linux-low.c (num_regs, regmap): Remove declarations.
2150 (register_addr): Use the_low_target explicitly.
2151 (fetch_register): Likewise.
2152 (usr_fetch_inferior_registers): Likewise.
2153 (usr_store_inferior_registers): Likewise.
2154 * linux-arm-low.c (num_regs): Remove.
2155 (arm_num_regs): Define.
2156 (arm_regmap): Renamed from regmap, made static.
2157 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2159 (arm_cannot_store_register): Renamed from cannot_store_register,
2161 (the_low_target): New.
2162 * linux-i386-low.c (num_regs): Remove.
2163 (i386_num_regs): Define.
2164 (i386_regmap): Renamed from regmap, made static.
2165 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2167 (i386_cannot_store_register): Renamed from cannot_store_register,
2169 (the_low_target): New.
2170 * linux-ia64-low.c (num_regs): Remove.
2171 (ia64_num_regs): Define.
2172 (ia64_regmap): Renamed from regmap, made static.
2173 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2175 (ia64_cannot_store_register): Renamed from cannot_store_register,
2177 (the_low_target): New.
2178 * linux-m68k-low.c (num_regs): Remove.
2179 (m68k_num_regs): Define.
2180 (m68k_regmap): Renamed from regmap, made static.
2181 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2183 (m68k_cannot_store_register): Renamed from cannot_store_register,
2185 (the_low_target): New.
2186 * linux-mips-low.c (num_regs): Remove.
2187 (mips_num_regs): Define.
2188 (mips_regmap): Renamed from regmap, made static.
2189 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2191 (mips_cannot_store_register): Renamed from cannot_store_register,
2193 (the_low_target): New.
2194 * linux-ppc-low.c (num_regs): Remove.
2195 (ppc_num_regs): Define.
2196 (ppc_regmap): Renamed from regmap, made static.
2197 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2199 (ppc_cannot_store_register): Renamed from cannot_store_register,
2201 (the_low_target): New.
2202 * linux-s390-low.c (num_regs): Remove.
2203 (s390_num_regs): Define.
2204 (s390_regmap): Renamed from regmap, made static.
2205 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2207 (s390_cannot_store_register): Renamed from cannot_store_register,
2209 (the_low_target): New.
2210 * linux-sh-low.c (num_regs): Remove.
2211 (sh_num_regs): Define.
2212 (sh_regmap): Renamed from regmap, made static.
2213 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2215 (sh_cannot_store_register): Renamed from cannot_store_register,
2217 (the_low_target): New.
2218 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2219 (the_low_target): New.
2221 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2223 * Makefile.in: Add stamp-h target.
2224 * configure.in: Create stamp-h.
2225 * configure: Regenerated.
2227 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2229 * inferiors.c: New file.
2230 * target.c: New file.
2231 * target.h: New file.
2232 * Makefile.in: Add target.o and inferiors.o. Update
2234 * linux-low.c (inferior_pid): New static variable,
2235 moved from server.c.
2236 (linux_create_inferior): Renamed from create_inferior.
2237 Call add_inferior. Return 0 on success instead of a PID.
2238 (linux_attach): Renamed from myattach.
2239 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2240 (linux_thread_alive): Renamed from mythread_alive.
2241 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2243 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2244 (regsets_store_inferior_registers): Correct error message.
2245 Add missing ``return 0''.
2246 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2247 (linux_store_registers): Renamed from store_inferior_registers.
2248 (linux_read_memory): Renamed from read_inferior_memory.
2249 (linux_write_memory): Renamed from write_inferior_memory.
2250 (linux_target_ops): New structure.
2251 (initialize_low): Call set_target_ops ().
2252 * remote-utils.c (unhexify): New function.
2253 (hexify): New function.
2254 (input_interrupt): Send signals to ``signal_pid''.
2255 * server.c (inferior_pid): Remove.
2256 (start_inferior): Update create_inferior call.
2257 (attach_inferior): Call add_inferior.
2258 (handle_query): New function.
2259 (main): Call handle_query for `q' packets.
2260 * server.h: Include "target.h". Remove obsolete prototypes.
2261 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2263 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2265 * Makefile.in: Add WARN_CFLAGS. Update configury
2267 * configure.in: Check for <string.h>
2268 * configure: Regenerate.
2269 * config.in: Regenerate.
2270 * gdbreplay.c: Include needed system headers.
2271 (remote_open): Remove strchr prototype.
2272 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2273 * regcache.c (supply_register): Change buf argument to const void *.
2274 (supply_register_by_name): Likewise.
2275 (collect_register): Change buf argument to void *.
2276 (collect_register_by_name): Likewise.
2277 * regcache.h: Add missing prototypes.
2278 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2279 * server.c (handle_query): New function.
2280 (attached): New static variable, moved out of main.
2281 (main): Quiet longjmp clobber warnings.
2282 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2283 * utils.c (error): Remove NORETURN.