1 2009-05-23 Doug Evans <dje@google.com>
3 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4 from struct inferior_list_entry * to struct lwp_info *.
7 2009-05-13 Doug Evans <dje@google.com>
9 * linux-x86-low.c: Don't include assert.h.
10 (x86_siginfo_fixup): Use fatal, not assert.
11 (x86_arch_setup): Fix comment.
13 2009-05-12 Doug Evans <dje@google.com>
15 Biarch support for i386/amd64 gdbserver.
16 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19 (linux-x86-low.o): Add.
20 * linux-x86-64-low.c: Delete.
21 * linux-i386-low.c: Delete.
22 * linux-x86-low.c: New file.
23 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
25 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
27 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
28 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
29 (linux_child_pid_to_exec_file): New function.
30 (elf_64_header_p, elf_64_file_p): New functions.
31 (siginfo_fixup): New function.
32 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
33 give target a chance to convert layout.
34 * linux-low.h (linux_target_ops): New member siginfo_fixup.
35 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
37 2009-05-07 Doug Evans <dje@google.com>
39 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
40 (regsets_store_inferior_registers): Ditto.
42 2009-05-06 Pedro Alves <pedro@codesourcery.com>
46 * linux-low.c (must_set_ptrace_flags): Delete.
47 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
49 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
50 `lwp->must_set_ptrace_flags' instead.
51 (linux_wait_for_event_1): Set ptrace options here.
52 (linux_wait_1): ... not here.
54 2009-04-30 Doug Evans <dje@google.com>
56 * inferiors.c (started_inferior_callback): New function.
57 (attached_inferior_callback): New function.
58 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
59 * server.c (print_started_pid, print_attached_pid): New functions.
60 (detach_or_kill_for_exit): New function.
61 (main): Call it instead of for_each_inferior (kill_inferior_callback).
62 * server.h (have_started_inferiors_p): Declare.
63 (have_attached_inferiors_p): Declare.
65 * inferiors.c (remove_process): Fix memory leak, free process.
66 * linux-low.c (linux_remove_process): New function.
67 (linux_kill): Call it instead of remove_process.
68 (linux_detach, linux_wait_1): Ditto.
70 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
72 * configure.srv: Add x86 Windows CE target.
74 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
76 * inferiors.c (get_thread_process): Make global.
77 * server.h (get_thread_process): Add prototype.
78 * thread-db.c (find_one_thread): Use get_thread_process
79 instead of current_process.
80 (thread_db_get_tls_address): Do not crash if called when
81 thread layer is not yet initialized.
83 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
85 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
86 * spu-low.c (current_tid): Rename to ...
87 (current_ptid): ... this.
88 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
89 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
90 ptid_get_lwp (current_ptid) instead of current_tid.
91 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
92 instead of current_tid. Use find_process_pid to verify pid
93 argument is valid. Pass proper argument to remove_process.
94 (spu_thread_alive): Compare current_ptid instead of current_tid.
95 (spu_resume): Likewise.
97 2009-04-02 Pedro Alves <pedro@codesourcery.com>
99 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
102 2009-04-01 Pedro Alves <pedro@codesourcery.com>
104 Implement the multiprocess extensions, and add linux multiprocess
107 * server.h (ULONGEST): Declare.
108 (struct ptid, ptid_t): New.
109 (minus_one_ptid, null_ptid): Declare.
110 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
111 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
112 (struct inferior_list_entry): Change `id' type from unsigned from
114 (struct sym_cache, struct breakpoint, struct
115 process_info_private): Forward declare.
116 (struct process_info): Declare.
117 (current_process): Declare.
118 (all_processes): Declare.
119 (initialize_inferiors): Declare.
120 (add_thread): Adjust to use ptid_t.
121 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
122 (add_process, remove_process, find_thread_pid): Declare.
123 (find_inferior_id): Adjust to use ptid_t.
124 (cont_thread, general_thread, step_thread): Change type to ptid_t.
125 (multi_process): Declare.
126 (push_event): Adjust to use ptid_t.
127 (read_ptid, write_ptid): Declare.
128 (prepare_resume_reply): Adjust to use ptid_t.
129 (clear_symbol_cache): Declare.
130 * inferiors.c (all_processes): New.
131 (null_ptid, minus_one_ptid): New.
132 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
133 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
134 (add_thread): Change unsigned long to ptid. Remove gdb_id
136 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
137 (gdb_id_to_thread): Rename to ...
138 (find_thread_pid): ... this. Change unsigned long to ptid.
139 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
140 (loaded_dll, pull_pid_from_list): Adjust.
141 (add_process, remove_process, find_process_pid)
142 (get_thread_process, current_process, initialize_inferiors): New.
143 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
144 (struct target_waitstatus) <related_pid>: Ditto.
145 (struct target_ops) <kill, detach>: Add `pid' argument. Change
147 (struct target_ops) <join>: Add `pid' argument.
148 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
149 (struct target_ops) <wait>: Add `ptid' field. Change return type
151 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
152 (mywait): Add `ptid' argument. Change return type to ptid_t.
153 (target_pid_to_str): Declare.
154 * target.c (set_desired_inferior): Adjust to use ptids.
155 (mywait): Add new `ptid' argument. Adjust.
156 (target_pid_to_str): New.
157 * mem-break.h (free_all_breakpoints): Declare.
158 * mem-break.c (breakpoints): Delelete.
159 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
160 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
161 to use per-process breakpoint list.
162 (free_all_breakpoints): New.
163 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
164 (symbol_cache, all_symbols_looked_up): Delete.
166 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
168 (prepare_resume_reply): Change ptid argument's type from unsigned
169 long to ptid_t. Adjust. Implement W;process and X;process.
170 (free_sym_cache, clear_symbol_cache): New.
171 (look_up_one_symbol): Adjust to per-process symbol cache. *
172 * server.c (cont_thread, general_thread, step_thread): Change type
175 (multi_process): New.
176 (last_ptid): Change type to ptid_t.
177 (struct vstop_notif) <ptid>: Change type to ptid_t.
178 (queue_stop_reply, push_event): Change `ptid' argument's type to
180 (discard_queued_stop_replies): Add `pid' argument.
181 (start_inferior): Adjust to use ptids. Adjust to mywait interface
182 changes. Don't reference the `attached' global.
183 (attach_inferior): Adjust to mywait interface changes.
184 (handle_query): Adjust to use ptids. Parse GDB's qSupported
185 features. Handle and report "multiprocess+". Handle
187 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
189 (handle_v_kill): New.
190 (handle_v_stopped): Adjust to use target_pid_to_str.
191 (handle_v_requests): Allow multiple attaches and runs when
192 multiprocess extensions are in effect. Handle "vKill".
193 (myresume): Adjust to use ptids.
194 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
195 (handle_status): Adjust to discard_queued_stop_replies interface
197 (first_thread_of, kill_inferior_callback)
198 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
199 (main): Call initialize_inferiors. Adjust to use ptids, killing
200 and detaching from all inferiors. Handle multiprocess packet
202 * linux-low.h: Include gdb_proc_service.h.
203 (struct process_info_private): New.
204 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
205 <lwpid_of>: Use ptid_get_lwp.
206 (get_lwp_thread): Adjust.
207 (struct lwp_info): Add `dead' member.
208 (find_lwp_pid): Declare.
209 * linux-low.c (thread_db_active): Delete.
210 (new_inferior): Adjust comment.
211 (inferior_pid): Delete.
212 (linux_add_process): New.
213 (handle_extended_wait): Adjust.
214 (add_lwp): Change unsigned long to ptid.
215 (linux_create_inferior): Add process to processes table. Adjust
216 to use ptids. Don't set new_inferior here.
217 (linux_attach_lwp): Rename to ...
218 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
219 it. Adjust to use ptids.
220 (linux_attach_lwp): New.
221 (linux_attach): Add process to processes table. Don't set
223 (struct counter): New.
224 (second_thread_of_pid_p, last_thread_of_process_p): New.
225 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
227 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
228 processes. Remove process from process table.
229 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
230 to multiple processes.
231 (any_thread_of): New.
232 (linux_detach): Add `pid' argument, and handle it. Remove process
233 from processes table.
234 (linux_join): Add `pid' argument. Handle it.
235 (linux_thread_alive): Change unsighed long argument to ptid_t.
236 Consider dead lwps as not being alive.
237 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
238 threads we're not interested in.
239 (same_lwp, find_lwp_pid): New.
240 (linux_wait_for_lwp): Change `pid' argument's type from int to
242 (linux_wait_for_event): Rename to ...
243 (linux_wait_for_event_1): ... this. Change `pid' argument's type
244 from int to ptid_t. Adjust.
245 (linux_wait_for_event): New.
246 (linux_wait_1): Add `ptid' argument. Change return type to
247 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
248 that exit from the process table.
249 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
251 (mark_lwp_dead): New.
252 (wait_for_sigstop): Adjust to use ptids. If a process exits while
253 stopping all threads, mark its main lwp as dead.
254 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
256 (fetch_register, usr_store_inferior_registers)
257 (regsets_fetch_inferior_registers)
258 (regsets_store_inferior_registers, linux_read_memory)
259 (linux_write_memory): Inline `inferior_pid'.
260 (linux_look_up_symbols): Adjust to use per-process
262 (linux_request_interrupt): Adjust to use ptids.
263 (linux_read_auxv): Inline `inferior_pid'.
264 (initialize_low): Don't reference thread_db_active.
265 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
266 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
267 (ps_getpid): Return the pid of the current inferior.
268 * thread-db.c (proc_handle, thread_agent): Delete.
269 (thread_db_create_event, thread_db_enable_reporting): Adjust to
271 (find_one_thread): Change argument type to ptid_t. Adjust to
273 (maybe_attach_thread): Adjust to per-process data and ptids.
274 (thread_db_find_new_threads): Ditto.
275 (thread_db_init): Ditto.
276 * spu-low.c (spu_create_inferior, spu_attach): Add process to
277 processes table. Adjust to use ptids.
278 (spu_kill, spu_detach): Adjust interface. Remove process from
280 (spu_join, spu_thread_alive): Adjust interface.
281 (spu_wait): Adjust interface. Remove process from processes
282 table. Adjust to use ptids.
283 * win32-low.c (current_inferior_tid): Delete.
284 (current_inferior_ptid): New.
285 (debug_event_ptid): New.
286 (thread_rec): Take a ptid. Adjust.
287 (child_add_thread): Add `pid' argument. Adjust to use ptids.
288 (child_delete_thread): Ditto.
289 (do_initial_child_stuff): Add `attached' argument. Add process to
291 (child_fetch_inferior_registers, child_store_inferior_registers):
293 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
294 (win32_attach): Pass 1 to do_initial_child_stuff.
295 (win32_kill): Adjust interface. Remove process from processes
297 (win32_detach): Ditto.
298 (win32_join): Adjust interface.
299 (win32_thread_alive): Take a ptid.
300 (win32_resume): Adjust to use ptids.
301 (get_child_debug_event): Ditto.
302 (win32_wait): Adjust interface. Remove exiting process from
305 2009-04-01 Pedro Alves <pedro@codesourcery.com>
307 Non-stop mode support.
309 * server.h (non_stop): Declare.
310 (gdb_client_data, handler_func): Declare.
311 (delete_file_handler, add_file_handler, start_event_loop):
313 (handle_serial_event, handle_target_event, push_event)
314 (putpkt_notif): Declare.
315 * target.h (enum resume_kind): New.
316 (struct thread_resume): Replace `step' field by `kind' field.
317 (TARGET_WNOHANG): Define.
318 (struct target_ops) <wait>: Add `options' argument.
319 <supports_non_stop, async, start_non_stop>: New fields.
320 (target_supports_non_stop, target_async): New.
321 (start_non_stop): Declare.
322 (mywait): Add `options' argument.
323 * target.c (mywait): Add `options' argument. Print child exit
325 (start_non_stop): New.
326 * server.c (non_stop, own_buf, mem_buf): New globals.
327 (struct vstop_notif): New.
328 (notif_queue): New global.
329 (queue_stop_reply, push_event, discard_queued_stop_replies)
330 (send_next_stop_reply): New.
331 (start_inferior): Adjust to use resume_kind. Adjust to mywait
333 (attach_inferior): In non-stop mode, don't wait for the target
335 (handle_general_set): Handle QNonStop.
336 (handle_query): When handling qC, return the current general
337 thread, instead of the first thread of the list.
338 (handle_query): If the backend supports non-stop mode, include
339 QNonStop+ in the qSupported query response.
340 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
342 (handle_v_attach, handle_v_run): Handle non-stop mode.
343 (handle_v_stopped): New.
344 (handle_v_requests): Report support for vCont;t. Handle vStopped.
345 (myresume): Adjust to use resume_kind. Handle non-stop.
346 (queue_stop_reply_callback): New.
347 (handle_status): Handle non-stop mode.
348 (main): Clear non_stop flag on reconnection. Use the event-loop.
349 Refactor serial protocol handling from here ...
350 (process_serial_event): ... to this new function. When GDB
351 selects any thread, select one here. In non-stop mode, wait until
352 GDB acks all pending events before exiting.
353 (handle_serial_event, handle_target_event): New.
354 * remote-utils.c (remote_open): Install remote_desc in the event
356 (remote_close): Remove remote_desc from the event loop.
357 (putpkt_binary): Rename to...
358 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
359 (putpkt_binary): New as wrapper around putpkt_binary_1.
361 (prepare_resume_reply): In non-stop mode, don't change the
364 * Makefile.in (OBJ): Add event-loop.o.
365 (event-loop.o): New rule.
367 * linux-low.h (pid_of): Moved here.
369 (get_lwp_thread): Use lwpid_of.
370 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
371 * linux-low.c (pid_of): Delete.
372 (inferior_pid): Use lwpid_of.
373 (linux_event_pipe): New.
374 (target_is_async_p): New.
376 (handle_extended_wait): Use lwpid_of.
377 (add_lwp): Don't set lwpid field.
378 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
379 (linux_kill_one_lwp): If killing a running lwp, stop it first.
380 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
381 (linux_detach_one_lwp): If detaching from a running lwp, stop it
382 first. Adjust to linux_wait_for_event interface changes. Use
384 (linux_detach): Don't delete the main lwp here.
385 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
386 (status_pending_p): Don't consider explicitly suspended lwps.
387 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
388 pointer. Add OPTIONS argument. Change return type to int. Use
389 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
390 (linux_wait_for_event): Take an integer pid instead of a lwp_info
391 pointer. Add status pointer argument. Return a pid instead of a
392 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
393 changes. In non-stop mode, don't switch to a random thread.
394 (linux_wait): Rename to...
395 (linux_wait_1): ... this. Add target_options argument, and handle
396 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
397 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
398 clean exit and signal exit code. Don't stop all threads in
399 non-stop mode. In all-stop mode, only stop all threads when
400 reporting a stop to GDB. Handle explicit thread stop requests.
401 (async_file_flush, async_file_mark): New.
403 (send_sigstop): Use lwpid_of.
404 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
405 interface changes. In non-stop mode, don't switch to a random
407 (linux_resume_one_lwp): Use lwpid_of.
408 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
409 (linux_resume_one_thread): ... this. Handle resume_stop. In
410 non-stop mode, don't look for pending flag in all threads.
411 (resume_status_pending_p): Don't consider explicitly suspended
413 (my_waitpid): Reimplement. Emulate __WALL.
414 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
416 (sigchld_handler, linux_supports_non_stop, linux_async)
417 (linux_start_non_stop): New.
418 (linux_target_ops): Register linux_supports_non_stop, linux_async
419 and linux_start_non_stop.
420 (initialize_low): Install SIGCHLD handler.
421 * thread-db.c (thread_db_create_event, find_one_thread)
422 (thread_db_get_tls_address): Use lwpid_of.
423 * win32-low.c (win32_detach): Adjust to use resume_kind.
424 (win32_wait): Add `options' argument.
425 * spu-low.c (spu_resume): Adjust to use resume_kind.
426 (spu_wait): Add `options' argument.
428 2009-04-01 Pedro Alves <pedro@codesourcery.com>
430 Decouple target code from remote protocol.
432 * target.h (enum target_waitkind): New.
433 (struct target_waitstatus): New.
434 (struct target_ops) <wait>: Return an unsigned long. Take a
435 target_waitstatus pointer instead of a char pointer.
437 * target.c (mywait): Change prototype to return an unsigned long.
438 Take a target_waitstatus pointer instead of a char pointer. Adjust.
439 * server.h (thread_from_wait, old_thread_from_wait): Delete
441 (prepare_resume_reply): Change prototype to take a
443 * server.c (thread_from_wait, old_thread_from_wait): Delete.
444 (last_status, last_ptid): New.
445 (start_inferior): Remove "statusptr" argument. Adjust. Return a
446 pid instead of a signal.
447 (attach_inferior): Remove "status" and "signal" parameters.
449 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
451 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
452 (handle_v_requests, myresume): Remove "status" and "signal"
454 (handle_status): New.
455 (main): Delete local `status'. Adjust.
456 * remote-utils.c: Include target.h.
457 (prepare_resume_reply): Change prototype to take a
458 target_waitstatus. Adjust.
460 * linux-low.c (linux_wait): Adjust to new target_ops->wait
462 * spu-low.c (spu_wait): Adjust.
463 * win32-low.c (enum target_waitkind, struct target_waitstatus):
465 (win32_wait): Adjust.
467 2009-04-01 Pedro Alves <pedro@codesourcery.com>
469 * target.h (struct thread_resume): Delete leave_stopped member.
470 (struct target_ops): Add a `n' argument to the `resume' callback.
471 * server.c (start_inferior): Adjust.
472 (handle_v_cont, myresume): Adjust.
473 * linux-low.c (check_removed_breakpoint): Adjust to resume
474 interface change, and to removed leave_stopped field.
475 (resume_ptr): Delete.
476 (struct thread_resume_array): New.
477 (linux_set_resume_request): Add new `arg' parameter. Adjust to
478 resume interface change.
479 (linux_continue_one_thread, linux_queue_one_thread)
480 (resume_status_pending_p): Check if the resume field is NULL
481 instead of checking the leave_stopped member.
482 (linux_resume): Adjust to the target resume interface change.
483 * spu-low.c (spu_resume): Adjust to the target resume interface
485 * win32-low.c (win32_detach, win32_resume): Ditto.
487 2009-04-01 Pedro Alves <pedro@codesourcery.com>
489 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
491 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
493 (linux_continue_one_thread): Only preserve the stepping flag if
494 there's a pending breakpoint.
496 2009-03-31 Pedro Alves <pedro@codesourcery.com>
498 * server.c (main): After the inferior having exited, call
499 remote_close before exiting gdbserver.
501 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
503 Fix size of FPSCR in Power 7 processors.
504 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
505 (PPC_FEATURE_HAS_DFP): New #define.
506 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
509 2009-03-23 Pedro Alves <pedro@codesourcery.com>
511 * server.c (handle_query) Whitespace and formatting.
513 2009-03-22 Pedro Alves <pedro@codesourcery.com>
515 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
516 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
517 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
518 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
519 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
520 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
521 Makefile.in, configure.ac: Fix whitespace throughout.
522 * configure: Regenerate.
524 2009-03-22 Pedro Alves <pedro@codesourcery.com>
526 * inferiors.c (find_inferior): Make it safe for the callback
527 function to delete the currently iterated inferior.
529 2009-03-22 Pedro Alves <pedro@codesourcery.com>
531 * Makefile.in (linuw_low_h): Move higher.
532 (thread-db.o): Depend on $(linux_low_h).
534 2009-03-17 Pedro Alves <pedro@codesourcery.com>
536 Rename "process" to "lwp" throughout.
538 * linux-low.c (all_processes): Rename to...
539 (all_lwps): ... this.
540 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
541 (add_process): Rename to ...
542 (add_lwp): ... this. Adjust.
543 (linux_create_inferior): Adjust.
544 (linux_attach_lwp): Adjust.
545 (linux_attach): Adjust.
546 (linux_kill_one_process): Rename to ...
547 (linux_kill_one_lwp): ... this. Adjust.
548 (linux_kill): Adjust.
549 (linux_detach_one_process): Rename to ...
550 (linux_detach_one_lwp): ... this. Adjust.
551 (linux_detach): Adjust.
552 (check_removed_breakpoint): Adjust.
553 (status_pending_p): Adjust.
554 (linux_wait_for_process): Rename to ...
555 (linux_wait_for_lwp): ... this. Adjust.
556 (linux_wait_for_event): Adjust.
557 (send_sigstop): Adjust.
558 (wait_for_sigstop): Adjust.
559 (stop_all_processes): Rename to ...
560 (stop_all_lwps): ... this.
561 (linux_resume_one_process): Rename to ...
562 (linux_resume_one_lwp): ... this. Adjust.
563 (linux_set_resume_request, linux_continue_one_thread)
564 (linux_queue_one_thread, resume_status_pending_p)
565 (usr_store_inferior_registers, regsets_store_inferior_registers)
566 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
568 * linux-low.h (get_process): Rename to ...
569 (get_lwp): ... this. Adjust.
570 (get_thread_process): Rename to ...
571 (get_thread_lwp): ... this. Adjust.
572 (get_process_thread): Rename to ...
573 (get_lwp_thread): ... this. Adjust.
574 (struct process_info): Rename to ...
575 (struct lwp_info): ... this.
576 (all_processes): Rename to ...
577 (all_lwps): ... this.
578 * proc-service.c (ps_lgetregs): Adjust.
579 * thread-db.c (thread_db_create_event, find_one_thread)
580 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
582 2009-03-14 Pedro Alves <pedro@codesourcery.com>
584 * server.c (handle_query): Handle "qAttached".
586 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
588 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
589 GPLv3, update license URL.
591 2009-03-01 Doug Evans <dje@google.com>
593 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
594 (server_h): Add gdb_signals.h.
596 * server.h (target_signal_from_host,target_signal_to_host_p)
597 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
599 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
601 * remote-utils.c (getpkt): Also generate remote-debug
602 information if noack_mode is set.
604 2009-02-06 Pedro Alves <pedro@codesourcery.com>
606 * server.c (handle_query): Report qXfer:siginfo:read and
607 qXfer:siginfo:write as supported and handle them.
608 * target.h (struct target_ops) <qxfer_siginfo>: New field.
609 * linux-low.c (linux_xfer_siginfo): New.
610 (linux_target_ops): Set it.
612 2009-01-26 Pedro Alves <pedro@codesourcery.com>
614 * server.c (gdbserver_usage): Mention --remote-debug.
615 (main): Accept '--remote-debug' switch.
617 2009-01-18 Doug Evans <dje@google.com>
619 * regcache.c (new_register_cache): No need to check result of xcalloc.
620 * server.c (handle_search_memory): Back out calls to xmalloc,
621 result is checked and error is returned to user upon failure.
622 (handle_query): Ditto. Add more checks for result of malloc.
623 (handle_v_cont): Check result of malloc, report error back to
625 (handle_v_run): Ditto. Call freeargv.
626 * server.h (freeargv): Declare.
627 * utils.c (freeargv): New fn.
629 2009-01-15 Doug Evans <dje@google.com>
631 * gdbreplay.c (perror_with_name): Make arg const char *.
632 * server.h (target_signal_to_name): Make return type const char *.
633 * thread-db.c (thread_db_err_str): Make return type const char *.
634 * utils.c (perror_with_name): Make arg const char *.
636 2009-01-14 Pedro Alves <pedro@codesourcery.com>
638 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
639 when handling a EXIT_PROCESS_DEBUG_EVENT.
641 2009-01-06 Joel Brobecker <brobecker@adacore.com>
643 * gdbreplay.c (gdbreplay_version): Update copyright year.
644 * server.c (gdbserver_version): Likewise.
646 2009-01-05 Doug Evans <dje@google.com>
648 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
649 (handle_extended_wait): Improve comment.
651 2008-12-13 Doug Evans <dje@google.com>
653 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
654 * server.h (ATTR_MALLOC): New macro.
655 (xmalloc,xcalloc,xstrdup): Declare.
656 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
657 * inferiors.c: Ditto.
658 * linux-low.c: Ditto.
659 * mem-break.c: Ditto.
661 * remote-utils.c: Ditto.
664 * win32-low.c: Ditto.
666 2008-12-12 Doug Evans <dje@google.com>
668 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
671 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
673 2008-12-09 Doug Evans <dje@google.com>
675 * linux-low.h (struct process_info): Delete member tid, unused.
676 * thread-db.c (find_one_thread): Update.
677 (maybe_attach_thread): Update.
679 2008-12-02 Pedro Alves <pedro@codesourcery.com>
681 * target.h (struct target_ops): Add qxfer_osdata member.
682 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
684 (linux_qxfer_osdata): New functions.
685 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
687 * server.c (handle_query): Handle "qXfer:osdata:read:".
688 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
689 (buffer_xml_printf): New functions.
690 * server.h (struct buffer): New.
691 (buffer_grow_str, buffer_grow_str0): New macros.
692 (buffer_grow, buffer_free, buffer_init, buffer_finish)
693 (buffer_xml_printf): Declare.
695 2008-11-24 Doug Evans <dje@google.com>
697 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
699 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
701 * server.c (handle_v_run): Always use the supplied argument list.
703 2008-11-19 Bob Wilson <bob.wilson@acm.org>
705 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
706 (xtensa_regmap_table): Add entry for scompare1.
708 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
710 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
711 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
712 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
713 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
714 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
715 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
716 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
717 XML target descriptions.
718 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
719 when inferior is running on an ISA 2.05 or later processor. Add
720 special case to return offset for full 64-bit slot of FPSCR when
723 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
725 * Makefile.in (SFILES, clean): Added sparc64 files.
726 (reg-sparc64.o, reg-sparc64.c): New.
727 * configure.srv (sparc*-*-linux*): New configuration.
728 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
729 syscall arguments for SPARC.
730 (regsets_store_inferior_registers): Likewise.
731 * linux-sparc-low.c: New file.
733 2008-10-21 Doug Evans <dje@google.com>
735 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
736 (READLINE_DIR,READLINE_DEP): Delete.
737 (INTERNAL_CFLAGS): Update.
740 2008-10-10 Pedro Alves <pedro@codesourcery.com>
742 * server.c (handle_v_run): If GDB didn't specify an argv, use the
743 whole argv from the last run, not just argv[0].
745 2008-09-08 Pedro Alves <pedro@codesourcery.com>
747 * regcache.c (new_register_cache): Return NULL if the register
748 cache size isn't known yet.
749 (free_register_cache): Avoid dereferencing a NULL regcache.
751 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
753 * configure.srv: Merge MIPS and MIPS64.
755 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
757 * Makefile.in (uninstall): Apply $(EXEEXT) too.
759 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
761 * Makefile.in: Add required vsx dependencies.
763 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
764 Declare init_registers_powerpc_vsx32l.
765 Declare init_registers_powerpc_vsx64l.
766 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
767 (ppc_arch_setup): Check for VSX in hwcap.
768 (ppc_fill_vsxregset): New function.
769 (ppc_store_vsxregset): New function.
770 Add new VSX entry in regset_info target_regsets.
772 * configure.srv: Add new VSX dependencies.
774 2008-08-12 Pedro Alves <pedro@codesourcery.com>
776 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
777 (remote_open): Set or clear transport_is_reliable.
778 (putpkt_binary): Don't expect acks in noack mode.
779 (getpkt): Don't send ack/nac in noack mode.
780 * server.c (handle_general_set): Handle QStartNoAckMode.
781 (handle_query): If connected by tcp pass QStartNoAckMode+ in
783 (main): Reset noack_mode on every connection.
784 * server.h (noack_mode): Declare.
786 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
788 * Makefile.in (GDBREPLAY_OBS): New variable.
789 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
791 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
792 Daniel Jacobowitz <dan@codesourcery.com>
794 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
795 (usr_store_inferior_registers): Likewise.
796 (regsets_store_inferior_registers): Likewise.
798 2008-07-31 Rolf Jansen <rj@surtec.com>
799 Pedro Alves <pedro@codesourcery.com>
801 * configure.ac: Check for memmem declaration.
802 * server.c [HAVE_MALLOC_H]: Include malloc.h.
803 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
804 (disable_packet_qfThreadInfo): Unconditionally compile.
805 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
806 * configure, config.in: Regenerate.
808 2008-07-28 Doug Kwan <dougkwan@google.com>
810 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
811 (linux_write_memory): Remove declaration of errno.
813 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
815 * linux-low.c (handle_extended_wait): Do not use "status"
816 variable uninitialized.
818 2008-07-07 Pedro Alves <pedro@codesourcery.com>
820 * server.c (handle_v_attach): Inhibit reporting dll changes.
822 2008-06-27 Pedro Alves <pedro@codesourcery.com>
824 * remote-utils.c (prepare_resume_reply): If requested, don't
825 output "thread:TID" in the T stop reply.
827 * server.c (disable_packet_vCont, disable_packet_Tthread)
828 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
829 (handle_query): If requested, disable support for qC, qfThreadInfo
831 (handle_v_requests): If requested, disable support for vCont.
832 (gdbserver_show_disableable): New.
833 (main): Handle --disable-packet and --disable-packet=LIST.
835 * server.h (disable_packet_vCont, disable_packet_Tthread)
836 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
838 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
840 * server.c (gdbserver_usage): Mention --version.
842 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
844 * Makefile.in (gdbreplay.o): New rule.
846 2008-06-06 Joseph Myers <joseph@codesourcery.com>
848 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
849 message, not gdbserver.
851 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
852 Nathan Sidwell <nathan@codesourcery.com>
853 Joseph Myers <joseph@codesourcery.com>
855 * acinclude.m4: Include ../../config/acx.m4.
856 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
857 * configure, config.in: Regenerate.
858 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
859 * server.c (gdbserver_version): Print PKGVERSION.
860 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
861 (main): Adjust gdbserver_usage calls.
862 * gdbreplay.c (version, host_name): Add declarations.
863 (gdbreplay_version, gdbreplay_usage): New.
864 (main): Accept --version and --help options.
866 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
868 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
869 (arm_breakpoint_at): Handle Thumb.
870 (the_low_target): Add comment.
872 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
874 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
876 2008-05-09 Doug Evans <dje@google.com>
878 * server.h (decode_search_memory_packet): Declare.
879 * remote-utils.c (decode_search_memory_packet): New fn.
880 * server.c (handle_search_memory_1): New fn.
881 (handle_search_memory): New fn.
882 (handle_query): Process qSearch:memory packets.
884 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
886 * regcache.c (registers_length): Remove.
887 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
888 full register packet.
889 * regcache.h (registers_length): Remove prototype.
890 * server.h (PBUFSIZ): Define to 16384.
892 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
894 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
895 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
896 powerpc-64l.o, and powerpc-altivec64l.o.
897 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
898 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
899 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
900 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
901 rs6000/power-linux.xml, and rs6000/power64-linux.xml
904 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
905 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
906 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
907 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
908 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
909 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
910 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
911 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
912 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
913 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
916 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
917 (init_registers_powerpc_32l): ... this new prototype.
918 (init_registers_powerpc_32): Remove, replace by ...
919 (init_registers_powerpc_altivec32l): ... this new prototype.
920 (init_registers_powerpc_e500): Remove, replace by ...
921 (init_registers_powerpc_e500l): ... this new prototype.
922 (init_registers_ppc64): Remove, replace by ...
923 (init_registers_powerpc_64l): ... this new prototype.
924 (init_registers_powerpc_64): Remove, replace by ...
925 (init_registers_powerpc_altivec64l): ... this new prototype.
926 (ppc_num_regs): Set to 73.
927 (PT_ORIG_R3, PT_TRAP): Define if necessary.
928 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
929 (ppc_cannot_store_register): Handle orig_r3 and trap.
930 (ppc_arch_setup): Update init_registers_... calls.
931 (ppc_fill_gregset): Handle orig_r3 and trap.
933 * inferiors.c (clear_inferiors): Reset current_inferior.
935 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
937 * acinclude.m4: Add override.m4.
938 * configure: Regenerate.
940 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
942 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
943 initial call to init_register_ppc64.
945 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
947 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
948 powerpc*-*-linux* case.
949 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
951 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
953 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
954 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
956 * linux-ppc-low.c: Include <elf.h>.
957 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
958 (ppc_hwcap): New global variable.
959 (ppc_regmap): Remove __SPE__ #ifdef sections.
960 (ppc_regmap_e500): New global variable.
961 (ppc_cannot_store_register): Update __SPE__ special case.
962 (ppc_get_hwcap): New function.
963 (ppc_arch_setup): Use it to determine whether inferior supports
964 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
965 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
966 Do not access registers if target does not support AltiVec.
967 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
968 Do not access registers if target does not support SPE.
969 (target_regsets): Unconditionally include AltiVec and SPE regsets.
971 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
973 * linux-low.c (disabled_regsets, num_regsets): New.
974 (use_regsets_p): Delete.
975 (linux_wait_for_process): Clear disabled_regsets.
976 (regsets_fetch_inferior_registers): Check and set it.
977 (regsets_store_inferior_registers): Likewise.
978 (linux_fetch_registers, linux_store_registers): Do not use
980 (initialize_low): Allocate disabled_regsets.
982 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
984 * Makefile.in (LIBOBJS): New.
986 (memmem.o): New rule.
987 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
988 * configure: Regenerated.
990 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
992 * server.c (handle_query): Never return "unsupported" for
993 qXfer:features:read queries.
995 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
997 * server.c (get_features_xml): Fix inverted condition.
998 (handle_query): Always support qXfer:feature:read.
1000 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1002 * server.c (wrapper_argv): New.
1003 (start_inferior): Handle wrapper_argv. If set, expect an extra
1005 (gdbserver_usage): Document --wrapper.
1006 (main): Parse --wrapper.
1008 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1010 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1011 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1012 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1013 (ppc_set_pc): Likewise.
1014 (ppc_arch_setup): New function.
1015 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1016 of collect_register.
1017 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1019 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1021 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1022 instead of linux-ppc64-low.o.
1023 * linux-ppc64-low.c: Remove file.
1024 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1025 (linux-ppc64-low.o): Remove rule.
1027 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1028 (init_registers_powerpc_64): Likewise.
1029 (ppc_regmap): Conditionally define depending on __powerpc64__.
1030 (ppc_cannot_store_register): Do not special-case "fpscr" when
1031 compiled on __powerpc64__.
1032 (ppc_collect_ptrace_register): New function.
1033 (ppc_supply_ptrace_register): New function.
1034 (ppc_breakpoint): Change type to "unsigned int".
1035 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1036 (the_low_target): Conditionally provide initializers for the
1037 arch_setup member depending on __powerpc64__. Install
1038 collect_ptrace_register and supply_ptrace_register members.
1040 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1042 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1043 * server.c (gdbserver_xmltarget): Define.
1044 (get_features_xml): Use it to replace "target.xml" and arch_string.
1046 * configure.srv: Remove srv_xmltarget. Add XML files that were
1047 mentioned there to srv_xmlfiles instead. Remove conditional tests
1048 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1049 srv_xmlfiles and srv_regobj to include all possible choices.
1050 * configure.ac (srv_xmltarget): Remove.
1051 (srv_xmlfiles): Do not add "target.xml".
1052 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1053 checks for supplementary target information.
1054 * configure: Regenerate.
1055 * Makefile.in (XML_TARGET): Remove.
1056 (target.xml): Remove rule.
1057 (clean): Do not clean up target.xml.
1058 (.PRECIOUS): Do not mention target.xml.
1060 * target.h (struct target_ops): Remove arch_string member.
1061 * linux-low.c (linux_arch_string): Remove.
1062 (linux_target_ops): Remove arch_string initializer.
1063 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1064 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1065 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1066 * spu-low.c (spu_arch_string): Remove.
1067 (spu_target_ops): Remove arch_string initializer.
1068 * win32-low.c (win32_arch_string): Remove.
1069 (win32_target_ops): Remove arch_string initializer.
1070 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1071 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1072 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1074 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1076 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1077 by collect_ptrace_register and supply_ptrace_register hooks.
1078 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1079 instead of checking for the_low_target.left_pad_xfer.
1080 (usr_store_inferior_registers): Use collect_ptrace_register callback
1081 instead of checking for the_low_target.left_pad_xfer.
1083 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1084 (s390_supply_ptrace_register): Likewise.
1085 (s390_fill_gregset): Call s390_collect_ptrace_register.
1086 (the_low_target): Update.
1088 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1089 (ppc_supply_ptrace_register): Likewise.
1090 (the_low_target): Update.
1092 * linux-i386-low.c (the_low_target): Update.
1093 * linux-x86-64-low.c (the_low_target): Update.
1095 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1097 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1098 reg-s390.o and reg-s390x.o.
1100 * linux-low.c (new_inferior): New global variable.
1101 (linux_create_inferior, linux_attach): Set it.
1102 (linux_wait_for_process): Call the_low_target.arch_setup after the
1103 target has stopped for the first time.
1104 (initialize_low): Do not call the_low_target.arch_setup.
1106 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1107 (s390_set_pc): Likewise.
1108 (s390_arch_setup): New function.
1109 (the_low_target): Use s390_arch_setup as arch_setup routine.
1111 * regcache.c (realloc_register_cache): New function.
1112 (set_register_cache): Call it for each existing regcache.
1114 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1116 * server.h (init_registers): Remove prototype.
1118 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1119 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1120 instead of init_registers ().
1121 * linux-arm-low.c (init_registers_arm): Add prototype.
1122 (init_registers_arm_with_iwmmxt): Likewise.
1123 (the_low_target): Add initializer for arch_setup field.
1124 * linux-cris-low.c (init_registers_cris): Add prototype.
1125 (the_low_target): Add initializer for arch_setup field.
1126 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1127 (the_low_target): Add initializer for arch_setup field.
1128 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1129 (the_low_target): Add initializer for arch_setup field.
1130 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1131 (the_low_target): Add initializer for arch_setup field.
1132 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1133 (the_low_target): Add initializer for arch_setup field.
1134 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1135 (the_low_target): Add initializer for arch_setup field.
1136 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1137 (init_registers_mips64_linux): Likewise.
1138 (the_low_target): Add initializer for arch_setup field.
1139 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1140 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1141 (the_low_target): Add initializer for arch_setup field.
1142 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1143 (init_registers_powerpc_64): Likewise.
1144 (the_low_target): Add initializer for arch_setup field.
1145 * linux-s390-low.c (init_registers_s390): Add prototype.
1146 (init_registers_s390x): Likewise.
1147 (the_low_target): Add initializer for arch_setup field.
1148 * linux-sh-low.c (init_registers_sh): Add prototype.
1149 (the_low_target): Add initializer for arch_setup field.
1150 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1151 (the_low_target): Add initializer for arch_setup field.
1152 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1153 (the_low_target): Add initializer for arch_setup field.
1155 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1156 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1157 instead of init_registers ().
1158 * win32-arm-low.c (init_registers_arm): Add prototype.
1159 (the_low_target): Add initializer for arch_setup field.
1160 * win32-i386-low.c (init_registers_i386): Add prototype.
1161 (the_low_target): Add initializer for arch_setup field.
1163 * spu-low.c (init_registers_spu): Add prototype.
1164 (initialize_low): Call initialie_registers_spu () instead of
1165 initialize_registers ().
1167 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1169 * server.c (handle_v_requests): When handling the vRun and vAttach
1170 packets, if already debugging a process, don't kill it. Return an
1173 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1175 * server.c (handle_query): Correct length check.
1177 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1179 * win32-low.c (do_initial_child_stuff): Add process handle
1180 parameter. Set current_process_handle and current_process_id from the
1181 parameters. Clear globals.
1182 (win32_create_inferior): Don't set current_process_handle and
1183 current_process_id here. Instead pass them on the call to
1184 do_initial_child_stuff.
1185 (win32_attach): Likewise.
1186 (win32_clear_inferiors): New.
1187 (win32_kill): Don't close the current process handle or the
1188 current thread handle here. Instead call win32_clear_inferiors.
1189 (win32_detach): Don't open a new handle to the process. Call
1190 win32_clear_inferiors.
1191 (win32_join): Don't rely on current_process_handle; open a new
1192 handle using the process id.
1193 (win32_wait): Call win32_clear_inferiors when the inferior process
1196 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1198 * server.c (monitor_show_help): Add "exit".
1200 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1202 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1203 (clean): Add reg-xtensa.c.
1204 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1205 * configure.srv (xtensa*-*-linux*) New target.
1206 * linux-xtensa-low.c: New.
1207 * xtensa-xtregs.c: New.
1209 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1211 * hostio.c: Don't include errno.h.
1212 (errno_to_fileio_errno): Move to hostio-errno.
1213 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1214 error number outputting to the target->hostio_last_error callback.
1215 (hostio_packet_error): Use FILEIO_EINVAL directly.
1216 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1217 calls to hostio_error.
1218 * hostio-errno.c: New.
1219 * server.h (hostio_last_error_from_errno): Declare.
1220 * target.h (target_ops): Add hostio_last_error member.
1221 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1222 as hostio_last_error handler.
1223 * spu-low.c (spu_target_ops): Likewise.
1224 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1225 (wince_hostio_last_error): New functions.
1226 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1227 as hostio_last_error handler.
1228 (win32_target_ops) [!_WIN32_WCE]: Register
1229 hostio_last_error_from_errno as hostio_last_error handler.
1230 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1231 (hostio-errno.o): New rule.
1232 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1233 * configure.srv (srv_hostio_err_objs): New variable. Default to
1235 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1236 * configure: Regenerate.
1238 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1240 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1241 (linux_kill, linux_detach): Clean up the process list.
1242 * remote-utils.c (remote_open): Improve port number parsing.
1243 (putpkt_binary, input_interrupt): Only send interrupts if the target
1245 * server.c (extended_protocol): Make static.
1246 (attached): Define earlier.
1247 (exit_requested, response_needed, program_argv): New variables.
1248 (target_running): New.
1249 (start_inferior): Clear attached here.
1250 (attach_inferior): Set attached here.
1251 (require_running): Define.
1252 (handle_query): Use require_running and target_running. Implement
1254 (handle_v_attach, handle_v_run): New.
1255 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1256 (gdbserver_usage): Update.
1257 (main): Redo argument parsing. Handle --debug and --multi. Handle
1258 --attach along with other options or after the port. Save
1259 program_argv. Support no initial program. Resynchronize
1260 communication with GDB after an error. Handle "monitor exit".
1261 Use require_running and target_running. Always allow the extended
1262 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1263 restart in extended mode.
1264 * README: Refer to the GDB manual. Update --attach usage.
1266 2007-12-20 Andreas Schwab <schwab@suse.de>
1268 * linux-low.c (STACK_SIZE): Define.
1269 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1270 (linux_test_for_tracefork): Likewise.
1272 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1274 * linux-low.c (linux_wait_for_event): Update messages. Do not
1275 reinsert auto-delete breakpoints.
1276 * mem-break.c (struct breakpoint): Change return type of handler to
1278 (set_breakpoint_at): Update handler type.
1279 (reinsert_breakpoint_handler): Return 1 instead of calling
1281 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1283 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1284 * mem-break.h (set_breakpoint_at): Update handler type.
1285 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1286 * win32-low.c (auto_delete_breakpoint): New.
1287 (get_child_debug_event): Use it.
1289 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1291 * configure.ac: Check for pread and pwrite.
1292 * hostio.c (handle_pread): Fall back to lseek and read.
1293 (handle_pwrite): Fall back to lseek and write.
1294 * config.in, configure: Regenerated.
1296 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1298 * server.c (myresume): Add own_buf argument.
1299 (main): Update calls.
1301 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1303 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1304 * remote-utils.c (remote_open): Do not call disable_async_io.
1305 (block_async_io): Delete.
1306 (unblock_async_io): Make static.
1307 (initialize_async_io): New.
1308 * server.c (handle_v_cont): Handle async I/O here.
1309 (myresume): Likewise. Move other common resume tasks here...
1310 (main): ... from here. Call initialize_async_io. Disable async
1311 I/O before the main loop.
1312 * server.h (initialize_async_io): Declare.
1313 (block_async_io, unblock_async_io): Delete prototypes.
1314 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1316 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1318 * remote-utils.c (readchar): Allow binary data in received messages.
1320 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1322 * win32-low.c (attaching): New global.
1323 (win32_create_inferior): Clear the `attaching' global.
1324 (win32_attach): Set the `attaching' global.
1325 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1326 attaching. Only set a breakpoint at the entry point if not
1329 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1331 * server.c (main): Don't report dll events on the initial
1332 connection on attaches.
1334 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1336 * server.c (main): Relax numerical bases supported for the pid of
1337 the --attach command line argument.
1339 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1341 * win32-low.c (win32_attach): Call OpenProcess before
1342 DebugActiveProcess, not after. Add last error output to error
1345 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1347 * win32-low.c (win32_get_thread_context)
1348 (win32_set_thread_context): New functions.
1349 (thread_rec): Use win32_get_thread_context.
1350 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1351 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1354 2007-12-03 Leo Zayas
1355 Pedro Alves <pedro_alves@portugalmail.pt>
1357 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1359 (child_add_thread): Minor cleanup.
1360 (child_continue): Resume artificially suspended threads before
1361 calling ContinueDebugEvent.
1362 (suspend_one_thread): New.
1363 (fake_breakpoint_event): New.
1364 (get_child_debug_event): Change return type to int. Check here if
1365 gdb sent an interrupt request. If a soft interrupt was requested,
1366 fake a breakpoint event. Return 0 if there is no event to handle,
1368 (win32_wait): Don't check here if gdb sent an interrupt request.
1369 Ensure there is a valid event to handle.
1370 (win32_request_interrupt): Add soft interruption method as last
1373 2007-12-03 Leo Zayas
1374 Pedro Alves <pedro_alves@portugalmail.pt>
1376 * win32-low.h (win32_thread_info): Add descriptions to the
1377 structure members. Replace `suspend_count' counter by a
1379 * win32-low.c (thread_rec): Update condition of when to get the
1380 context from the inferior. Rely on ContextFlags being set if it
1381 has already been retrieved. Only suspend the inferior thread if
1382 we haven't already. Warn if that fails.
1383 (continue_one_thread): s/suspend_count/suspended/. Only call
1384 ResumeThread once. Warn if that fails.
1386 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1388 * win32-low.c (win32_wait): Don't read from the inferior when it
1391 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1393 * Makefile.in (win32_low_h): New variable.
1394 (win32-low.o): Add dependency on $(win32_low_h).
1395 (win32-arm-low.o, win32-i386-low.o): New rules.
1397 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1399 * hostio.c: Correct copyright year.
1401 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1403 * Makefile.in (OBS): Add hostio.o.
1404 (hostio.o): New rule.
1405 * server.h (handle_vFile): Declare.
1406 * hostio.c: New file.
1407 * server.c (handle_v_requests): Take packet_len and new_packet_len
1408 for binary packets. Call handle_vFile.
1409 (main): Update call to handle_v_requests.
1411 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1413 * linux-low.c: Include <sched.h>.
1415 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1417 * linux-low.c (linux_tracefork_grandchild): New.
1418 (linux_tracefork_child): Use clone.
1419 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1421 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1423 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1425 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1427 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1429 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1431 * inferiors.c (change_inferior_id): Delete.
1432 (add_pid_to_list, pull_pid_from_list): New.
1433 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1434 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1435 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1436 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1437 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1438 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1439 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1440 (using_threads): Always set to 1.
1441 (handle_extended_wait): New.
1442 (add_process): Do not set TID.
1443 (linux_create_inferior): Set must_set_ptrace_flags.
1444 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1445 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1446 (linux_thread_alive): Rename TID argument to LWPID.
1447 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1448 (linux_wait_for_event): Do not use TID or check using_threads. Update
1449 call to dead_thread_notify. Call handle_extended_wait.
1450 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1451 (send_sigstop): Delete sigstop_sent.
1452 (wait_for_sigstop): Avoid TID.
1453 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1454 (linux_test_for_tracefork): New.
1455 (linux_lookup_signals): Use thread_db_active and
1456 linux_supports_tracefork_flag.
1457 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1458 * linux-low.h (get_process_thread): Avoid TID.
1459 (struct process_ifo): Move thread_known and tid to the end. Remove
1461 (linux_attach_lwp, thread_db_init): Update prototypes.
1462 * server.h (change_inferior_id): Delete prototype.
1463 (add_pid_to_list, pull_pid_from_list): New prototypes.
1464 * thread-db.c (thread_db_use_events): New.
1465 (find_first_thread): Rename to...
1466 (find_one_thread): ...this. Update callers and messages. Do not
1467 call fatal. Check thread_db_use_events. Do not call
1468 change_inferior_id or new_thread_notify.
1469 (maybe_attach_thread): Update. Do not call new_thread_notify.
1470 (thread_db_init): Set thread_db_use_events. Check use_events.
1471 * utils.c (fatal, warning): Correct message prefix.
1473 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1475 * Makefile.in (clean): Remove new files.
1476 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1477 (powerpc-64.o, powerpc-64.c): New rules.
1478 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1479 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1481 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1483 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1484 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1485 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1486 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1487 (target_regsets): Add AltiVec and SPE register sets.
1488 * configure.ac: Check for AltiVec and SPE.
1489 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1490 (ppc_fill_vrregset, ppc_store_vrregset): New.
1491 (target_regsets): Add AltiVec register set.
1492 * configure: Regenerated.
1494 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1496 * linux-low.c (O_LARGEFILE): Define.
1497 (linux_read_memory): Use /proc/PID/mem.
1498 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1499 * configure, config.in: Regenerated.
1501 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1503 * linux-low.c (linux_wait_for_event): Do not pass signals while
1506 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1508 * win32-low.c (create_process): New.
1509 (win32_create_inferior): Use create_process instead of
1510 CreateProcess. If create_process failed retry appending an ".exe"
1511 suffix. Store the GetLastError result immediatelly after
1512 create_process calls and use it on the call to error.
1514 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1516 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1518 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1520 * configure.ac: Switch license to GPLv3.
1522 2007-08-01 Michael Snyder <msnyder@access-company.com>
1524 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1526 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1528 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1530 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1531 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1532 CloseToolhelp32Snapshot.
1533 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1534 CloseToolhelp32Snapshot.
1536 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1538 * server.c (main): Check for inferior exit before main loop.
1540 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1542 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1543 instead of on tmp_desc.
1545 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1546 Daniel Jacobowitz <dan@codesourcery.com>
1548 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1549 (add_thread): Minor cleanups.
1550 (clear_inferiors): Move lower in the file. Clear the DLL
1552 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1553 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1554 (xml_escape_text): New.
1555 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1557 (handle_v_cont): Report errors.
1558 (gdbserver_version): Update.
1559 (main): Correct size of own_buf. Do not report initial DLL events.
1560 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1561 (unloaded_dll, xml_escape_text): New.
1562 * win32-low.c (enum target_waitkind): Update comments.
1563 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1564 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1565 (win32_EnumProcessModules, win32_GetModuleInformation)
1566 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1567 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1568 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1569 (win32_Module32First, win32_Module32Next, load_toolhelp)
1570 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1571 (get_child_debug_event): Handle DLL events.
1572 (win32_wait): Likewise.
1574 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1576 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1577 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1579 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1581 * win32-low.c (handle_output_debug_string): Ignore event if not
1584 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1586 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1588 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1590 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1592 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1594 * inferiors.c (change_inferior_id): Add comment.
1595 * linux-low.c (check_removed_breakpoint): Add an early
1596 prototype. Improve debug output.
1597 (linux_attach): Doc update.
1598 (linux_detach_one_process, linux_detach): Clean up before releasing
1600 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1601 * linux-low.h (struct process_info): Doc improvement.
1602 * mem-break.c (delete_all_breakpoints): New.
1603 * mem-break.h (delete_all_breakpoints): New prototype.
1604 * thread-db.c (find_first_thread): New.
1605 (thread_db_create_event): Call it instead of
1606 thread_db_find_new_threads. Clean up unused variables.
1607 (maybe_attach_thread): Remove first thread handling.
1608 (thread_db_find_new_threads): Use find_first_thread.
1609 (thread_db_get_tls_address): Likewise.
1611 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1613 * thread-db.c (thread_db_find_new_threads): Add prototype.
1614 (thread_db_create_event): Check for the main thread before adding
1616 (maybe_attach_thread): Only enable event reporting if TID == 0.
1617 (thread_db_get_tls_address): Check for new threads.
1619 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1621 * linux-low.c (linux_create_inferior): Try execv before execvp.
1622 * spu-low.c (spu_create_inferior): Likewise.
1624 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1626 * linux-low.c (linux_create_inferior): Change execv to execvp.
1627 * spu-low.c (spu_create_inferior): Likewies.
1629 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1631 * Makefile.in (clean): Clean new files instead of deleted ones.
1632 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1633 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1635 * configure.srv: Specify XML files and new regformats for MIPS and
1637 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1638 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1639 an entry for the restart register.
1640 (mips_cannot_fetch_register, mips_cannot_store_register)
1641 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1642 register names to match the XML descriptions.
1643 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1644 restart register instead of $0.
1646 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1647 Markus Deuling <deuling@de.ibm.com>
1649 * remote-utils.c (decode_xfer_write): New function.
1650 * server.h (decode_xfer_write): Add prototype.
1651 * server.c (handle_query): Add PACKET_LEN argument. Support
1652 qXfer:spu:read and qXfer:spu:write packets.
1653 (main): Pass packet_len to handle_query.
1654 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1655 * target.h (target_ops): Add qxfer_spu.
1657 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1659 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1660 accessing non-seekable spufs files.
1662 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1664 * server.c (handle_query): Add reply for qC packet.
1666 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1667 Leo Zayas <lerele@champenstudios@com>
1669 * server.h (check_remote_input_interrupt_request): New function.
1670 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1671 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1672 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1673 (check_remote_input_interrupt_request): New function.
1674 * server.h (check_remote_input_interrupt_request): Declare.
1675 * win32-low.c (winapi_DebugBreakProcess,
1676 winapi_GenerateConsoleCtrlEvent): New typedefs.
1677 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1679 (win32_wait): Check for remote interrupt request
1680 with check_remote_input_interrupt_request.
1681 (win32_request_interrupt): New function.
1682 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1684 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1686 * win32-low.c (debug_registers_changed,
1687 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1688 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1689 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1690 (thread_rec): Get context using the low target.
1691 (child_add_thread): Call thread_added on the low target,
1692 which does the same thing.
1694 (do_initial_child_stuff): Remove debug registers references.
1695 Set context using the low target. Resume threads after
1696 setting the contexts.
1697 (child_continue): Remove dead variable. Remove debug
1698 registers references.
1699 (child_fetch_inferior_registers): Go through the low target.
1700 (do_child_store_inferior_registers): Remove.
1701 (child_store_inferior_registers): Go through the low target.
1702 (win32_resume): Remove debug registers references.
1703 Set context using the low target.
1704 (handle_exception): Change return type to void. Don't record
1705 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1706 first chance exception.
1707 (get_child_debug_event): Change return type to void. Remove
1708 goto loop. Always return after waiting for debug event.
1709 (win32_wait): Convert to switch statement. Handle spurious
1712 * win32-i386-low.c (debug_registers_changed,
1713 debug_registers_used): New.
1714 (initial_stuff): Rename to ...
1715 (i386_initial_stuff): ... this. Clear debug registers
1717 (store_debug_registers): Delete.
1718 (i386_get_thread_context): New.
1719 (load_debug_registers): Delete.
1720 (i386_set_thread_context): New.
1721 (i386_thread_added): New.
1722 (single_step): Rename to ...
1723 (i386_single_step): ... this.
1724 (do_fetch_inferior_registers): Rename to ...
1725 (i386_fetch_inferior_register): ... this.
1726 (i386_store_inferior_register): New.
1727 (the_low_target): Adapt to new interface.
1729 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1730 (arm_get_thread_context): New.
1731 (arm_set_thread_context): New.
1733 (do_fetch_inferior_registers): Rename to ...
1734 (arm_fetch_inferior_register): ... this.
1735 (arm_store_inferior_register): New.
1736 (arm_wince_breakpoint): Reimplement as unsigned long.
1737 (arm_wince_breakpoint_len): Define.
1738 (the_low_target): Adapt to new interface.
1740 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1741 load_debug_registers. Add get_thread_context, set_thread_context,
1742 thread_added and store_inferior_register. Rename
1743 fetch_inferior_registers to fetch_inferior_register.
1744 (regptr): Remove declaration.
1746 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1748 * linux-low.c (linux_detach): Change return type to int. Return 0.
1749 * spu-low.c (spu_detach): Likewise.
1751 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1753 * target.h (target_ops): Change return type of detach to int.
1755 (join_inferior): New.
1756 * server.c (main): Don't skip detach support on mingw32.
1757 If the inferior doesn't support detaching return error.
1758 Call join_inferior instead of using waitpid.
1759 * linux-low.c (linux_join): New.
1760 (linux_target_op): Add linux_join.
1761 * spu-low.c (spu_join): New.
1762 (spu_target_ops): Add spu_join.
1763 * win32-low.c (win32_detach): Adapt to new interface.
1764 Reopen current_process_handle before detaching. Issue a child
1765 resume before detaching.
1767 (win32_target_op): Add win32_join.
1769 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1771 * win32-low.c (win32-attach): Fix return value.
1772 * target.h (target_ops): Describe ATTACH return values.
1774 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1776 * win32-low.c (GETPROCADDRESS): Define.
1777 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1778 (winapi_DebugSetProcessKillOnExit): Likewise.
1779 (win32_create_inferior): Force usage of ansi CreateProcessA.
1780 (win32_attach): Use GETPROCADDRESS.
1781 (win32_detach): Likewise.
1783 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1785 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1787 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1789 * win32-low.c: Commit leftover changes from 2007-03-29.
1791 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1793 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1794 fields short instead of int. Add explicit padding.
1795 (i387_cache_to_fsave): Remove unnecessary casts.
1796 (i387_fsave_to_cache): Doc fix.
1797 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1799 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1801 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1802 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1804 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1806 * configure.srv (arm*-*-mingw32ce*): Move near the other
1809 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1811 * configure.ac: Add errno checking.
1812 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1813 sys/file.h and malloc.h.
1814 (AC_CHECK_DECLS): Add perror.
1815 (srv_mingwce): Handle.
1816 * configure.srv (i[34567]86-*-cygwin*): Add
1817 win32-i386-low.o to srv_tgtobj.
1818 (i[34567]86-*-mingw*): Likewise.
1819 (arm*-*-mingw32ce*): Add case.
1820 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1821 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1822 [__MINGW32CE__] (strerror): New function.
1823 [__MINGW32CE__] (errno): Define to GetLastError.
1824 [__MINGW32CE__] (COUNTOF): New macro.
1825 (remote_open): Remove extra close call.
1826 * mem-break.c (delete_breakpoint_at): New function.
1827 * mem-break.h (delete_breakpoint_at): Declare.
1828 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1829 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1830 [USE_WIN32API] (read, write): Add char* casts.
1831 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1832 * server.h: Include wincecompat.h on Windows CE.
1833 [HAVE_ERRNO_H]: Check.
1834 (perror): Declare if not declared.
1835 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1836 (perror_with_name): Remove errno declaration.
1837 * wincecompat.h: New.
1838 * wincecompat.c: New.
1840 * win32-arm-low.c: New.
1841 * win32-i386-low.c: New.
1842 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1843 (OUTMSG2): Make it safe.
1845 (COUNTOF): New macro.
1846 (NUM_REGS): Get it from the low target.
1847 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1848 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1849 (thread_rec): Let low target handle debug registers.
1850 (child_add_thread): Likewise.
1851 (child_init_thread_list): Likewise.
1852 (continue_one_thread): Likewise.
1854 (do_child_fetch_inferior_registers): Move to ...
1855 * win32-i386-low.c: ... here, and rename to ...
1856 (do_fetch_inferior_registers): ... this.
1857 * win32-low.c (child_fetch_inferior_registers):
1858 Go through the low target.
1859 (do_child_store_inferior_registers): Use regptr.
1860 (strwinerror): New function.
1861 (win32_create_inferior): Handle Windows CE.
1862 Use strwinerror instead of strerror on Windows error
1863 codes. Add program to the error output.
1864 Don't close the main thread handle on Windows CE.
1865 (win32_attach): Use coredll.dll on Windows CE.
1866 (win32_kill): Close current process and current
1868 (win32_detach): Use coredll.dll on Windows CE.
1869 (win32_resume): Let low target handle debug registers, and
1871 (handle_exception): Add/Remove initial breakpoint. Avoid
1872 non-existant WSTOPSIG on Windows CE.
1873 (win32_read_inferior_memory): Cast to remove warning.
1874 (win32_arch_string): Go through the low target.
1875 (initialize_low): Call set_breakpoint_data with the low
1876 target's breakpoint.
1877 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1878 FOP_REGNUM, mappings): Move to ...
1879 * win32-i386-low.c: ... here.
1880 * win32-low.c (win32_thread_info): Move to ...
1881 * win32-low.h: ... here.
1882 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1883 win32-arm-low.c and wincecompat.c.
1884 (all:): Add $EXEEXT.
1885 (install-only:): Likewise.
1886 (gdbserver:): Likewise.
1887 (gdbreplay:): Likewise.
1888 * config.in: Regenerate.
1889 * configure: Regenerate.
1891 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1893 * win32-low.c: Rename typedef thread_info to
1894 win32_thread_info throughout.
1896 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1898 * win32-i386-low.c: Rename to ...
1899 * win32-low.c: ... this.
1900 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1901 * Makefile.in: Likewise.
1903 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1905 * remote-utils.c (monitor_output): Constify msg parameter.
1906 * server.h (monitor_output): Likewise.
1907 * win32-i386-low.c (handle_output_debug_string): New.
1908 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1909 handle_output_debug_string.
1910 (get_child_debug_event): Likewise.
1912 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1914 * server.c (main): Correct strtoul check.
1916 2007-03-27 Jon Ringle <jon@ringle.org>
1918 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1920 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1922 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1924 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1926 * terminal.h: Check HAVE_SGTTY_H.
1928 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1930 * remote-utils.c (remote_open): Print out the assigned port number.
1932 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1934 * remote-utils.c (monitor_output): New function.
1935 * server.c (debug_threads): Define here.
1936 (monitor_show_help): New function.
1937 (handle_query): Handle qRcmd.
1938 (main): Do not handle 'd' packet.
1939 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1940 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1943 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1945 * Makefile.in (EXEEXT): New.
1946 (clean): Use $(EXEEXT).
1948 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1950 * target.h (target_ops): Rename send_signal to request_interrupt,
1951 and remove enum target_signal parameter.
1952 * linux-low.c (linux_request_interrupt): Rename from
1953 linux_send_signal, and always send SIGINT.
1954 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1955 and always send SIGINT.
1956 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1958 (input_interrupt): Likewise.
1960 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1962 * server.c (get_features_xml): Check if target implemented
1964 * win32-i386-low.c (win32_arch_string): New.
1965 (win32_target_ops): Add win32_arch_string as arch_string member.
1967 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1969 * spu-low.c (spu_arch_string): New.
1970 (spu_target_ops): Add spu_arch_string.
1972 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1974 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1975 * configure.ac: Do not check for terminal.h.
1976 * configure, config.in: Regenerated.
1978 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1980 * Makefile.in (OBS): Add $(XML_BUILTIN).
1981 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1983 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1984 (arm-with-iwmmxt.c): New.
1985 * config.in, configure: Regenerate.
1986 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1987 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1988 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1989 (arm*-*-linux*): Add iWMMXt and regset support.
1990 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1991 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1992 (arm_store_wmmxregset, target_regsets): New.
1993 * server.c (get_features_xml): Take annex argument. Check builtin
1995 (handle_query): Handle multiple annexes.
1997 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1999 * remote-utils.c [USE_WIN32API] (read, write): Define.
2000 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2003 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2005 * linux-i386-low.c (the_low_target): Set arch_string.
2006 * linux-x86-64-low.c (the_low_target): Likewise.
2007 * linux-low.c (linux_arch_string): New.
2008 (linux_target_ops): Add it.
2009 * linux-low.h (struct linux_target_ops): Add arch_string.
2010 * server.c (write_qxfer_response): Use const void * for DATA.
2011 (get_features_xml): New.
2012 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2013 * target.h (struct target_ops): Add arch_string method.
2015 2007-01-03 Denis Pilat <denis.pilat@st.com>
2016 Daniel Jacobowitz <dan@codesourcery.com>
2018 * linux-low.c (linux_kill): Handle being called with no threads.
2019 * win32-i386-low.c (win32_kill): Likewise.
2020 (get_child_debug_event): Clear current_process_handle.
2022 2006-12-30 Denis PILAT <denis.pilat@st.com>
2023 Daniel Jacobowitz <dan@codesourcery.com>
2025 * remote-utils.c (remote_open): Check the type of specified
2026 serial port devices before opening them.
2027 * server.c (main): Kill the inferior if an error occurs during
2028 the first remote_open.
2030 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2032 * README: Update supported targets.
2034 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2036 * Makefile.in (clean): Remove reg-mips64.c.
2037 (reg-mips64.c, reg-mips64.o): New rules.
2038 * configure.srv: Handle mips64. Include regset support for mips.
2039 * linux-mips-low.c (union mips_register): New.
2040 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2041 (mips_breakpoint, mips_breakpoint_at): Use int.
2042 (mips_collect_register, mips_supply_register)
2043 (mips_collect_register_32bit, mips_supply_register_32bit)
2044 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2045 (mips_store_fpregset, target_regsets): New.
2046 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2048 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2050 * configure.srv: Add target "spu*-*-*".
2051 * Makefile.in (clean): Remove reg-spu.c.
2052 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2053 * spu-low.c: New file.
2055 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2057 * configure.ac: Correct td_thr_tls_get_addr test.
2058 * configure: Regenerated.
2060 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2062 * linux-low.c (linux_wait_for_event): Reformat. Use the
2064 * remote-utils.c (decode_address_to_semicolon): New.
2065 * server.c (pass_signals, handle_general_set): New.
2066 (handle_query): Mention QPassSignals for qSupported.
2067 (main): Call handle_general_set.
2068 * server.h (pass_signals, decode_address_to_semicolon): New.
2070 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2072 * server.c (handle_query): Correct error handling for read_auxv.
2074 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2076 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2077 and srv_linux_thread_db to yes.
2078 * linux-s390-low.c (s390_fill_gregset): New function.
2079 (target_regsets): Define data structure.
2081 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2083 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2084 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2085 * config.in, configure: Regenerated.
2086 * inferiors.c (gdb_id_to_thread): New function.
2087 (gdb_id_to_thread_id): Use it.
2088 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2089 * linux-low.h (struct process_info): Add th member.
2090 (thread_db_get_tls_address): New prototype.
2091 * remote-utils.c (decode_address): Make non-static.
2092 * server.c (handle_query): Handle qGetTLSAddr.
2093 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2094 * target.h (struct target_ops): Add get_tls_address.
2095 * thread-db.c (maybe_attach_thread): Save the thread handle.
2096 (thread_db_get_tls_address): New.
2098 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2100 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2101 (linux_resume_one_process): Take a siginfo_t *. Update all
2102 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2103 (struct pending_signals): Add a siginfo_t.
2104 (linux_wait_for_process): Always set last_status.
2105 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2106 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2107 * linux-low.h (struct process_info): Add last_status.
2109 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2111 * remote-utils.c (try_rle): New function.
2112 (putpkt_binary): Use it.
2114 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2116 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2117 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2118 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2119 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2120 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2123 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2125 * server.c (terminal_fd): New variable.
2126 (old_foreground_pgrp): Likewise.
2127 (restore_old_foreground_pgrp): New function.
2128 (start_inferior): Record the terminal file descriptor in terminal_fd
2129 and its original foreground group in old_foreground_pgrp. Register
2130 restore_old_foreground_pgrp with atexit().
2132 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2134 * server.c (handle_query): Correct qPart to qXfer.
2136 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2138 * configure.ac: Check for more headers which are missing on
2139 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2140 * configure.srv: Add Cygwin and mingw32.
2141 * remote-utils.c: Don't include headers unconditionally which
2142 are missing on mingw32. Include <winsock.h> for mingw32.
2143 (remote_open): Adjust for mingw32 support. Flush
2144 standard error after writing to it.
2145 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2146 (unblock_async_io, enable_async_io, disable_async_io)
2147 (readchar, getpkt): Update for Winsock support.
2148 (prepare_resume_reply): Expect a protocol signal number.
2149 * server.c: Disable <sys/wait.h> on mingw32.
2150 (start_inferior): Adjust for mingw32 support. Flush
2151 standard error after writing to it.
2152 (attach_inferior): Likewise. Use protocol signal
2154 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2156 * win32-i386-low.c: New file.
2157 * Makefile.in (XM_CLIBS): Set.
2158 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2159 (win32-i386-low.o): New dependency rule.
2160 * linux-low.c (linux_wait): Use target signal numbers.
2161 * target.h (struct target_ops): Doc fix.
2162 * server.h (target_signal_to_name): New prototype.
2163 * gdbreplay.c: Don't include headers unconditionally which
2164 are missing on mingw32. Include <winsock.h> for mingw32.
2165 (remote_close, remote_open): Adjust for Winsock support.
2166 * configure, config.in: Regenerated.
2168 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2170 * server.c (decode_xfer_read, write_qxfer_response): New.
2171 (handle_query): Take a packet length argument. Handle
2172 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2173 the qSupported response.
2174 (main): Update call to handle_query.
2176 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2178 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2179 (putpkt_binary): Renamed from putpkt and adjusted for binary
2181 (putpkt): New wrapper for putpkt_binary.
2182 (readchar): Don't mask off the high bit.
2183 (decode_X_packet): New function.
2184 * server.c (main): Call putpkt_binary if a handler sets the packet
2185 length. Save the length of the incoming packet. Handle 'X'.
2186 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2188 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2190 * server.c (handle_query): Handle qSupported.
2192 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2194 * remote-utils.c (all_symbols_looked_up): New variable.
2195 (look_up_one_symbol): Check it.
2196 * server.h (look_up_one_symbol): New declaration.
2197 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2199 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2201 * Makefile.in (linux-arm-low.o): Update dependencies.
2202 * linux-arm-low.c: Include "gdb_proc_service.h".
2203 (PTRACE_GET_THREAD_AREA): Define.
2204 (ps_get_thread_area): New function.
2206 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2208 * configure.srv (m68k*-*-uclinux*): New target.
2209 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2210 (linux_resume_one_process): Remove extraneous cast.
2211 (linux_read_offsets): New.
2212 (linux_target_op): Add linux_read_offsets on mmuless systems.
2213 * server.c (handle_query): Add qOffsets logic.
2214 * target.h (struct target_ops): Add read_offsets.
2216 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2218 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2219 (PTRACE_GET_THREAD_AREA): Define.
2220 (ps_get_thread_area): New function.
2221 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2222 (linux-x86-64-low.o): Update.
2224 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2226 * configure.ac: Remove checks for prfpregset_t.
2227 * gdb_proc_service.h: New file.
2228 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2229 new "gdb_proc_service.h".
2230 * proc-service.c: Likewise.
2231 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2232 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2233 * Makefile.in (gdb_proc_service_h): Updated.
2234 * configure, config.in: Regenerated.
2236 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2238 * remote-utils.c (prepare_resume_reply): Move declaration
2239 of gdb_id_from_wait to the top of the block.
2241 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2243 * linux-low.c (regsets_store_inferior_registers): Read the regset
2244 from the target before filling it.
2246 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2248 * server.c (attach_inferior): Return SIGTRAP for a successful
2251 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2253 * Makefile.in (OBS): Add version.o.
2254 (STAGESTUFF): Delete.
2255 (version.o): Add dependencies.
2256 (version.c): Replace rule.
2257 (clean): Remove version.c.
2258 * server.c (gdbserver_version): New.
2259 (gdbserver_usage): Use printf.
2260 (main): Handle --version and --help.
2261 * server.h (version, host_name): Add declarations.
2263 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2275 * linux-x86-64-low.c:
2278 * linux-ppc64-low.c:
2287 * linux-crisv32-low.c:
2299 * gdbserver.1: Add (C) after Copyright. Update the FSF
2302 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2304 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2305 (arm_breakpoint_at): Recognize both breakpoints.
2306 (the_low_target): Use the correct breakpoint instruction.
2308 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2310 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2311 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2312 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2313 (the_low_target): Update.
2315 2005-10-25 Andreas Schwab <schwab@suse.de>
2317 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2319 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2320 (ia64_num_regs): Reduce to 462.
2322 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2324 * acinclude.m4: Correct quoting.
2325 * aclocal.m4: Regenerated.
2327 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2328 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2329 (thread_db_init): Call thread_db_err_str.
2330 * configure.ac: Check for TD_VERSION.
2331 * config.in, configure: Regenerated.
2333 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2335 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2337 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2339 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2340 is not available. Define HAVE_PTRACE_GETREGS if it is.
2341 * config.in, configure: Regenerated.
2342 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2343 * linux-i386-low.c, linux-m68k-low.c: Update to use
2344 HAVE_PTRACE_GETREGS.
2345 * linux-low.c (regsets_fetch_inferior_registers)
2346 (regsets_store_inferior_registers): Only return 0 if we processed
2348 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2349 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2351 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2353 * inferiors.c (struct thread_info): Add gdb_id.
2354 (add_thread): Add gdb_id argument.
2355 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2356 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2357 calls to add_thread.
2358 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2359 * server.c (handle_query): Use thread_to_gdb_id.
2360 (handle_v_cont, main): Use gdb_id_to_thread_id.
2361 * server.h (add_thread): Update prototype.
2362 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2365 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2367 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2368 left-padded registers.
2369 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2370 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2372 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2374 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2375 * configure: Regenerate.
2376 * config.in: Regenerate.
2377 * server.h (NEED_DECLARATION_STRERROR):
2378 Replace with !HAVE_DECL_STRERROR.
2380 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2382 * linux-low.c (linux_wait, linux_send_signal): Don't test
2383 an unsigned long variable for > 0 if it could be MAX_ULONG.
2384 * server.c (myresume): Likewise.
2385 * target.c (set_desired_inferior): Likewise.
2387 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2389 * configure.ac: Simplify and improve check for socklen_t.
2390 * configure, config.in: Regenerate.
2392 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2394 * acconfig.h: Remove.
2395 * configure.ac: Add a test for socklen_t. Use three-argument
2396 AC_DEFINE throughout.
2397 * config.in: Regenerated using autoheader 2.59.
2398 * configure: Regenerated.
2400 * gdbreplay.c (socklen_t): Provide a default.
2401 (remote_open): Use socklen_t.
2402 * remote-utils.c (socklen_t): Provide a default.
2403 (remote_open): Use socklen_t.
2404 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2407 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2409 * linux-low.c (linux_read_memory, linux_write_memory)
2410 (linux_read_auxv): Likewise.
2411 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2412 (check_mem_write): Likewise.
2413 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2415 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2416 (registers_from_string, register_data): Likewise.
2417 * server.c (handle_query, main): Likewise.
2418 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2419 (decode_M_packet): Likewise.
2420 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2421 * target.h (struct target_ops): Update read_memory, write_memory,
2423 (read_inferior_memory, write_inferior_memory): Update.
2424 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2426 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2427 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2428 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2429 linux-s390-low.c, linux-sh-low.c: Update for changes in
2430 read_inferior_memory and the_low_target->breakpoint.
2432 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2434 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2435 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2436 * configure.srv: Add powerpc64-*-linux*.
2437 * linux-ppc64-low.c: New file.
2439 2005-05-23 Orjan Friberg <orjanf@axis.com>
2441 * linux-cris-low.c: New file with support for CRIS.
2442 * linux-crisv32-low.c: Ditto for CRISv32.
2443 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2444 (clean): Add reg-cris.c and reg-crisv32.c.
2445 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2446 reg-crisv32.o, and reg-crisv32.c to make rules.
2447 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2450 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2452 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2453 of sizeof (PTRACE_XFER_TYPE).
2454 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2456 2005-05-12 Orjan Friberg <orjanf@axis.com>
2458 * target.h (struct target_ops): Add insert_watchpoint,
2459 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2460 pointers for hardware watchpoint support.
2461 * linux-low.h (struct linux_target_ops): Ditto.
2462 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2463 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2464 to linux_target_ops.
2465 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2467 * server.c (main): Recognize 'Z' and 'z' packets.
2469 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2471 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2472 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2473 (the_low_target): Add new members.
2475 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2477 * proc-service.c (ps_lgetregs): Search all_processes instead of
2480 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2482 * server.c (start_inferior): Change return type to int.
2483 (attach_inferior): Change sigptr to int *.
2484 (handle_v_cont, handle_v_requests): Change signal to int *.
2485 (main): Change signal to int.
2487 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2489 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2490 * configure.srv: Add m32r*-*-linux*.
2491 * linux-m32r-low.c: New file.
2493 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2495 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2497 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2499 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2500 Take unsigned long arguments for PIDs.
2501 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2502 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2503 (wait_for_sigstop, linux_resume_one_process)
2504 (regsets_fetch_inferior_registers, linux_send_signal)
2505 (linux_read_auxv): Likewise. Update the types of variables holding
2506 PIDs. Update format string specifiers.
2507 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2508 * remote-utils.c (prepare_resume_reply): Likewise.
2509 * server.c (cont_thread, general_thread, step_thread)
2510 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2512 (handle_query): Update format specifiers.
2513 (handle_v_cont, main): Use strtoul for thread IDs.
2514 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2515 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2516 (general_thread, step_thread, thread_from_wait)
2517 (old_thread_from_wait): Update.
2518 * target.h (struct thread_resume): Use unsigned long for THREAD.
2519 (struct target_ops): Use unsigned long for arguments to attach and
2522 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2524 * acinclude.m4: Include bfd/bfd.m4 directly.
2525 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2526 <agriffis@toolchain.org>.
2527 * aclocal.m4, configure: Regenerated.
2529 2005-01-07 Andrew Cagney <cagney@gnu.org>
2531 * configure.ac: Rename configure.in, require autoconf 2.59.
2532 * configure: Re-generate.
2534 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2536 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2538 * aclocal.m4: Regenerated.
2539 * configure: Regenerated.
2541 2004-11-21 Andreas Schwab <schwab@suse.de>
2543 * linux-m68k-low.c (m68k_num_gregs): Define.
2544 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2545 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2546 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2547 (m68k_breakpoint_at): New. Add to the_low_target.
2549 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2550 srv_linux_thread_db to yes.
2552 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2554 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2555 (ARCH_SET_FS): Likewise.
2556 (ARCH_GET_FS): Likewise.
2557 (ARCH_GET_GS): Likewise.
2559 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2561 * linux-i386-low.c (ps_get_thread_area): New.
2562 * linux-x86-64-low.c (ps_get_thread_area): New.
2563 * linux-low.c: Include <sys/syscall.h>.
2564 (linux_kill_one_process): Don't kill the first thread here.
2565 (linux_kill): Kill the first thread here.
2566 (kill_lwp): New function.
2567 (send_sigstop, linux_send_signal): Use it.
2568 * proc-service.c: Clean up #ifdefs.
2569 (fpregset_info): Delete.
2570 (ps_lgetregs): Update and enable implementation.
2571 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2573 * remote-utils.c (struct sym_cache, symbol_cache): New.
2574 (input_interrupt): Print a clearer message.
2575 (async_io_enabled): New variable.
2576 (enable_async_io, disable_async_io): Use it. Update comments.
2577 (look_up_one_symbol): Use the symbol cache.
2578 * thread-db.c (thread_db_look_up_symbols): New function.
2579 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2581 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2583 * configure.in: Test for -rdynamic.
2584 * configure: Regenerated.
2585 * Makefile (INTERNAL_LDFLAGS): New.
2586 (gdbserver, gdbreplay): Use it.
2588 2004-09-02 Andrew Cagney <cagney@gnu.org>
2590 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2592 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2594 * linux-low.c (linux_wait): Clear all_processes list also.
2596 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2598 * linux-low.c: Include <errno.h>. Remove extern declaration of
2601 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2603 * gdbreplay.c, server.h, utils.c: Update copyright years.
2605 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2607 * server.c (main): Print child status or termination signal from
2608 variable 'signal', not 'sig'.
2610 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2612 * linux-low.c (linux_read_memory): Change return type to
2613 int. Check for and return error from ptrace().
2614 * target.c (read_inferior_memory): Change return type to int. Pass
2615 back return status from the_target->read_memory().
2616 * target.h (struct target_ops): Adapt *read_memory() prototype.
2618 (read_inferior_memory): Adapt prototype.
2619 * server.c (main): Return an error packet if
2620 read_inferior_memory() returns an error.
2622 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2624 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2625 Unify with other clean targets.
2627 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2629 * server.c (handle_v_cont): Call set_desired_inferior.
2631 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2633 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2635 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2637 * linux-low.c (linux_wait): Unblock async I/O.
2638 (linux_resume): Block and enable async I/O.
2639 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2640 * server.h (block_async_io, unblock_async_io): Add prototypes.
2642 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2644 * remote-utils.c (remote_open): Print a status notice after
2646 * server.c (attach_inferior): Print a status notice after
2649 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2651 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2653 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2655 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2657 * server.c, target.h: Update copyright years.
2659 2004-02-25 Roland McGrath <roland@redhat.com>
2661 * target.h (struct target_ops): New member `read_auxv'.
2662 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2663 * linux-low.c (linux_read_auxv): New function.
2664 (linux_target_ops): Initialize `read_auxv' member to that.
2666 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2668 Committed by Jim Blandy <jimb@redhat.com>.
2670 * linux-s390-low.c (s390_num_regs): Update.
2671 (s390_regmap): Remove control registers. Use __s390x__ predefine
2672 instead of GPR_SIZE to distiguish s390 and s390x targets.
2674 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2676 * linux-low.c: Update copyright year.
2677 (check_removed_breakpoint): Clear pending_is_breakpoint.
2678 (linux_set_resume_request, linux_queue_one_thread)
2679 (resume_status_pending_p): New functions.
2680 (linux_continue_one_thread): Use process->resume.
2681 (linux_resume): Only resume threads if there are no pending events.
2682 * linux-low.h (struct process_info): Add resume request
2685 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2687 * regcache.c (new_register_cache): Clear the allocated register
2688 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2690 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2692 * linux-low.c (linux_resume): Take a struct thread_resume *
2694 (linux_wait): Update call.
2695 (resume_ptr): New static variable.
2696 (linux_continue_one_thread): Renamed from
2697 linux_continue_one_process. Use resume_ptr.
2698 (linux_resume): Use linux_continue_one_thread.
2699 * server.c (handle_v_cont, handle_v_requests): New functions.
2700 (myresume): New function.
2701 (main): Handle 'v' case.
2702 * target.h (struct thread_resume): New type.
2703 (struct target_ops): Change argument of "resume" to struct
2705 (myresume): Delete macro.
2707 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2709 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2710 (uninstall): Support DESTDIR.
2712 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2714 * configure.srv: Add xscale*linux copy of arm*linux entry.
2716 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2718 * linux-arm-low.c (arm_reinsert_addr): New function.
2719 (the_low_target): Add arm_reinsert_addr.
2721 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2723 * mem-break.c: Remove whitespace at end of file.
2725 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2727 * configure.in: Check whether we need to prototype strerror.
2728 * server.h: Optionally prototype strerror.
2729 * gdbreplay.c (perror_with_name): Use strerror.
2730 * linux-low.c (linux_attach_lwp): Use strerror.
2731 * utils.c (perror_with_name): Use strerror.
2732 * config.in, configure: Regenerated.
2734 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2736 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2737 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2739 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2741 * Makefile.in (SFILES): Update.
2742 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2743 low-sun3.c: Remove files.
2745 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2747 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2748 (linux_detach_one_process, linux_detach): New functions.
2749 (linux_target_ops): Add linux_detach.
2750 * server.c (main): Handle 'D' packet.
2751 * target.h (struct target_ops): Add "detach" member.
2752 (detach_inferior): Define.
2754 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2756 From Kelley Cook <kelleycook@wideopenwest.com>:
2757 * configure.srv: Accept i[34567]86 variants.
2759 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2761 * linux-low.c (linux_wait_for_event): Correct comment typos.
2762 (linux_resume_one_process): Call check_removed_breakpoint.
2763 (linux_send_signal): New function.
2764 (linux_target_ops): Add linux_send_signal.
2765 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2767 * target.h (struct target_ops): Add send_signal.
2769 2003-05-29 Jim Blandy <jimb@redhat.com>
2771 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2772 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2773 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2774 away part of the register's value.
2776 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2778 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2779 (linux_wait_for_event, linux_init_signals): Likewise.
2781 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2783 * configure.in: Check for stdlib.h.
2784 * configure: Regenerated.
2785 * config.in: Regenerated.
2787 2003-01-04 Andreas Schwab <schwab@suse.de>
2789 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2791 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2793 * Makefile.in: Remove obsolete code.
2795 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2797 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2798 defined(PT_FPR0_HI).
2800 2002-11-17 Stuart Hughes <seh@zee2.com>
2802 * linux-arm-low.c (arm_num_regs): Increase.
2803 (arm_regmap): Include status register.
2805 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2807 * linux-low.c (register_addr): Remove incorrect -1 check.
2809 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2811 * linux-low.c (linux_create_inferior): Call setpgid. Return
2813 (unstopped_p, linux_signal_pid): Remove.
2814 (linux_target_ops): Remove linux_signal_pid.
2815 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2816 global instead of target method.
2817 * target.h (struct target_ops): Remove signal_pid. Update comment
2818 for create_inferior.
2819 * server.c (signal_pid): New variable.
2820 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2821 gdbserver. Set the child to be the foreground process group.
2822 (attach_inferior): Set signal_pid.
2824 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2826 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2828 2002-08-20 Jim Blandy <jimb@redhat.com>
2830 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2833 2002-08-01 Andrew Cagney <cagney@redhat.com>
2835 * Makefile.in: Make chill references obsolete.
2837 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2839 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2840 * configure: Regenerate.
2841 * config.in: Regenerate.
2843 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2845 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2846 (perror_with_name, remote_close, remote_open, expect, play): Static.
2848 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2850 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2851 byte offsets instead of an array of indexes.
2852 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2854 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2856 * regcache.c: Add comment.
2858 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2860 * thread-db.c: New file.
2861 * proc-service.c: New file.
2862 * acinclude.m4: New file.
2863 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2864 proc-service.o, and thread-db.o.
2865 (linux-low.o): Add USE_THREAD_DB.
2866 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2867 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2868 * aclocal.m4: Regenerated.
2869 * config.in: Regenerated.
2870 * configure: Regenerated.
2871 * configure.in: Check for proc_service.h, sys/procfs.h,
2872 thread_db.h, and linux/elf.h headrs.
2873 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2874 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2875 Check for -lthread_db and thread support.
2876 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2877 PowerPC, and SuperH.
2878 * i387-fp.c: Constify arguments.
2879 * i387-fp.h: Likewise.
2880 * inferiors.c: (struct thread_info): Renamed from
2881 `struct inferior_info'. Remove PID member. Use generic inferior
2882 list header. All uses updated.
2883 (inferiors, signal_pid): Removed.
2884 (all_threads): New variable.
2885 (get_thread): Define.
2886 (add_inferior_to_list): New function.
2887 (for_each_inferior): New function.
2888 (change_inferior_id): New function.
2889 (add_inferior): Removed.
2890 (remove_inferior): New function.
2891 (add_thread): New function.
2892 (free_one_thread): New function.
2893 (remove_thread): New function.
2894 (clear_inferiors): Use for_each_inferior and free_one_thread.
2895 (find_inferior): New function.
2896 (find_inferior_id): New function.
2897 (inferior_target_data): Update argument type.
2898 (set_inferior_target_data): Likewise.
2899 (inferior_regcache_data): Likewise.
2900 (set_inferior_regcache_data): Likewise.
2901 * linux-low.c (linux_bp_reinsert): Remove.
2902 (all_processes, stopping_threads, using_thrads)
2903 (struct pending_signals, debug_threads, pid_of): New.
2904 (inferior_pid): Replace with macro.
2905 (struct inferior_linux_data): Remove.
2906 (get_stop_pc, add_process): New functions.
2907 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2908 Use add_process and add_thread.
2909 (linux_attach_lwp): New function, based on old linux_attach. Use
2910 add_process and add_thread. Set stop_expected for new threads.
2911 (linux_attach): New function.
2912 (linux_kill_one_process): New function.
2913 (linux_kill): Kill all LWPs.
2914 (linux_thread_alive): Use find_inferior_id.
2915 (check_removed_breakpoints, status_pending_p): New functions.
2916 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2917 Update. Use WNOHANG. Wait for cloned processes also. Update process
2918 struct for the found process.
2919 (linux_wait_for_event): New function.
2920 (linux_wait): Use it. Support LWPs.
2921 (send_sigstop, wait_for_sigstop, stop_all_processes)
2922 (linux_resume_one_process, linux_continue_one_process): New functions.
2923 (linux_resume): Support LWPs.
2924 (REGISTER_RAW_SIZE): Remove.
2925 (fetch_register): Use register_size instead. Call supply_register.
2926 (usr_store_inferior_registers): Likewise. Call collect_register.
2928 (regsets_fetch_inferior_registers): Improve error message.
2929 (regsets_store_inferior_registers): Add debugging.
2930 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2931 (unstopped_p, linux_signal_pid): New functions.
2932 (linux_target_ops): Add linux_signal_pid.
2933 (linux_init_signals): New function.
2934 (initialize_low): Call it. Initialize using_threads.
2935 * regcache.c (inferior_regcache_data): Add valid
2937 (get_regcache): Fetch registers lazily. Add fetch argument
2938 and update all callers.
2939 (regcache_invalidate_one, regcache_invalidate): New
2941 (new_register_cache): Renamed from create_register_cache.
2942 Return the new regcache.
2943 (free_register_cache): Change argument to a void *.
2944 (registers_to_string, registers_from_string): Call get_regcache
2945 with fetch flag set.
2946 (register_data): Make static. Pass fetch flag to get_regcache.
2947 (supply_register): Call get_regcache with fetch flag clear.
2948 (collect_register): Call get_regcache with fetch flag set.
2949 (collect_register_as_string): New function.
2950 * regcache.h: Update.
2951 * remote-utils.c (putpkt): Flush after debug output and use
2953 Handle input interrupts while waiting for an ACK.
2954 (input_interrupt): Use signal_pid method.
2955 (getpkt): Flush after debug output and use stderr.
2956 (outreg): Use collect_register_as_string.
2957 (new_thread_notify, dead_thread_notify): New functions.
2958 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2960 (look_up_one_symbol): Flush after debug output.
2961 * server.c (step_thread, server_waiting): New variables.
2962 (start_inferior): Don't use signal_pid. Update call to mywait.
2963 (attach_inferior): Update call to mywait.
2964 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2965 (main): Don't fetch/store registers explicitly. Use
2966 set_desired_inferior. Support proposed ``Hs'' packet. Update
2969 (struct inferior_list, struct_inferior_list_entry): New.
2970 * target.c (set_desired_inferior): New.
2971 (write_inferior_memory): Constify.
2972 (mywait): New function.
2974 (struct target_ops): New signal_pid method.
2975 (mywait): Removed macro, added prototype.
2977 * linux-low.h (regset_func): Removed.
2978 (regset_fill_func, regset_store_func): New.
2979 (enum regset_type): New.
2980 (struct regset_info): Add type field. Use new operation types.
2981 (struct linux_target_ops): stop_pc renamed to get_pc.
2982 Add decr_pc_after_break and breakpoint_at.
2983 (get_process, get_thread_proess, get_process_thread)
2984 (strut process_info, all_processes, linux_attach_lwp)
2985 (thread_db_init): New.
2987 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2988 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2989 (the_low_target): Add new members.
2990 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2991 (i386_store_fpxregset): Constify.
2992 (target_regsets): Add new kind identifier.
2993 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2994 (i386_set_pc): Add debugging.
2995 (i386_breakpoint_at): New function.
2996 (the_low_target): Add new members.
2997 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2998 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2999 (mips_breakpoint_at): New.
3000 (the_low_target): Add new members.
3001 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3002 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3003 (the_low_target): Add new members.
3004 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3005 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3006 (the_low_target): Add new members.
3007 * linux-x86-64-low.c (target_regsets): Add new kind
3010 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3012 From Martin Pool <mbp@samba.org>:
3013 * server.c (gdbserver_usage): New function.
3016 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3018 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3021 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3023 * Makefile.in: Remove obsolete code.
3025 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3027 * linux-low.c (regsets_fetch_inferior_registers),
3028 (regsets_store_inferior_registers): Removed cast to int from
3030 * regcache.h: Added declaration of struct inferior_info.
3032 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3034 * inferiors.c (struct inferior_info): Add regcache_data.
3035 (add_inferior): Call create_register_cache.
3036 (clear_inferiors): Call free_register_cache.
3037 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3038 * regcache.c (struct inferior_regcache_data): New.
3039 (registers): Remove.
3040 (get_regcache): New function.
3041 (create_register_cache, free_register_cache): New functions.
3042 (set_register_cache): Don't initialize the register cache here.
3043 (registers_to_string, registers_from_string, register_data): Call
3045 * regcache.h: Add prototypes.
3046 * server.h: Likewise.
3048 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3050 * mem-break.c: New file.
3051 * mem-break.h: New file.
3052 * Makefile.in: Add mem-break.o rule; update server.h
3054 * inferiors.c (struct inferior_info): Add target_data
3056 (clear_inferiors): Free target_data member if set.
3057 (inferior_target_data, set_inferior_target_data): New functions.
3058 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3059 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3060 * linux-low.c (linux_bp_reinsert): New variable.
3061 (struct inferior_linux_data): New.
3062 (linux_create_inferior): Use set_inferior_target_data.
3063 (linux_attach): Likewise. Call add_inferior.
3064 (linux_wait_for_one_inferior): New function.
3065 (linux_wait): Call it.
3066 (linux_write_memory): Add const.
3067 (initialize_low): Call set_breakpoint_data.
3068 * linux-low.h (struct linux_target_ops): Add breakpoint
3070 * server.c (attach_inferior): Remove extra add_inferior
3072 * server.h: Include mem-break.h. Update inferior.c
3074 * target.c (read_inferior_memory)
3075 (write_inferior_memory): New functions.
3076 * target.h (read_inferior_memory)
3077 (write_inferior_memory): Change macros to prototypes.
3078 (struct target_ops): Update comments. Add const to write_memory
3081 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3083 * linux-low.c (usr_store_inferior_registers): Support
3084 registers which are allowed to fail to store.
3085 * linux-low.h (linux_target_ops): Likewise.
3086 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3087 (ppc_cannot_store_register): FPSCR may not be storable.
3089 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3091 * server.h: Include <string.h> if HAVE_STRING_H.
3092 * ChangeLog: Correct paths in last ChangeLog entry.
3094 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3096 * linux-low.h: Remove obsolete prototypes.
3097 (struct linux_target_ops): New.
3098 (extern the_low_target): New.
3099 * linux-low.c (num_regs, regmap): Remove declarations.
3100 (register_addr): Use the_low_target explicitly.
3101 (fetch_register): Likewise.
3102 (usr_fetch_inferior_registers): Likewise.
3103 (usr_store_inferior_registers): Likewise.
3104 * linux-arm-low.c (num_regs): Remove.
3105 (arm_num_regs): Define.
3106 (arm_regmap): Renamed from regmap, made static.
3107 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3109 (arm_cannot_store_register): Renamed from cannot_store_register,
3111 (the_low_target): New.
3112 * linux-i386-low.c (num_regs): Remove.
3113 (i386_num_regs): Define.
3114 (i386_regmap): Renamed from regmap, made static.
3115 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3117 (i386_cannot_store_register): Renamed from cannot_store_register,
3119 (the_low_target): New.
3120 * linux-ia64-low.c (num_regs): Remove.
3121 (ia64_num_regs): Define.
3122 (ia64_regmap): Renamed from regmap, made static.
3123 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3125 (ia64_cannot_store_register): Renamed from cannot_store_register,
3127 (the_low_target): New.
3128 * linux-m68k-low.c (num_regs): Remove.
3129 (m68k_num_regs): Define.
3130 (m68k_regmap): Renamed from regmap, made static.
3131 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3133 (m68k_cannot_store_register): Renamed from cannot_store_register,
3135 (the_low_target): New.
3136 * linux-mips-low.c (num_regs): Remove.
3137 (mips_num_regs): Define.
3138 (mips_regmap): Renamed from regmap, made static.
3139 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3141 (mips_cannot_store_register): Renamed from cannot_store_register,
3143 (the_low_target): New.
3144 * linux-ppc-low.c (num_regs): Remove.
3145 (ppc_num_regs): Define.
3146 (ppc_regmap): Renamed from regmap, made static.
3147 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3149 (ppc_cannot_store_register): Renamed from cannot_store_register,
3151 (the_low_target): New.
3152 * linux-s390-low.c (num_regs): Remove.
3153 (s390_num_regs): Define.
3154 (s390_regmap): Renamed from regmap, made static.
3155 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3157 (s390_cannot_store_register): Renamed from cannot_store_register,
3159 (the_low_target): New.
3160 * linux-sh-low.c (num_regs): Remove.
3161 (sh_num_regs): Define.
3162 (sh_regmap): Renamed from regmap, made static.
3163 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3165 (sh_cannot_store_register): Renamed from cannot_store_register,
3167 (the_low_target): New.
3168 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3169 (the_low_target): New.
3171 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3173 * Makefile.in: Add stamp-h target.
3174 * configure.in: Create stamp-h.
3175 * configure: Regenerated.
3177 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3179 * inferiors.c: New file.
3180 * target.c: New file.
3181 * target.h: New file.
3182 * Makefile.in: Add target.o and inferiors.o. Update
3184 * linux-low.c (inferior_pid): New static variable,
3185 moved from server.c.
3186 (linux_create_inferior): Renamed from create_inferior.
3187 Call add_inferior. Return 0 on success instead of a PID.
3188 (linux_attach): Renamed from myattach.
3189 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3190 (linux_thread_alive): Renamed from mythread_alive.
3191 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3193 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3194 (regsets_store_inferior_registers): Correct error message.
3195 Add missing ``return 0''.
3196 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3197 (linux_store_registers): Renamed from store_inferior_registers.
3198 (linux_read_memory): Renamed from read_inferior_memory.
3199 (linux_write_memory): Renamed from write_inferior_memory.
3200 (linux_target_ops): New structure.
3201 (initialize_low): Call set_target_ops ().
3202 * remote-utils.c (unhexify): New function.
3203 (hexify): New function.
3204 (input_interrupt): Send signals to ``signal_pid''.
3205 * server.c (inferior_pid): Remove.
3206 (start_inferior): Update create_inferior call.
3207 (attach_inferior): Call add_inferior.
3208 (handle_query): New function.
3209 (main): Call handle_query for `q' packets.
3210 * server.h: Include "target.h". Remove obsolete prototypes.
3211 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3213 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3215 * Makefile.in: Add WARN_CFLAGS. Update configury
3217 * configure.in: Check for <string.h>
3218 * configure: Regenerate.
3219 * config.in: Regenerate.
3220 * gdbreplay.c: Include needed system headers.
3221 (remote_open): Remove strchr prototype.
3222 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3223 * regcache.c (supply_register): Change buf argument to const void *.
3224 (supply_register_by_name): Likewise.
3225 (collect_register): Change buf argument to void *.
3226 (collect_register_by_name): Likewise.
3227 * regcache.h: Add missing prototypes.
3228 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3229 * server.c (handle_query): New function.
3230 (attached): New static variable, moved out of main.
3231 (main): Quiet longjmp clobber warnings.
3232 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3233 * utils.c (error): Remove NORETURN.