1 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2 Pedro Alves <pedro@codesourcery.com>
4 * target.h (struct target_ops) <supports_multi_process>: New
6 (target_supports_multi_process): New.
7 * server.c (handle_query): Even if GDB reports support, only
8 enable multi-process if the target also supports it. Report
9 multi-process support only if the target backend supports it.
10 * linux-low.c (linux_supports_multi_process): New function.
11 (linux_target_ops): Install it as target_supports_multi_process
14 2009-05-24 Doug Evans <dje@google.com>
16 Global renaming of find_thread_pid to find_thread_ptid.
17 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
21 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
22 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
25 * linux-low.c (get_stop_pc): Print pc if debug_threads.
26 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
27 (linux_resume_one_lwp): Ditto.
29 2009-05-23 Doug Evans <dje@google.com>
31 * linux-low.c (linux_resume_one_lwp): Change type of first arg
32 from struct inferior_list_entry * to struct lwp_info *.
35 2009-05-13 Doug Evans <dje@google.com>
37 * linux-x86-low.c: Don't include assert.h.
38 (x86_siginfo_fixup): Use fatal, not assert.
39 (x86_arch_setup): Fix comment.
41 2009-05-12 Doug Evans <dje@google.com>
43 Biarch support for i386/amd64 gdbserver.
44 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
46 (linux-i386-low.o, linux-x86-64-low.o): Delete.
47 (linux-x86-low.o): Add.
48 * linux-x86-64-low.c: Delete.
49 * linux-i386-low.c: Delete.
50 * linux-x86-low.c: New file.
51 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
53 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
55 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
56 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
57 (linux_child_pid_to_exec_file): New function.
58 (elf_64_header_p, elf_64_file_p): New functions.
59 (siginfo_fixup): New function.
60 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
61 give target a chance to convert layout.
62 * linux-low.h (linux_target_ops): New member siginfo_fixup.
63 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
65 2009-05-07 Doug Evans <dje@google.com>
67 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
68 (regsets_store_inferior_registers): Ditto.
70 2009-05-06 Pedro Alves <pedro@codesourcery.com>
74 * linux-low.c (must_set_ptrace_flags): Delete.
75 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
77 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
78 `lwp->must_set_ptrace_flags' instead.
79 (linux_wait_for_event_1): Set ptrace options here.
80 (linux_wait_1): ... not here.
82 2009-04-30 Doug Evans <dje@google.com>
84 * inferiors.c (started_inferior_callback): New function.
85 (attached_inferior_callback): New function.
86 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
87 * server.c (print_started_pid, print_attached_pid): New functions.
88 (detach_or_kill_for_exit): New function.
89 (main): Call it instead of for_each_inferior (kill_inferior_callback).
90 * server.h (have_started_inferiors_p): Declare.
91 (have_attached_inferiors_p): Declare.
93 * inferiors.c (remove_process): Fix memory leak, free process.
94 * linux-low.c (linux_remove_process): New function.
95 (linux_kill): Call it instead of remove_process.
96 (linux_detach, linux_wait_1): Ditto.
98 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
100 * configure.srv: Add x86 Windows CE target.
102 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
104 * inferiors.c (get_thread_process): Make global.
105 * server.h (get_thread_process): Add prototype.
106 * thread-db.c (find_one_thread): Use get_thread_process
107 instead of current_process.
108 (thread_db_get_tls_address): Do not crash if called when
109 thread layer is not yet initialized.
111 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
113 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
114 * spu-low.c (current_tid): Rename to ...
115 (current_ptid): ... this.
116 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
117 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
118 ptid_get_lwp (current_ptid) instead of current_tid.
119 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
120 instead of current_tid. Use find_process_pid to verify pid
121 argument is valid. Pass proper argument to remove_process.
122 (spu_thread_alive): Compare current_ptid instead of current_tid.
123 (spu_resume): Likewise.
125 2009-04-02 Pedro Alves <pedro@codesourcery.com>
127 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
130 2009-04-01 Pedro Alves <pedro@codesourcery.com>
132 Implement the multiprocess extensions, and add linux multiprocess
135 * server.h (ULONGEST): Declare.
136 (struct ptid, ptid_t): New.
137 (minus_one_ptid, null_ptid): Declare.
138 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
139 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
140 (struct inferior_list_entry): Change `id' type from unsigned from
142 (struct sym_cache, struct breakpoint, struct
143 process_info_private): Forward declare.
144 (struct process_info): Declare.
145 (current_process): Declare.
146 (all_processes): Declare.
147 (initialize_inferiors): Declare.
148 (add_thread): Adjust to use ptid_t.
149 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
150 (add_process, remove_process, find_thread_pid): Declare.
151 (find_inferior_id): Adjust to use ptid_t.
152 (cont_thread, general_thread, step_thread): Change type to ptid_t.
153 (multi_process): Declare.
154 (push_event): Adjust to use ptid_t.
155 (read_ptid, write_ptid): Declare.
156 (prepare_resume_reply): Adjust to use ptid_t.
157 (clear_symbol_cache): Declare.
158 * inferiors.c (all_processes): New.
159 (null_ptid, minus_one_ptid): New.
160 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
161 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
162 (add_thread): Change unsigned long to ptid. Remove gdb_id
164 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
165 (gdb_id_to_thread): Rename to ...
166 (find_thread_pid): ... this. Change unsigned long to ptid.
167 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
168 (loaded_dll, pull_pid_from_list): Adjust.
169 (add_process, remove_process, find_process_pid)
170 (get_thread_process, current_process, initialize_inferiors): New.
171 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
172 (struct target_waitstatus) <related_pid>: Ditto.
173 (struct target_ops) <kill, detach>: Add `pid' argument. Change
175 (struct target_ops) <join>: Add `pid' argument.
176 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
177 (struct target_ops) <wait>: Add `ptid' field. Change return type
179 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
180 (mywait): Add `ptid' argument. Change return type to ptid_t.
181 (target_pid_to_str): Declare.
182 * target.c (set_desired_inferior): Adjust to use ptids.
183 (mywait): Add new `ptid' argument. Adjust.
184 (target_pid_to_str): New.
185 * mem-break.h (free_all_breakpoints): Declare.
186 * mem-break.c (breakpoints): Delelete.
187 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
188 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
189 to use per-process breakpoint list.
190 (free_all_breakpoints): New.
191 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
192 (symbol_cache, all_symbols_looked_up): Delete.
194 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
196 (prepare_resume_reply): Change ptid argument's type from unsigned
197 long to ptid_t. Adjust. Implement W;process and X;process.
198 (free_sym_cache, clear_symbol_cache): New.
199 (look_up_one_symbol): Adjust to per-process symbol cache. *
200 * server.c (cont_thread, general_thread, step_thread): Change type
203 (multi_process): New.
204 (last_ptid): Change type to ptid_t.
205 (struct vstop_notif) <ptid>: Change type to ptid_t.
206 (queue_stop_reply, push_event): Change `ptid' argument's type to
208 (discard_queued_stop_replies): Add `pid' argument.
209 (start_inferior): Adjust to use ptids. Adjust to mywait interface
210 changes. Don't reference the `attached' global.
211 (attach_inferior): Adjust to mywait interface changes.
212 (handle_query): Adjust to use ptids. Parse GDB's qSupported
213 features. Handle and report "multiprocess+". Handle
215 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
217 (handle_v_kill): New.
218 (handle_v_stopped): Adjust to use target_pid_to_str.
219 (handle_v_requests): Allow multiple attaches and runs when
220 multiprocess extensions are in effect. Handle "vKill".
221 (myresume): Adjust to use ptids.
222 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
223 (handle_status): Adjust to discard_queued_stop_replies interface
225 (first_thread_of, kill_inferior_callback)
226 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
227 (main): Call initialize_inferiors. Adjust to use ptids, killing
228 and detaching from all inferiors. Handle multiprocess packet
230 * linux-low.h: Include gdb_proc_service.h.
231 (struct process_info_private): New.
232 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
233 <lwpid_of>: Use ptid_get_lwp.
234 (get_lwp_thread): Adjust.
235 (struct lwp_info): Add `dead' member.
236 (find_lwp_pid): Declare.
237 * linux-low.c (thread_db_active): Delete.
238 (new_inferior): Adjust comment.
239 (inferior_pid): Delete.
240 (linux_add_process): New.
241 (handle_extended_wait): Adjust.
242 (add_lwp): Change unsigned long to ptid.
243 (linux_create_inferior): Add process to processes table. Adjust
244 to use ptids. Don't set new_inferior here.
245 (linux_attach_lwp): Rename to ...
246 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
247 it. Adjust to use ptids.
248 (linux_attach_lwp): New.
249 (linux_attach): Add process to processes table. Don't set
251 (struct counter): New.
252 (second_thread_of_pid_p, last_thread_of_process_p): New.
253 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
255 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
256 processes. Remove process from process table.
257 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
258 to multiple processes.
259 (any_thread_of): New.
260 (linux_detach): Add `pid' argument, and handle it. Remove process
261 from processes table.
262 (linux_join): Add `pid' argument. Handle it.
263 (linux_thread_alive): Change unsighed long argument to ptid_t.
264 Consider dead lwps as not being alive.
265 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
266 threads we're not interested in.
267 (same_lwp, find_lwp_pid): New.
268 (linux_wait_for_lwp): Change `pid' argument's type from int to
270 (linux_wait_for_event): Rename to ...
271 (linux_wait_for_event_1): ... this. Change `pid' argument's type
272 from int to ptid_t. Adjust.
273 (linux_wait_for_event): New.
274 (linux_wait_1): Add `ptid' argument. Change return type to
275 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
276 that exit from the process table.
277 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
279 (mark_lwp_dead): New.
280 (wait_for_sigstop): Adjust to use ptids. If a process exits while
281 stopping all threads, mark its main lwp as dead.
282 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
284 (fetch_register, usr_store_inferior_registers)
285 (regsets_fetch_inferior_registers)
286 (regsets_store_inferior_registers, linux_read_memory)
287 (linux_write_memory): Inline `inferior_pid'.
288 (linux_look_up_symbols): Adjust to use per-process
290 (linux_request_interrupt): Adjust to use ptids.
291 (linux_read_auxv): Inline `inferior_pid'.
292 (initialize_low): Don't reference thread_db_active.
293 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
294 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
295 (ps_getpid): Return the pid of the current inferior.
296 * thread-db.c (proc_handle, thread_agent): Delete.
297 (thread_db_create_event, thread_db_enable_reporting): Adjust to
299 (find_one_thread): Change argument type to ptid_t. Adjust to
301 (maybe_attach_thread): Adjust to per-process data and ptids.
302 (thread_db_find_new_threads): Ditto.
303 (thread_db_init): Ditto.
304 * spu-low.c (spu_create_inferior, spu_attach): Add process to
305 processes table. Adjust to use ptids.
306 (spu_kill, spu_detach): Adjust interface. Remove process from
308 (spu_join, spu_thread_alive): Adjust interface.
309 (spu_wait): Adjust interface. Remove process from processes
310 table. Adjust to use ptids.
311 * win32-low.c (current_inferior_tid): Delete.
312 (current_inferior_ptid): New.
313 (debug_event_ptid): New.
314 (thread_rec): Take a ptid. Adjust.
315 (child_add_thread): Add `pid' argument. Adjust to use ptids.
316 (child_delete_thread): Ditto.
317 (do_initial_child_stuff): Add `attached' argument. Add process to
319 (child_fetch_inferior_registers, child_store_inferior_registers):
321 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
322 (win32_attach): Pass 1 to do_initial_child_stuff.
323 (win32_kill): Adjust interface. Remove process from processes
325 (win32_detach): Ditto.
326 (win32_join): Adjust interface.
327 (win32_thread_alive): Take a ptid.
328 (win32_resume): Adjust to use ptids.
329 (get_child_debug_event): Ditto.
330 (win32_wait): Adjust interface. Remove exiting process from
333 2009-04-01 Pedro Alves <pedro@codesourcery.com>
335 Non-stop mode support.
337 * server.h (non_stop): Declare.
338 (gdb_client_data, handler_func): Declare.
339 (delete_file_handler, add_file_handler, start_event_loop):
341 (handle_serial_event, handle_target_event, push_event)
342 (putpkt_notif): Declare.
343 * target.h (enum resume_kind): New.
344 (struct thread_resume): Replace `step' field by `kind' field.
345 (TARGET_WNOHANG): Define.
346 (struct target_ops) <wait>: Add `options' argument.
347 <supports_non_stop, async, start_non_stop>: New fields.
348 (target_supports_non_stop, target_async): New.
349 (start_non_stop): Declare.
350 (mywait): Add `options' argument.
351 * target.c (mywait): Add `options' argument. Print child exit
353 (start_non_stop): New.
354 * server.c (non_stop, own_buf, mem_buf): New globals.
355 (struct vstop_notif): New.
356 (notif_queue): New global.
357 (queue_stop_reply, push_event, discard_queued_stop_replies)
358 (send_next_stop_reply): New.
359 (start_inferior): Adjust to use resume_kind. Adjust to mywait
361 (attach_inferior): In non-stop mode, don't wait for the target
363 (handle_general_set): Handle QNonStop.
364 (handle_query): When handling qC, return the current general
365 thread, instead of the first thread of the list.
366 (handle_query): If the backend supports non-stop mode, include
367 QNonStop+ in the qSupported query response.
368 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
370 (handle_v_attach, handle_v_run): Handle non-stop mode.
371 (handle_v_stopped): New.
372 (handle_v_requests): Report support for vCont;t. Handle vStopped.
373 (myresume): Adjust to use resume_kind. Handle non-stop.
374 (queue_stop_reply_callback): New.
375 (handle_status): Handle non-stop mode.
376 (main): Clear non_stop flag on reconnection. Use the event-loop.
377 Refactor serial protocol handling from here ...
378 (process_serial_event): ... to this new function. When GDB
379 selects any thread, select one here. In non-stop mode, wait until
380 GDB acks all pending events before exiting.
381 (handle_serial_event, handle_target_event): New.
382 * remote-utils.c (remote_open): Install remote_desc in the event
384 (remote_close): Remove remote_desc from the event loop.
385 (putpkt_binary): Rename to...
386 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
387 (putpkt_binary): New as wrapper around putpkt_binary_1.
389 (prepare_resume_reply): In non-stop mode, don't change the
392 * Makefile.in (OBJ): Add event-loop.o.
393 (event-loop.o): New rule.
395 * linux-low.h (pid_of): Moved here.
397 (get_lwp_thread): Use lwpid_of.
398 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
399 * linux-low.c (pid_of): Delete.
400 (inferior_pid): Use lwpid_of.
401 (linux_event_pipe): New.
402 (target_is_async_p): New.
404 (handle_extended_wait): Use lwpid_of.
405 (add_lwp): Don't set lwpid field.
406 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
407 (linux_kill_one_lwp): If killing a running lwp, stop it first.
408 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
409 (linux_detach_one_lwp): If detaching from a running lwp, stop it
410 first. Adjust to linux_wait_for_event interface changes. Use
412 (linux_detach): Don't delete the main lwp here.
413 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
414 (status_pending_p): Don't consider explicitly suspended lwps.
415 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
416 pointer. Add OPTIONS argument. Change return type to int. Use
417 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
418 (linux_wait_for_event): Take an integer pid instead of a lwp_info
419 pointer. Add status pointer argument. Return a pid instead of a
420 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
421 changes. In non-stop mode, don't switch to a random thread.
422 (linux_wait): Rename to...
423 (linux_wait_1): ... this. Add target_options argument, and handle
424 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
425 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
426 clean exit and signal exit code. Don't stop all threads in
427 non-stop mode. In all-stop mode, only stop all threads when
428 reporting a stop to GDB. Handle explicit thread stop requests.
429 (async_file_flush, async_file_mark): New.
431 (send_sigstop): Use lwpid_of.
432 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
433 interface changes. In non-stop mode, don't switch to a random
435 (linux_resume_one_lwp): Use lwpid_of.
436 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
437 (linux_resume_one_thread): ... this. Handle resume_stop. In
438 non-stop mode, don't look for pending flag in all threads.
439 (resume_status_pending_p): Don't consider explicitly suspended
441 (my_waitpid): Reimplement. Emulate __WALL.
442 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
444 (sigchld_handler, linux_supports_non_stop, linux_async)
445 (linux_start_non_stop): New.
446 (linux_target_ops): Register linux_supports_non_stop, linux_async
447 and linux_start_non_stop.
448 (initialize_low): Install SIGCHLD handler.
449 * thread-db.c (thread_db_create_event, find_one_thread)
450 (thread_db_get_tls_address): Use lwpid_of.
451 * win32-low.c (win32_detach): Adjust to use resume_kind.
452 (win32_wait): Add `options' argument.
453 * spu-low.c (spu_resume): Adjust to use resume_kind.
454 (spu_wait): Add `options' argument.
456 2009-04-01 Pedro Alves <pedro@codesourcery.com>
458 Decouple target code from remote protocol.
460 * target.h (enum target_waitkind): New.
461 (struct target_waitstatus): New.
462 (struct target_ops) <wait>: Return an unsigned long. Take a
463 target_waitstatus pointer instead of a char pointer.
465 * target.c (mywait): Change prototype to return an unsigned long.
466 Take a target_waitstatus pointer instead of a char pointer. Adjust.
467 * server.h (thread_from_wait, old_thread_from_wait): Delete
469 (prepare_resume_reply): Change prototype to take a
471 * server.c (thread_from_wait, old_thread_from_wait): Delete.
472 (last_status, last_ptid): New.
473 (start_inferior): Remove "statusptr" argument. Adjust. Return a
474 pid instead of a signal.
475 (attach_inferior): Remove "status" and "signal" parameters.
477 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
479 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
480 (handle_v_requests, myresume): Remove "status" and "signal"
482 (handle_status): New.
483 (main): Delete local `status'. Adjust.
484 * remote-utils.c: Include target.h.
485 (prepare_resume_reply): Change prototype to take a
486 target_waitstatus. Adjust.
488 * linux-low.c (linux_wait): Adjust to new target_ops->wait
490 * spu-low.c (spu_wait): Adjust.
491 * win32-low.c (enum target_waitkind, struct target_waitstatus):
493 (win32_wait): Adjust.
495 2009-04-01 Pedro Alves <pedro@codesourcery.com>
497 * target.h (struct thread_resume): Delete leave_stopped member.
498 (struct target_ops): Add a `n' argument to the `resume' callback.
499 * server.c (start_inferior): Adjust.
500 (handle_v_cont, myresume): Adjust.
501 * linux-low.c (check_removed_breakpoint): Adjust to resume
502 interface change, and to removed leave_stopped field.
503 (resume_ptr): Delete.
504 (struct thread_resume_array): New.
505 (linux_set_resume_request): Add new `arg' parameter. Adjust to
506 resume interface change.
507 (linux_continue_one_thread, linux_queue_one_thread)
508 (resume_status_pending_p): Check if the resume field is NULL
509 instead of checking the leave_stopped member.
510 (linux_resume): Adjust to the target resume interface change.
511 * spu-low.c (spu_resume): Adjust to the target resume interface
513 * win32-low.c (win32_detach, win32_resume): Ditto.
515 2009-04-01 Pedro Alves <pedro@codesourcery.com>
517 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
519 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
521 (linux_continue_one_thread): Only preserve the stepping flag if
522 there's a pending breakpoint.
524 2009-03-31 Pedro Alves <pedro@codesourcery.com>
526 * server.c (main): After the inferior having exited, call
527 remote_close before exiting gdbserver.
529 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
531 Fix size of FPSCR in Power 7 processors.
532 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
533 (PPC_FEATURE_HAS_DFP): New #define.
534 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
537 2009-03-23 Pedro Alves <pedro@codesourcery.com>
539 * server.c (handle_query) Whitespace and formatting.
541 2009-03-22 Pedro Alves <pedro@codesourcery.com>
543 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
544 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
545 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
546 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
547 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
548 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
549 Makefile.in, configure.ac: Fix whitespace throughout.
550 * configure: Regenerate.
552 2009-03-22 Pedro Alves <pedro@codesourcery.com>
554 * inferiors.c (find_inferior): Make it safe for the callback
555 function to delete the currently iterated inferior.
557 2009-03-22 Pedro Alves <pedro@codesourcery.com>
559 * Makefile.in (linuw_low_h): Move higher.
560 (thread-db.o): Depend on $(linux_low_h).
562 2009-03-17 Pedro Alves <pedro@codesourcery.com>
564 Rename "process" to "lwp" throughout.
566 * linux-low.c (all_processes): Rename to...
567 (all_lwps): ... this.
568 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
569 (add_process): Rename to ...
570 (add_lwp): ... this. Adjust.
571 (linux_create_inferior): Adjust.
572 (linux_attach_lwp): Adjust.
573 (linux_attach): Adjust.
574 (linux_kill_one_process): Rename to ...
575 (linux_kill_one_lwp): ... this. Adjust.
576 (linux_kill): Adjust.
577 (linux_detach_one_process): Rename to ...
578 (linux_detach_one_lwp): ... this. Adjust.
579 (linux_detach): Adjust.
580 (check_removed_breakpoint): Adjust.
581 (status_pending_p): Adjust.
582 (linux_wait_for_process): Rename to ...
583 (linux_wait_for_lwp): ... this. Adjust.
584 (linux_wait_for_event): Adjust.
585 (send_sigstop): Adjust.
586 (wait_for_sigstop): Adjust.
587 (stop_all_processes): Rename to ...
588 (stop_all_lwps): ... this.
589 (linux_resume_one_process): Rename to ...
590 (linux_resume_one_lwp): ... this. Adjust.
591 (linux_set_resume_request, linux_continue_one_thread)
592 (linux_queue_one_thread, resume_status_pending_p)
593 (usr_store_inferior_registers, regsets_store_inferior_registers)
594 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
596 * linux-low.h (get_process): Rename to ...
597 (get_lwp): ... this. Adjust.
598 (get_thread_process): Rename to ...
599 (get_thread_lwp): ... this. Adjust.
600 (get_process_thread): Rename to ...
601 (get_lwp_thread): ... this. Adjust.
602 (struct process_info): Rename to ...
603 (struct lwp_info): ... this.
604 (all_processes): Rename to ...
605 (all_lwps): ... this.
606 * proc-service.c (ps_lgetregs): Adjust.
607 * thread-db.c (thread_db_create_event, find_one_thread)
608 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
610 2009-03-14 Pedro Alves <pedro@codesourcery.com>
612 * server.c (handle_query): Handle "qAttached".
614 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
616 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
617 GPLv3, update license URL.
619 2009-03-01 Doug Evans <dje@google.com>
621 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
622 (server_h): Add gdb_signals.h.
624 * server.h (target_signal_from_host,target_signal_to_host_p)
625 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
627 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
629 * remote-utils.c (getpkt): Also generate remote-debug
630 information if noack_mode is set.
632 2009-02-06 Pedro Alves <pedro@codesourcery.com>
634 * server.c (handle_query): Report qXfer:siginfo:read and
635 qXfer:siginfo:write as supported and handle them.
636 * target.h (struct target_ops) <qxfer_siginfo>: New field.
637 * linux-low.c (linux_xfer_siginfo): New.
638 (linux_target_ops): Set it.
640 2009-01-26 Pedro Alves <pedro@codesourcery.com>
642 * server.c (gdbserver_usage): Mention --remote-debug.
643 (main): Accept '--remote-debug' switch.
645 2009-01-18 Doug Evans <dje@google.com>
647 * regcache.c (new_register_cache): No need to check result of xcalloc.
648 * server.c (handle_search_memory): Back out calls to xmalloc,
649 result is checked and error is returned to user upon failure.
650 (handle_query): Ditto. Add more checks for result of malloc.
651 (handle_v_cont): Check result of malloc, report error back to
653 (handle_v_run): Ditto. Call freeargv.
654 * server.h (freeargv): Declare.
655 * utils.c (freeargv): New fn.
657 2009-01-15 Doug Evans <dje@google.com>
659 * gdbreplay.c (perror_with_name): Make arg const char *.
660 * server.h (target_signal_to_name): Make return type const char *.
661 * thread-db.c (thread_db_err_str): Make return type const char *.
662 * utils.c (perror_with_name): Make arg const char *.
664 2009-01-14 Pedro Alves <pedro@codesourcery.com>
666 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
667 when handling a EXIT_PROCESS_DEBUG_EVENT.
669 2009-01-06 Joel Brobecker <brobecker@adacore.com>
671 * gdbreplay.c (gdbreplay_version): Update copyright year.
672 * server.c (gdbserver_version): Likewise.
674 2009-01-05 Doug Evans <dje@google.com>
676 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
677 (handle_extended_wait): Improve comment.
679 2008-12-13 Doug Evans <dje@google.com>
681 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
682 * server.h (ATTR_MALLOC): New macro.
683 (xmalloc,xcalloc,xstrdup): Declare.
684 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
685 * inferiors.c: Ditto.
686 * linux-low.c: Ditto.
687 * mem-break.c: Ditto.
689 * remote-utils.c: Ditto.
692 * win32-low.c: Ditto.
694 2008-12-12 Doug Evans <dje@google.com>
696 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
699 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
701 2008-12-09 Doug Evans <dje@google.com>
703 * linux-low.h (struct process_info): Delete member tid, unused.
704 * thread-db.c (find_one_thread): Update.
705 (maybe_attach_thread): Update.
707 2008-12-02 Pedro Alves <pedro@codesourcery.com>
709 * target.h (struct target_ops): Add qxfer_osdata member.
710 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
712 (linux_qxfer_osdata): New functions.
713 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
715 * server.c (handle_query): Handle "qXfer:osdata:read:".
716 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
717 (buffer_xml_printf): New functions.
718 * server.h (struct buffer): New.
719 (buffer_grow_str, buffer_grow_str0): New macros.
720 (buffer_grow, buffer_free, buffer_init, buffer_finish)
721 (buffer_xml_printf): Declare.
723 2008-11-24 Doug Evans <dje@google.com>
725 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
727 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
729 * server.c (handle_v_run): Always use the supplied argument list.
731 2008-11-19 Bob Wilson <bob.wilson@acm.org>
733 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
734 (xtensa_regmap_table): Add entry for scompare1.
736 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
738 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
739 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
740 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
741 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
742 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
743 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
744 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
745 XML target descriptions.
746 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
747 when inferior is running on an ISA 2.05 or later processor. Add
748 special case to return offset for full 64-bit slot of FPSCR when
751 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
753 * Makefile.in (SFILES, clean): Added sparc64 files.
754 (reg-sparc64.o, reg-sparc64.c): New.
755 * configure.srv (sparc*-*-linux*): New configuration.
756 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
757 syscall arguments for SPARC.
758 (regsets_store_inferior_registers): Likewise.
759 * linux-sparc-low.c: New file.
761 2008-10-21 Doug Evans <dje@google.com>
763 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
764 (READLINE_DIR,READLINE_DEP): Delete.
765 (INTERNAL_CFLAGS): Update.
768 2008-10-10 Pedro Alves <pedro@codesourcery.com>
770 * server.c (handle_v_run): If GDB didn't specify an argv, use the
771 whole argv from the last run, not just argv[0].
773 2008-09-08 Pedro Alves <pedro@codesourcery.com>
775 * regcache.c (new_register_cache): Return NULL if the register
776 cache size isn't known yet.
777 (free_register_cache): Avoid dereferencing a NULL regcache.
779 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
781 * configure.srv: Merge MIPS and MIPS64.
783 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
785 * Makefile.in (uninstall): Apply $(EXEEXT) too.
787 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
789 * Makefile.in: Add required vsx dependencies.
791 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
792 Declare init_registers_powerpc_vsx32l.
793 Declare init_registers_powerpc_vsx64l.
794 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
795 (ppc_arch_setup): Check for VSX in hwcap.
796 (ppc_fill_vsxregset): New function.
797 (ppc_store_vsxregset): New function.
798 Add new VSX entry in regset_info target_regsets.
800 * configure.srv: Add new VSX dependencies.
802 2008-08-12 Pedro Alves <pedro@codesourcery.com>
804 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
805 (remote_open): Set or clear transport_is_reliable.
806 (putpkt_binary): Don't expect acks in noack mode.
807 (getpkt): Don't send ack/nac in noack mode.
808 * server.c (handle_general_set): Handle QStartNoAckMode.
809 (handle_query): If connected by tcp pass QStartNoAckMode+ in
811 (main): Reset noack_mode on every connection.
812 * server.h (noack_mode): Declare.
814 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
816 * Makefile.in (GDBREPLAY_OBS): New variable.
817 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
819 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
820 Daniel Jacobowitz <dan@codesourcery.com>
822 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
823 (usr_store_inferior_registers): Likewise.
824 (regsets_store_inferior_registers): Likewise.
826 2008-07-31 Rolf Jansen <rj@surtec.com>
827 Pedro Alves <pedro@codesourcery.com>
829 * configure.ac: Check for memmem declaration.
830 * server.c [HAVE_MALLOC_H]: Include malloc.h.
831 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
832 (disable_packet_qfThreadInfo): Unconditionally compile.
833 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
834 * configure, config.in: Regenerate.
836 2008-07-28 Doug Kwan <dougkwan@google.com>
838 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
839 (linux_write_memory): Remove declaration of errno.
841 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
843 * linux-low.c (handle_extended_wait): Do not use "status"
844 variable uninitialized.
846 2008-07-07 Pedro Alves <pedro@codesourcery.com>
848 * server.c (handle_v_attach): Inhibit reporting dll changes.
850 2008-06-27 Pedro Alves <pedro@codesourcery.com>
852 * remote-utils.c (prepare_resume_reply): If requested, don't
853 output "thread:TID" in the T stop reply.
855 * server.c (disable_packet_vCont, disable_packet_Tthread)
856 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
857 (handle_query): If requested, disable support for qC, qfThreadInfo
859 (handle_v_requests): If requested, disable support for vCont.
860 (gdbserver_show_disableable): New.
861 (main): Handle --disable-packet and --disable-packet=LIST.
863 * server.h (disable_packet_vCont, disable_packet_Tthread)
864 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
866 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
868 * server.c (gdbserver_usage): Mention --version.
870 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
872 * Makefile.in (gdbreplay.o): New rule.
874 2008-06-06 Joseph Myers <joseph@codesourcery.com>
876 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
877 message, not gdbserver.
879 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
880 Nathan Sidwell <nathan@codesourcery.com>
881 Joseph Myers <joseph@codesourcery.com>
883 * acinclude.m4: Include ../../config/acx.m4.
884 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
885 * configure, config.in: Regenerate.
886 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
887 * server.c (gdbserver_version): Print PKGVERSION.
888 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
889 (main): Adjust gdbserver_usage calls.
890 * gdbreplay.c (version, host_name): Add declarations.
891 (gdbreplay_version, gdbreplay_usage): New.
892 (main): Accept --version and --help options.
894 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
896 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
897 (arm_breakpoint_at): Handle Thumb.
898 (the_low_target): Add comment.
900 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
902 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
904 2008-05-09 Doug Evans <dje@google.com>
906 * server.h (decode_search_memory_packet): Declare.
907 * remote-utils.c (decode_search_memory_packet): New fn.
908 * server.c (handle_search_memory_1): New fn.
909 (handle_search_memory): New fn.
910 (handle_query): Process qSearch:memory packets.
912 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
914 * regcache.c (registers_length): Remove.
915 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
916 full register packet.
917 * regcache.h (registers_length): Remove prototype.
918 * server.h (PBUFSIZ): Define to 16384.
920 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
922 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
923 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
924 powerpc-64l.o, and powerpc-altivec64l.o.
925 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
926 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
927 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
928 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
929 rs6000/power-linux.xml, and rs6000/power64-linux.xml
932 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
933 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
934 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
935 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
936 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
937 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
938 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
939 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
940 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
941 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
944 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
945 (init_registers_powerpc_32l): ... this new prototype.
946 (init_registers_powerpc_32): Remove, replace by ...
947 (init_registers_powerpc_altivec32l): ... this new prototype.
948 (init_registers_powerpc_e500): Remove, replace by ...
949 (init_registers_powerpc_e500l): ... this new prototype.
950 (init_registers_ppc64): Remove, replace by ...
951 (init_registers_powerpc_64l): ... this new prototype.
952 (init_registers_powerpc_64): Remove, replace by ...
953 (init_registers_powerpc_altivec64l): ... this new prototype.
954 (ppc_num_regs): Set to 73.
955 (PT_ORIG_R3, PT_TRAP): Define if necessary.
956 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
957 (ppc_cannot_store_register): Handle orig_r3 and trap.
958 (ppc_arch_setup): Update init_registers_... calls.
959 (ppc_fill_gregset): Handle orig_r3 and trap.
961 * inferiors.c (clear_inferiors): Reset current_inferior.
963 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
965 * acinclude.m4: Add override.m4.
966 * configure: Regenerate.
968 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
970 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
971 initial call to init_register_ppc64.
973 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
975 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
976 powerpc*-*-linux* case.
977 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
979 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
981 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
982 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
984 * linux-ppc-low.c: Include <elf.h>.
985 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
986 (ppc_hwcap): New global variable.
987 (ppc_regmap): Remove __SPE__ #ifdef sections.
988 (ppc_regmap_e500): New global variable.
989 (ppc_cannot_store_register): Update __SPE__ special case.
990 (ppc_get_hwcap): New function.
991 (ppc_arch_setup): Use it to determine whether inferior supports
992 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
993 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
994 Do not access registers if target does not support AltiVec.
995 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
996 Do not access registers if target does not support SPE.
997 (target_regsets): Unconditionally include AltiVec and SPE regsets.
999 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1001 * linux-low.c (disabled_regsets, num_regsets): New.
1002 (use_regsets_p): Delete.
1003 (linux_wait_for_process): Clear disabled_regsets.
1004 (regsets_fetch_inferior_registers): Check and set it.
1005 (regsets_store_inferior_registers): Likewise.
1006 (linux_fetch_registers, linux_store_registers): Do not use
1008 (initialize_low): Allocate disabled_regsets.
1010 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1012 * Makefile.in (LIBOBJS): New.
1014 (memmem.o): New rule.
1015 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1016 * configure: Regenerated.
1018 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1020 * server.c (handle_query): Never return "unsupported" for
1021 qXfer:features:read queries.
1023 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1025 * server.c (get_features_xml): Fix inverted condition.
1026 (handle_query): Always support qXfer:feature:read.
1028 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1030 * server.c (wrapper_argv): New.
1031 (start_inferior): Handle wrapper_argv. If set, expect an extra
1033 (gdbserver_usage): Document --wrapper.
1034 (main): Parse --wrapper.
1036 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1038 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1039 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1040 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1041 (ppc_set_pc): Likewise.
1042 (ppc_arch_setup): New function.
1043 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1044 of collect_register.
1045 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1047 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1049 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1050 instead of linux-ppc64-low.o.
1051 * linux-ppc64-low.c: Remove file.
1052 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1053 (linux-ppc64-low.o): Remove rule.
1055 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1056 (init_registers_powerpc_64): Likewise.
1057 (ppc_regmap): Conditionally define depending on __powerpc64__.
1058 (ppc_cannot_store_register): Do not special-case "fpscr" when
1059 compiled on __powerpc64__.
1060 (ppc_collect_ptrace_register): New function.
1061 (ppc_supply_ptrace_register): New function.
1062 (ppc_breakpoint): Change type to "unsigned int".
1063 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1064 (the_low_target): Conditionally provide initializers for the
1065 arch_setup member depending on __powerpc64__. Install
1066 collect_ptrace_register and supply_ptrace_register members.
1068 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1070 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1071 * server.c (gdbserver_xmltarget): Define.
1072 (get_features_xml): Use it to replace "target.xml" and arch_string.
1074 * configure.srv: Remove srv_xmltarget. Add XML files that were
1075 mentioned there to srv_xmlfiles instead. Remove conditional tests
1076 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1077 srv_xmlfiles and srv_regobj to include all possible choices.
1078 * configure.ac (srv_xmltarget): Remove.
1079 (srv_xmlfiles): Do not add "target.xml".
1080 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1081 checks for supplementary target information.
1082 * configure: Regenerate.
1083 * Makefile.in (XML_TARGET): Remove.
1084 (target.xml): Remove rule.
1085 (clean): Do not clean up target.xml.
1086 (.PRECIOUS): Do not mention target.xml.
1088 * target.h (struct target_ops): Remove arch_string member.
1089 * linux-low.c (linux_arch_string): Remove.
1090 (linux_target_ops): Remove arch_string initializer.
1091 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1092 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1093 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1094 * spu-low.c (spu_arch_string): Remove.
1095 (spu_target_ops): Remove arch_string initializer.
1096 * win32-low.c (win32_arch_string): Remove.
1097 (win32_target_ops): Remove arch_string initializer.
1098 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1099 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1100 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1102 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1104 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1105 by collect_ptrace_register and supply_ptrace_register hooks.
1106 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1107 instead of checking for the_low_target.left_pad_xfer.
1108 (usr_store_inferior_registers): Use collect_ptrace_register callback
1109 instead of checking for the_low_target.left_pad_xfer.
1111 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1112 (s390_supply_ptrace_register): Likewise.
1113 (s390_fill_gregset): Call s390_collect_ptrace_register.
1114 (the_low_target): Update.
1116 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1117 (ppc_supply_ptrace_register): Likewise.
1118 (the_low_target): Update.
1120 * linux-i386-low.c (the_low_target): Update.
1121 * linux-x86-64-low.c (the_low_target): Update.
1123 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1125 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1126 reg-s390.o and reg-s390x.o.
1128 * linux-low.c (new_inferior): New global variable.
1129 (linux_create_inferior, linux_attach): Set it.
1130 (linux_wait_for_process): Call the_low_target.arch_setup after the
1131 target has stopped for the first time.
1132 (initialize_low): Do not call the_low_target.arch_setup.
1134 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1135 (s390_set_pc): Likewise.
1136 (s390_arch_setup): New function.
1137 (the_low_target): Use s390_arch_setup as arch_setup routine.
1139 * regcache.c (realloc_register_cache): New function.
1140 (set_register_cache): Call it for each existing regcache.
1142 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1144 * server.h (init_registers): Remove prototype.
1146 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1147 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1148 instead of init_registers ().
1149 * linux-arm-low.c (init_registers_arm): Add prototype.
1150 (init_registers_arm_with_iwmmxt): Likewise.
1151 (the_low_target): Add initializer for arch_setup field.
1152 * linux-cris-low.c (init_registers_cris): Add prototype.
1153 (the_low_target): Add initializer for arch_setup field.
1154 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1155 (the_low_target): Add initializer for arch_setup field.
1156 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1157 (the_low_target): Add initializer for arch_setup field.
1158 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1159 (the_low_target): Add initializer for arch_setup field.
1160 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1161 (the_low_target): Add initializer for arch_setup field.
1162 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1163 (the_low_target): Add initializer for arch_setup field.
1164 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1165 (init_registers_mips64_linux): Likewise.
1166 (the_low_target): Add initializer for arch_setup field.
1167 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1168 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1169 (the_low_target): Add initializer for arch_setup field.
1170 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1171 (init_registers_powerpc_64): Likewise.
1172 (the_low_target): Add initializer for arch_setup field.
1173 * linux-s390-low.c (init_registers_s390): Add prototype.
1174 (init_registers_s390x): Likewise.
1175 (the_low_target): Add initializer for arch_setup field.
1176 * linux-sh-low.c (init_registers_sh): Add prototype.
1177 (the_low_target): Add initializer for arch_setup field.
1178 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1179 (the_low_target): Add initializer for arch_setup field.
1180 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1181 (the_low_target): Add initializer for arch_setup field.
1183 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1184 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1185 instead of init_registers ().
1186 * win32-arm-low.c (init_registers_arm): Add prototype.
1187 (the_low_target): Add initializer for arch_setup field.
1188 * win32-i386-low.c (init_registers_i386): Add prototype.
1189 (the_low_target): Add initializer for arch_setup field.
1191 * spu-low.c (init_registers_spu): Add prototype.
1192 (initialize_low): Call initialie_registers_spu () instead of
1193 initialize_registers ().
1195 2008-02-19 Pedro Alves <pedro@codesourcery.com>
1197 * server.c (handle_v_requests): When handling the vRun and vAttach
1198 packets, if already debugging a process, don't kill it. Return an
1201 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1203 * server.c (handle_query): Correct length check.
1205 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1207 * win32-low.c (do_initial_child_stuff): Add process handle
1208 parameter. Set current_process_handle and current_process_id from the
1209 parameters. Clear globals.
1210 (win32_create_inferior): Don't set current_process_handle and
1211 current_process_id here. Instead pass them on the call to
1212 do_initial_child_stuff.
1213 (win32_attach): Likewise.
1214 (win32_clear_inferiors): New.
1215 (win32_kill): Don't close the current process handle or the
1216 current thread handle here. Instead call win32_clear_inferiors.
1217 (win32_detach): Don't open a new handle to the process. Call
1218 win32_clear_inferiors.
1219 (win32_join): Don't rely on current_process_handle; open a new
1220 handle using the process id.
1221 (win32_wait): Call win32_clear_inferiors when the inferior process
1224 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1226 * server.c (monitor_show_help): Add "exit".
1228 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1230 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1231 (clean): Add reg-xtensa.c.
1232 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
1233 * configure.srv (xtensa*-*-linux*) New target.
1234 * linux-xtensa-low.c: New.
1235 * xtensa-xtregs.c: New.
1237 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1239 * hostio.c: Don't include errno.h.
1240 (errno_to_fileio_errno): Move to hostio-errno.
1241 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1242 error number outputting to the target->hostio_last_error callback.
1243 (hostio_packet_error): Use FILEIO_EINVAL directly.
1244 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1245 calls to hostio_error.
1246 * hostio-errno.c: New.
1247 * server.h (hostio_last_error_from_errno): Declare.
1248 * target.h (target_ops): Add hostio_last_error member.
1249 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1250 as hostio_last_error handler.
1251 * spu-low.c (spu_target_ops): Likewise.
1252 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1253 (wince_hostio_last_error): New functions.
1254 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1255 as hostio_last_error handler.
1256 (win32_target_ops) [!_WIN32_WCE]: Register
1257 hostio_last_error_from_errno as hostio_last_error handler.
1258 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1259 (hostio-errno.o): New rule.
1260 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1261 * configure.srv (srv_hostio_err_objs): New variable. Default to
1263 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1264 * configure: Regenerate.
1266 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1268 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1269 (linux_kill, linux_detach): Clean up the process list.
1270 * remote-utils.c (remote_open): Improve port number parsing.
1271 (putpkt_binary, input_interrupt): Only send interrupts if the target
1273 * server.c (extended_protocol): Make static.
1274 (attached): Define earlier.
1275 (exit_requested, response_needed, program_argv): New variables.
1276 (target_running): New.
1277 (start_inferior): Clear attached here.
1278 (attach_inferior): Set attached here.
1279 (require_running): Define.
1280 (handle_query): Use require_running and target_running. Implement
1282 (handle_v_attach, handle_v_run): New.
1283 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1284 (gdbserver_usage): Update.
1285 (main): Redo argument parsing. Handle --debug and --multi. Handle
1286 --attach along with other options or after the port. Save
1287 program_argv. Support no initial program. Resynchronize
1288 communication with GDB after an error. Handle "monitor exit".
1289 Use require_running and target_running. Always allow the extended
1290 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1291 restart in extended mode.
1292 * README: Refer to the GDB manual. Update --attach usage.
1294 2007-12-20 Andreas Schwab <schwab@suse.de>
1296 * linux-low.c (STACK_SIZE): Define.
1297 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1298 (linux_test_for_tracefork): Likewise.
1300 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1302 * linux-low.c (linux_wait_for_event): Update messages. Do not
1303 reinsert auto-delete breakpoints.
1304 * mem-break.c (struct breakpoint): Change return type of handler to
1306 (set_breakpoint_at): Update handler type.
1307 (reinsert_breakpoint_handler): Return 1 instead of calling
1309 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1311 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1312 * mem-break.h (set_breakpoint_at): Update handler type.
1313 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1314 * win32-low.c (auto_delete_breakpoint): New.
1315 (get_child_debug_event): Use it.
1317 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1319 * configure.ac: Check for pread and pwrite.
1320 * hostio.c (handle_pread): Fall back to lseek and read.
1321 (handle_pwrite): Fall back to lseek and write.
1322 * config.in, configure: Regenerated.
1324 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1326 * server.c (myresume): Add own_buf argument.
1327 (main): Update calls.
1329 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1331 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1332 * remote-utils.c (remote_open): Do not call disable_async_io.
1333 (block_async_io): Delete.
1334 (unblock_async_io): Make static.
1335 (initialize_async_io): New.
1336 * server.c (handle_v_cont): Handle async I/O here.
1337 (myresume): Likewise. Move other common resume tasks here...
1338 (main): ... from here. Call initialize_async_io. Disable async
1339 I/O before the main loop.
1340 * server.h (initialize_async_io): Declare.
1341 (block_async_io, unblock_async_io): Delete prototypes.
1342 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1344 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1346 * remote-utils.c (readchar): Allow binary data in received messages.
1348 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1350 * win32-low.c (attaching): New global.
1351 (win32_create_inferior): Clear the `attaching' global.
1352 (win32_attach): Set the `attaching' global.
1353 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1354 attaching. Only set a breakpoint at the entry point if not
1357 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1359 * server.c (main): Don't report dll events on the initial
1360 connection on attaches.
1362 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1364 * server.c (main): Relax numerical bases supported for the pid of
1365 the --attach command line argument.
1367 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1369 * win32-low.c (win32_attach): Call OpenProcess before
1370 DebugActiveProcess, not after. Add last error output to error
1373 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1375 * win32-low.c (win32_get_thread_context)
1376 (win32_set_thread_context): New functions.
1377 (thread_rec): Use win32_get_thread_context.
1378 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1379 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1382 2007-12-03 Leo Zayas
1383 Pedro Alves <pedro_alves@portugalmail.pt>
1385 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1387 (child_add_thread): Minor cleanup.
1388 (child_continue): Resume artificially suspended threads before
1389 calling ContinueDebugEvent.
1390 (suspend_one_thread): New.
1391 (fake_breakpoint_event): New.
1392 (get_child_debug_event): Change return type to int. Check here if
1393 gdb sent an interrupt request. If a soft interrupt was requested,
1394 fake a breakpoint event. Return 0 if there is no event to handle,
1396 (win32_wait): Don't check here if gdb sent an interrupt request.
1397 Ensure there is a valid event to handle.
1398 (win32_request_interrupt): Add soft interruption method as last
1401 2007-12-03 Leo Zayas
1402 Pedro Alves <pedro_alves@portugalmail.pt>
1404 * win32-low.h (win32_thread_info): Add descriptions to the
1405 structure members. Replace `suspend_count' counter by a
1407 * win32-low.c (thread_rec): Update condition of when to get the
1408 context from the inferior. Rely on ContextFlags being set if it
1409 has already been retrieved. Only suspend the inferior thread if
1410 we haven't already. Warn if that fails.
1411 (continue_one_thread): s/suspend_count/suspended/. Only call
1412 ResumeThread once. Warn if that fails.
1414 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1416 * win32-low.c (win32_wait): Don't read from the inferior when it
1419 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1421 * Makefile.in (win32_low_h): New variable.
1422 (win32-low.o): Add dependency on $(win32_low_h).
1423 (win32-arm-low.o, win32-i386-low.o): New rules.
1425 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1427 * hostio.c: Correct copyright year.
1429 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1431 * Makefile.in (OBS): Add hostio.o.
1432 (hostio.o): New rule.
1433 * server.h (handle_vFile): Declare.
1434 * hostio.c: New file.
1435 * server.c (handle_v_requests): Take packet_len and new_packet_len
1436 for binary packets. Call handle_vFile.
1437 (main): Update call to handle_v_requests.
1439 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1441 * linux-low.c: Include <sched.h>.
1443 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1445 * linux-low.c (linux_tracefork_grandchild): New.
1446 (linux_tracefork_child): Use clone.
1447 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1449 2007-10-31 Joel Brobecker <brobecker@adacore.com>
1451 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1453 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1455 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1457 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1459 * inferiors.c (change_inferior_id): Delete.
1460 (add_pid_to_list, pull_pid_from_list): New.
1461 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1462 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1463 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1464 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1465 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1466 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1467 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1468 (using_threads): Always set to 1.
1469 (handle_extended_wait): New.
1470 (add_process): Do not set TID.
1471 (linux_create_inferior): Set must_set_ptrace_flags.
1472 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1473 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1474 (linux_thread_alive): Rename TID argument to LWPID.
1475 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1476 (linux_wait_for_event): Do not use TID or check using_threads. Update
1477 call to dead_thread_notify. Call handle_extended_wait.
1478 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1479 (send_sigstop): Delete sigstop_sent.
1480 (wait_for_sigstop): Avoid TID.
1481 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1482 (linux_test_for_tracefork): New.
1483 (linux_lookup_signals): Use thread_db_active and
1484 linux_supports_tracefork_flag.
1485 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1486 * linux-low.h (get_process_thread): Avoid TID.
1487 (struct process_ifo): Move thread_known and tid to the end. Remove
1489 (linux_attach_lwp, thread_db_init): Update prototypes.
1490 * server.h (change_inferior_id): Delete prototype.
1491 (add_pid_to_list, pull_pid_from_list): New prototypes.
1492 * thread-db.c (thread_db_use_events): New.
1493 (find_first_thread): Rename to...
1494 (find_one_thread): ...this. Update callers and messages. Do not
1495 call fatal. Check thread_db_use_events. Do not call
1496 change_inferior_id or new_thread_notify.
1497 (maybe_attach_thread): Update. Do not call new_thread_notify.
1498 (thread_db_init): Set thread_db_use_events. Check use_events.
1499 * utils.c (fatal, warning): Correct message prefix.
1501 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1503 * Makefile.in (clean): Remove new files.
1504 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1505 (powerpc-64.o, powerpc-64.c): New rules.
1506 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1507 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1509 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1511 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1512 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1513 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1514 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1515 (target_regsets): Add AltiVec and SPE register sets.
1516 * configure.ac: Check for AltiVec and SPE.
1517 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1518 (ppc_fill_vrregset, ppc_store_vrregset): New.
1519 (target_regsets): Add AltiVec register set.
1520 * configure: Regenerated.
1522 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1524 * linux-low.c (O_LARGEFILE): Define.
1525 (linux_read_memory): Use /proc/PID/mem.
1526 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1527 * configure, config.in: Regenerated.
1529 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1531 * linux-low.c (linux_wait_for_event): Do not pass signals while
1534 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1536 * win32-low.c (create_process): New.
1537 (win32_create_inferior): Use create_process instead of
1538 CreateProcess. If create_process failed retry appending an ".exe"
1539 suffix. Store the GetLastError result immediatelly after
1540 create_process calls and use it on the call to error.
1542 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1544 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1546 2007-08-23 Joel Brobecker <brobecker@adacore.com>
1548 * configure.ac: Switch license to GPLv3.
1550 2007-08-01 Michael Snyder <msnyder@access-company.com>
1552 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1554 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1556 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1558 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1559 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1560 CloseToolhelp32Snapshot.
1561 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1562 CloseToolhelp32Snapshot.
1564 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
1566 * server.c (main): Check for inferior exit before main loop.
1568 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1570 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1571 instead of on tmp_desc.
1573 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1574 Daniel Jacobowitz <dan@codesourcery.com>
1576 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1577 (add_thread): Minor cleanups.
1578 (clear_inferiors): Move lower in the file. Clear the DLL
1580 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1581 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1582 (xml_escape_text): New.
1583 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1585 (handle_v_cont): Report errors.
1586 (gdbserver_version): Update.
1587 (main): Correct size of own_buf. Do not report initial DLL events.
1588 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1589 (unloaded_dll, xml_escape_text): New.
1590 * win32-low.c (enum target_waitkind): Update comments.
1591 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1592 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1593 (win32_EnumProcessModules, win32_GetModuleInformation)
1594 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1595 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1596 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1597 (win32_Module32First, win32_Module32Next, load_toolhelp)
1598 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1599 (get_child_debug_event): Handle DLL events.
1600 (win32_wait): Likewise.
1602 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1604 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1605 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1607 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1609 * win32-low.c (handle_output_debug_string): Ignore event if not
1612 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1614 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1616 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1618 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1620 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1622 * inferiors.c (change_inferior_id): Add comment.
1623 * linux-low.c (check_removed_breakpoint): Add an early
1624 prototype. Improve debug output.
1625 (linux_attach): Doc update.
1626 (linux_detach_one_process, linux_detach): Clean up before releasing
1628 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1629 * linux-low.h (struct process_info): Doc improvement.
1630 * mem-break.c (delete_all_breakpoints): New.
1631 * mem-break.h (delete_all_breakpoints): New prototype.
1632 * thread-db.c (find_first_thread): New.
1633 (thread_db_create_event): Call it instead of
1634 thread_db_find_new_threads. Clean up unused variables.
1635 (maybe_attach_thread): Remove first thread handling.
1636 (thread_db_find_new_threads): Use find_first_thread.
1637 (thread_db_get_tls_address): Likewise.
1639 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1641 * thread-db.c (thread_db_find_new_threads): Add prototype.
1642 (thread_db_create_event): Check for the main thread before adding
1644 (maybe_attach_thread): Only enable event reporting if TID == 0.
1645 (thread_db_get_tls_address): Check for new threads.
1647 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1649 * linux-low.c (linux_create_inferior): Try execv before execvp.
1650 * spu-low.c (spu_create_inferior): Likewise.
1652 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1654 * linux-low.c (linux_create_inferior): Change execv to execvp.
1655 * spu-low.c (spu_create_inferior): Likewies.
1657 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1659 * Makefile.in (clean): Clean new files instead of deleted ones.
1660 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1661 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1663 * configure.srv: Specify XML files and new regformats for MIPS and
1665 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1666 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1667 an entry for the restart register.
1668 (mips_cannot_fetch_register, mips_cannot_store_register)
1669 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1670 register names to match the XML descriptions.
1671 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1672 restart register instead of $0.
1674 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1675 Markus Deuling <deuling@de.ibm.com>
1677 * remote-utils.c (decode_xfer_write): New function.
1678 * server.h (decode_xfer_write): Add prototype.
1679 * server.c (handle_query): Add PACKET_LEN argument. Support
1680 qXfer:spu:read and qXfer:spu:write packets.
1681 (main): Pass packet_len to handle_query.
1682 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1683 * target.h (target_ops): Add qxfer_spu.
1685 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1687 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1688 accessing non-seekable spufs files.
1690 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1692 * server.c (handle_query): Add reply for qC packet.
1694 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1695 Leo Zayas <lerele@champenstudios@com>
1697 * server.h (check_remote_input_interrupt_request): New function.
1698 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1699 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1700 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1701 (check_remote_input_interrupt_request): New function.
1702 * server.h (check_remote_input_interrupt_request): Declare.
1703 * win32-low.c (winapi_DebugBreakProcess,
1704 winapi_GenerateConsoleCtrlEvent): New typedefs.
1705 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1707 (win32_wait): Check for remote interrupt request
1708 with check_remote_input_interrupt_request.
1709 (win32_request_interrupt): New function.
1710 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1712 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1714 * win32-low.c (debug_registers_changed,
1715 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1716 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1717 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1718 (thread_rec): Get context using the low target.
1719 (child_add_thread): Call thread_added on the low target,
1720 which does the same thing.
1722 (do_initial_child_stuff): Remove debug registers references.
1723 Set context using the low target. Resume threads after
1724 setting the contexts.
1725 (child_continue): Remove dead variable. Remove debug
1726 registers references.
1727 (child_fetch_inferior_registers): Go through the low target.
1728 (do_child_store_inferior_registers): Remove.
1729 (child_store_inferior_registers): Go through the low target.
1730 (win32_resume): Remove debug registers references.
1731 Set context using the low target.
1732 (handle_exception): Change return type to void. Don't record
1733 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1734 first chance exception.
1735 (get_child_debug_event): Change return type to void. Remove
1736 goto loop. Always return after waiting for debug event.
1737 (win32_wait): Convert to switch statement. Handle spurious
1740 * win32-i386-low.c (debug_registers_changed,
1741 debug_registers_used): New.
1742 (initial_stuff): Rename to ...
1743 (i386_initial_stuff): ... this. Clear debug registers
1745 (store_debug_registers): Delete.
1746 (i386_get_thread_context): New.
1747 (load_debug_registers): Delete.
1748 (i386_set_thread_context): New.
1749 (i386_thread_added): New.
1750 (single_step): Rename to ...
1751 (i386_single_step): ... this.
1752 (do_fetch_inferior_registers): Rename to ...
1753 (i386_fetch_inferior_register): ... this.
1754 (i386_store_inferior_register): New.
1755 (the_low_target): Adapt to new interface.
1757 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1758 (arm_get_thread_context): New.
1759 (arm_set_thread_context): New.
1761 (do_fetch_inferior_registers): Rename to ...
1762 (arm_fetch_inferior_register): ... this.
1763 (arm_store_inferior_register): New.
1764 (arm_wince_breakpoint): Reimplement as unsigned long.
1765 (arm_wince_breakpoint_len): Define.
1766 (the_low_target): Adapt to new interface.
1768 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1769 load_debug_registers. Add get_thread_context, set_thread_context,
1770 thread_added and store_inferior_register. Rename
1771 fetch_inferior_registers to fetch_inferior_register.
1772 (regptr): Remove declaration.
1774 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1776 * linux-low.c (linux_detach): Change return type to int. Return 0.
1777 * spu-low.c (spu_detach): Likewise.
1779 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1781 * target.h (target_ops): Change return type of detach to int.
1783 (join_inferior): New.
1784 * server.c (main): Don't skip detach support on mingw32.
1785 If the inferior doesn't support detaching return error.
1786 Call join_inferior instead of using waitpid.
1787 * linux-low.c (linux_join): New.
1788 (linux_target_op): Add linux_join.
1789 * spu-low.c (spu_join): New.
1790 (spu_target_ops): Add spu_join.
1791 * win32-low.c (win32_detach): Adapt to new interface.
1792 Reopen current_process_handle before detaching. Issue a child
1793 resume before detaching.
1795 (win32_target_op): Add win32_join.
1797 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1799 * win32-low.c (win32-attach): Fix return value.
1800 * target.h (target_ops): Describe ATTACH return values.
1802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1804 * win32-low.c (GETPROCADDRESS): Define.
1805 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1806 (winapi_DebugSetProcessKillOnExit): Likewise.
1807 (win32_create_inferior): Force usage of ansi CreateProcessA.
1808 (win32_attach): Use GETPROCADDRESS.
1809 (win32_detach): Likewise.
1811 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1813 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1815 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1817 * win32-low.c: Commit leftover changes from 2007-03-29.
1819 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1821 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1822 fields short instead of int. Add explicit padding.
1823 (i387_cache_to_fsave): Remove unnecessary casts.
1824 (i387_fsave_to_cache): Doc fix.
1825 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1827 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1829 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1830 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1832 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1834 * configure.srv (arm*-*-mingw32ce*): Move near the other
1837 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1839 * configure.ac: Add errno checking.
1840 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1841 sys/file.h and malloc.h.
1842 (AC_CHECK_DECLS): Add perror.
1843 (srv_mingwce): Handle.
1844 * configure.srv (i[34567]86-*-cygwin*): Add
1845 win32-i386-low.o to srv_tgtobj.
1846 (i[34567]86-*-mingw*): Likewise.
1847 (arm*-*-mingw32ce*): Add case.
1848 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1849 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1850 [__MINGW32CE__] (strerror): New function.
1851 [__MINGW32CE__] (errno): Define to GetLastError.
1852 [__MINGW32CE__] (COUNTOF): New macro.
1853 (remote_open): Remove extra close call.
1854 * mem-break.c (delete_breakpoint_at): New function.
1855 * mem-break.h (delete_breakpoint_at): Declare.
1856 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1857 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1858 [USE_WIN32API] (read, write): Add char* casts.
1859 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1860 * server.h: Include wincecompat.h on Windows CE.
1861 [HAVE_ERRNO_H]: Check.
1862 (perror): Declare if not declared.
1863 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1864 (perror_with_name): Remove errno declaration.
1865 * wincecompat.h: New.
1866 * wincecompat.c: New.
1868 * win32-arm-low.c: New.
1869 * win32-i386-low.c: New.
1870 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1871 (OUTMSG2): Make it safe.
1873 (COUNTOF): New macro.
1874 (NUM_REGS): Get it from the low target.
1875 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1876 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1877 (thread_rec): Let low target handle debug registers.
1878 (child_add_thread): Likewise.
1879 (child_init_thread_list): Likewise.
1880 (continue_one_thread): Likewise.
1882 (do_child_fetch_inferior_registers): Move to ...
1883 * win32-i386-low.c: ... here, and rename to ...
1884 (do_fetch_inferior_registers): ... this.
1885 * win32-low.c (child_fetch_inferior_registers):
1886 Go through the low target.
1887 (do_child_store_inferior_registers): Use regptr.
1888 (strwinerror): New function.
1889 (win32_create_inferior): Handle Windows CE.
1890 Use strwinerror instead of strerror on Windows error
1891 codes. Add program to the error output.
1892 Don't close the main thread handle on Windows CE.
1893 (win32_attach): Use coredll.dll on Windows CE.
1894 (win32_kill): Close current process and current
1896 (win32_detach): Use coredll.dll on Windows CE.
1897 (win32_resume): Let low target handle debug registers, and
1899 (handle_exception): Add/Remove initial breakpoint. Avoid
1900 non-existant WSTOPSIG on Windows CE.
1901 (win32_read_inferior_memory): Cast to remove warning.
1902 (win32_arch_string): Go through the low target.
1903 (initialize_low): Call set_breakpoint_data with the low
1904 target's breakpoint.
1905 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1906 FOP_REGNUM, mappings): Move to ...
1907 * win32-i386-low.c: ... here.
1908 * win32-low.c (win32_thread_info): Move to ...
1909 * win32-low.h: ... here.
1910 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1911 win32-arm-low.c and wincecompat.c.
1912 (all:): Add $EXEEXT.
1913 (install-only:): Likewise.
1914 (gdbserver:): Likewise.
1915 (gdbreplay:): Likewise.
1916 * config.in: Regenerate.
1917 * configure: Regenerate.
1919 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1921 * win32-low.c: Rename typedef thread_info to
1922 win32_thread_info throughout.
1924 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1926 * win32-i386-low.c: Rename to ...
1927 * win32-low.c: ... this.
1928 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1929 * Makefile.in: Likewise.
1931 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1933 * remote-utils.c (monitor_output): Constify msg parameter.
1934 * server.h (monitor_output): Likewise.
1935 * win32-i386-low.c (handle_output_debug_string): New.
1936 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1937 handle_output_debug_string.
1938 (get_child_debug_event): Likewise.
1940 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1942 * server.c (main): Correct strtoul check.
1944 2007-03-27 Jon Ringle <jon@ringle.org>
1946 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1948 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1950 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1952 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1954 * terminal.h: Check HAVE_SGTTY_H.
1956 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1958 * remote-utils.c (remote_open): Print out the assigned port number.
1960 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1962 * remote-utils.c (monitor_output): New function.
1963 * server.c (debug_threads): Define here.
1964 (monitor_show_help): New function.
1965 (handle_query): Handle qRcmd.
1966 (main): Do not handle 'd' packet.
1967 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1968 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1971 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1973 * Makefile.in (EXEEXT): New.
1974 (clean): Use $(EXEEXT).
1976 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1978 * target.h (target_ops): Rename send_signal to request_interrupt,
1979 and remove enum target_signal parameter.
1980 * linux-low.c (linux_request_interrupt): Rename from
1981 linux_send_signal, and always send SIGINT.
1982 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1983 and always send SIGINT.
1984 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1986 (input_interrupt): Likewise.
1988 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1990 * server.c (get_features_xml): Check if target implemented
1992 * win32-i386-low.c (win32_arch_string): New.
1993 (win32_target_ops): Add win32_arch_string as arch_string member.
1995 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1997 * spu-low.c (spu_arch_string): New.
1998 (spu_target_ops): Add spu_arch_string.
2000 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2002 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2003 * configure.ac: Do not check for terminal.h.
2004 * configure, config.in: Regenerated.
2006 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2008 * Makefile.in (OBS): Add $(XML_BUILTIN).
2009 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2011 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2012 (arm-with-iwmmxt.c): New.
2013 * config.in, configure: Regenerate.
2014 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2015 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2016 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2017 (arm*-*-linux*): Add iWMMXt and regset support.
2018 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2019 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2020 (arm_store_wmmxregset, target_regsets): New.
2021 * server.c (get_features_xml): Take annex argument. Check builtin
2023 (handle_query): Handle multiple annexes.
2025 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2027 * remote-utils.c [USE_WIN32API] (read, write): Define.
2028 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2031 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2033 * linux-i386-low.c (the_low_target): Set arch_string.
2034 * linux-x86-64-low.c (the_low_target): Likewise.
2035 * linux-low.c (linux_arch_string): New.
2036 (linux_target_ops): Add it.
2037 * linux-low.h (struct linux_target_ops): Add arch_string.
2038 * server.c (write_qxfer_response): Use const void * for DATA.
2039 (get_features_xml): New.
2040 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2041 * target.h (struct target_ops): Add arch_string method.
2043 2007-01-03 Denis Pilat <denis.pilat@st.com>
2044 Daniel Jacobowitz <dan@codesourcery.com>
2046 * linux-low.c (linux_kill): Handle being called with no threads.
2047 * win32-i386-low.c (win32_kill): Likewise.
2048 (get_child_debug_event): Clear current_process_handle.
2050 2006-12-30 Denis PILAT <denis.pilat@st.com>
2051 Daniel Jacobowitz <dan@codesourcery.com>
2053 * remote-utils.c (remote_open): Check the type of specified
2054 serial port devices before opening them.
2055 * server.c (main): Kill the inferior if an error occurs during
2056 the first remote_open.
2058 2006-12-05 Markus Deuling <deuling@de.ibm.com>
2060 * README: Update supported targets.
2062 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2064 * Makefile.in (clean): Remove reg-mips64.c.
2065 (reg-mips64.c, reg-mips64.o): New rules.
2066 * configure.srv: Handle mips64. Include regset support for mips.
2067 * linux-mips-low.c (union mips_register): New.
2068 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2069 (mips_breakpoint, mips_breakpoint_at): Use int.
2070 (mips_collect_register, mips_supply_register)
2071 (mips_collect_register_32bit, mips_supply_register_32bit)
2072 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2073 (mips_store_fpregset, target_regsets): New.
2074 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2076 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2078 * configure.srv: Add target "spu*-*-*".
2079 * Makefile.in (clean): Remove reg-spu.c.
2080 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2081 * spu-low.c: New file.
2083 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2085 * configure.ac: Correct td_thr_tls_get_addr test.
2086 * configure: Regenerated.
2088 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2090 * linux-low.c (linux_wait_for_event): Reformat. Use the
2092 * remote-utils.c (decode_address_to_semicolon): New.
2093 * server.c (pass_signals, handle_general_set): New.
2094 (handle_query): Mention QPassSignals for qSupported.
2095 (main): Call handle_general_set.
2096 * server.h (pass_signals, decode_address_to_semicolon): New.
2098 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2100 * server.c (handle_query): Correct error handling for read_auxv.
2102 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2104 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2105 and srv_linux_thread_db to yes.
2106 * linux-s390-low.c (s390_fill_gregset): New function.
2107 (target_regsets): Define data structure.
2109 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2111 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2112 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2113 * config.in, configure: Regenerated.
2114 * inferiors.c (gdb_id_to_thread): New function.
2115 (gdb_id_to_thread_id): Use it.
2116 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2117 * linux-low.h (struct process_info): Add th member.
2118 (thread_db_get_tls_address): New prototype.
2119 * remote-utils.c (decode_address): Make non-static.
2120 * server.c (handle_query): Handle qGetTLSAddr.
2121 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2122 * target.h (struct target_ops): Add get_tls_address.
2123 * thread-db.c (maybe_attach_thread): Save the thread handle.
2124 (thread_db_get_tls_address): New.
2126 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2128 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2129 (linux_resume_one_process): Take a siginfo_t *. Update all
2130 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2131 (struct pending_signals): Add a siginfo_t.
2132 (linux_wait_for_process): Always set last_status.
2133 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2134 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2135 * linux-low.h (struct process_info): Add last_status.
2137 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2139 * remote-utils.c (try_rle): New function.
2140 (putpkt_binary): Use it.
2142 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2144 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2145 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2146 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2147 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2148 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2151 2006-08-08 Richard Sandiford <richard@codesourcery.com>
2153 * server.c (terminal_fd): New variable.
2154 (old_foreground_pgrp): Likewise.
2155 (restore_old_foreground_pgrp): New function.
2156 (start_inferior): Record the terminal file descriptor in terminal_fd
2157 and its original foreground group in old_foreground_pgrp. Register
2158 restore_old_foreground_pgrp with atexit().
2160 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2162 * server.c (handle_query): Correct qPart to qXfer.
2164 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2166 * configure.ac: Check for more headers which are missing on
2167 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2168 * configure.srv: Add Cygwin and mingw32.
2169 * remote-utils.c: Don't include headers unconditionally which
2170 are missing on mingw32. Include <winsock.h> for mingw32.
2171 (remote_open): Adjust for mingw32 support. Flush
2172 standard error after writing to it.
2173 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2174 (unblock_async_io, enable_async_io, disable_async_io)
2175 (readchar, getpkt): Update for Winsock support.
2176 (prepare_resume_reply): Expect a protocol signal number.
2177 * server.c: Disable <sys/wait.h> on mingw32.
2178 (start_inferior): Adjust for mingw32 support. Flush
2179 standard error after writing to it.
2180 (attach_inferior): Likewise. Use protocol signal
2182 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2184 * win32-i386-low.c: New file.
2185 * Makefile.in (XM_CLIBS): Set.
2186 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2187 (win32-i386-low.o): New dependency rule.
2188 * linux-low.c (linux_wait): Use target signal numbers.
2189 * target.h (struct target_ops): Doc fix.
2190 * server.h (target_signal_to_name): New prototype.
2191 * gdbreplay.c: Don't include headers unconditionally which
2192 are missing on mingw32. Include <winsock.h> for mingw32.
2193 (remote_close, remote_open): Adjust for Winsock support.
2194 * configure, config.in: Regenerated.
2196 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2198 * server.c (decode_xfer_read, write_qxfer_response): New.
2199 (handle_query): Take a packet length argument. Handle
2200 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2201 the qSupported response.
2202 (main): Update call to handle_query.
2204 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2206 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2207 (putpkt_binary): Renamed from putpkt and adjusted for binary
2209 (putpkt): New wrapper for putpkt_binary.
2210 (readchar): Don't mask off the high bit.
2211 (decode_X_packet): New function.
2212 * server.c (main): Call putpkt_binary if a handler sets the packet
2213 length. Save the length of the incoming packet. Handle 'X'.
2214 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2216 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2218 * server.c (handle_query): Handle qSupported.
2220 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2222 * remote-utils.c (all_symbols_looked_up): New variable.
2223 (look_up_one_symbol): Check it.
2224 * server.h (look_up_one_symbol): New declaration.
2225 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2227 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2229 * Makefile.in (linux-arm-low.o): Update dependencies.
2230 * linux-arm-low.c: Include "gdb_proc_service.h".
2231 (PTRACE_GET_THREAD_AREA): Define.
2232 (ps_get_thread_area): New function.
2234 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2236 * configure.srv (m68k*-*-uclinux*): New target.
2237 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2238 (linux_resume_one_process): Remove extraneous cast.
2239 (linux_read_offsets): New.
2240 (linux_target_op): Add linux_read_offsets on mmuless systems.
2241 * server.c (handle_query): Add qOffsets logic.
2242 * target.h (struct target_ops): Add read_offsets.
2244 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2246 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2247 (PTRACE_GET_THREAD_AREA): Define.
2248 (ps_get_thread_area): New function.
2249 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2250 (linux-x86-64-low.o): Update.
2252 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2254 * configure.ac: Remove checks for prfpregset_t.
2255 * gdb_proc_service.h: New file.
2256 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2257 new "gdb_proc_service.h".
2258 * proc-service.c: Likewise.
2259 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2260 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2261 * Makefile.in (gdb_proc_service_h): Updated.
2262 * configure, config.in: Regenerated.
2264 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2266 * remote-utils.c (prepare_resume_reply): Move declaration
2267 of gdb_id_from_wait to the top of the block.
2269 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2271 * linux-low.c (regsets_store_inferior_registers): Read the regset
2272 from the target before filling it.
2274 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2276 * server.c (attach_inferior): Return SIGTRAP for a successful
2279 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2281 * Makefile.in (OBS): Add version.o.
2282 (STAGESTUFF): Delete.
2283 (version.o): Add dependencies.
2284 (version.c): Replace rule.
2285 (clean): Remove version.c.
2286 * server.c (gdbserver_version): New.
2287 (gdbserver_usage): Use printf.
2288 (main): Handle --version and --help.
2289 * server.h (version, host_name): Add declarations.
2291 2005-12-23 Eli Zaretskii <eliz@gnu.org>
2303 * linux-x86-64-low.c:
2306 * linux-ppc64-low.c:
2315 * linux-crisv32-low.c:
2327 * gdbserver.1: Add (C) after Copyright. Update the FSF
2330 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2332 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2333 (arm_breakpoint_at): Recognize both breakpoints.
2334 (the_low_target): Use the correct breakpoint instruction.
2336 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2338 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2339 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2340 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2341 (the_low_target): Update.
2343 2005-10-25 Andreas Schwab <schwab@suse.de>
2345 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2347 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2348 (ia64_num_regs): Reduce to 462.
2350 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2352 * acinclude.m4: Correct quoting.
2353 * aclocal.m4: Regenerated.
2355 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2356 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2357 (thread_db_init): Call thread_db_err_str.
2358 * configure.ac: Check for TD_VERSION.
2359 * config.in, configure: Regenerated.
2361 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2363 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2365 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2367 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2368 is not available. Define HAVE_PTRACE_GETREGS if it is.
2369 * config.in, configure: Regenerated.
2370 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2371 * linux-i386-low.c, linux-m68k-low.c: Update to use
2372 HAVE_PTRACE_GETREGS.
2373 * linux-low.c (regsets_fetch_inferior_registers)
2374 (regsets_store_inferior_registers): Only return 0 if we processed
2376 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2377 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2379 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2381 * inferiors.c (struct thread_info): Add gdb_id.
2382 (add_thread): Add gdb_id argument.
2383 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2384 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2385 calls to add_thread.
2386 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2387 * server.c (handle_query): Use thread_to_gdb_id.
2388 (handle_v_cont, main): Use gdb_id_to_thread_id.
2389 * server.h (add_thread): Update prototype.
2390 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2393 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2395 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2396 left-padded registers.
2397 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2398 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2400 2005-07-01 Steve Ellcey <sje@cup.hp.com>
2402 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2403 * configure: Regenerate.
2404 * config.in: Regenerate.
2405 * server.h (NEED_DECLARATION_STRERROR):
2406 Replace with !HAVE_DECL_STRERROR.
2408 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2410 * linux-low.c (linux_wait, linux_send_signal): Don't test
2411 an unsigned long variable for > 0 if it could be MAX_ULONG.
2412 * server.c (myresume): Likewise.
2413 * target.c (set_desired_inferior): Likewise.
2415 2005-06-13 Mark Kettenis <kettenis@gnu.org>
2417 * configure.ac: Simplify and improve check for socklen_t.
2418 * configure, config.in: Regenerate.
2420 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2422 * acconfig.h: Remove.
2423 * configure.ac: Add a test for socklen_t. Use three-argument
2424 AC_DEFINE throughout.
2425 * config.in: Regenerated using autoheader 2.59.
2426 * configure: Regenerated.
2428 * gdbreplay.c (socklen_t): Provide a default.
2429 (remote_open): Use socklen_t.
2430 * remote-utils.c (socklen_t): Provide a default.
2431 (remote_open): Use socklen_t.
2432 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2435 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2437 * linux-low.c (linux_read_memory, linux_write_memory)
2438 (linux_read_auxv): Likewise.
2439 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2440 (check_mem_write): Likewise.
2441 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2443 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2444 (registers_from_string, register_data): Likewise.
2445 * server.c (handle_query, main): Likewise.
2446 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2447 (decode_M_packet): Likewise.
2448 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2449 * target.h (struct target_ops): Update read_memory, write_memory,
2451 (read_inferior_memory, write_inferior_memory): Update.
2452 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2454 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2455 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2456 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2457 linux-s390-low.c, linux-sh-low.c: Update for changes in
2458 read_inferior_memory and the_low_target->breakpoint.
2460 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2462 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2463 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2464 * configure.srv: Add powerpc64-*-linux*.
2465 * linux-ppc64-low.c: New file.
2467 2005-05-23 Orjan Friberg <orjanf@axis.com>
2469 * linux-cris-low.c: New file with support for CRIS.
2470 * linux-crisv32-low.c: Ditto for CRISv32.
2471 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2472 (clean): Add reg-cris.c and reg-crisv32.c.
2473 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2474 reg-crisv32.o, and reg-crisv32.c to make rules.
2475 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2478 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2480 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2481 of sizeof (PTRACE_XFER_TYPE).
2482 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2484 2005-05-12 Orjan Friberg <orjanf@axis.com>
2486 * target.h (struct target_ops): Add insert_watchpoint,
2487 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2488 pointers for hardware watchpoint support.
2489 * linux-low.h (struct linux_target_ops): Ditto.
2490 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2491 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2492 to linux_target_ops.
2493 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2495 * server.c (main): Recognize 'Z' and 'z' packets.
2497 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2499 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2500 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2501 (the_low_target): Add new members.
2503 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2505 * proc-service.c (ps_lgetregs): Search all_processes instead of
2508 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2510 * server.c (start_inferior): Change return type to int.
2511 (attach_inferior): Change sigptr to int *.
2512 (handle_v_cont, handle_v_requests): Change signal to int *.
2513 (main): Change signal to int.
2515 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
2517 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2518 * configure.srv: Add m32r*-*-linux*.
2519 * linux-m32r-low.c: New file.
2521 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2523 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2525 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2527 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2528 Take unsigned long arguments for PIDs.
2529 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2530 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2531 (wait_for_sigstop, linux_resume_one_process)
2532 (regsets_fetch_inferior_registers, linux_send_signal)
2533 (linux_read_auxv): Likewise. Update the types of variables holding
2534 PIDs. Update format string specifiers.
2535 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2536 * remote-utils.c (prepare_resume_reply): Likewise.
2537 * server.c (cont_thread, general_thread, step_thread)
2538 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2540 (handle_query): Update format specifiers.
2541 (handle_v_cont, main): Use strtoul for thread IDs.
2542 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2543 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2544 (general_thread, step_thread, thread_from_wait)
2545 (old_thread_from_wait): Update.
2546 * target.h (struct thread_resume): Use unsigned long for THREAD.
2547 (struct target_ops): Use unsigned long for arguments to attach and
2550 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2552 * acinclude.m4: Include bfd/bfd.m4 directly.
2553 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2554 <agriffis@toolchain.org>.
2555 * aclocal.m4, configure: Regenerated.
2557 2005-01-07 Andrew Cagney <cagney@gnu.org>
2559 * configure.ac: Rename configure.in, require autoconf 2.59.
2560 * configure: Re-generate.
2562 2004-12-08 Daniel Jacobowitz <dan@debian.org>
2564 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2566 * aclocal.m4: Regenerated.
2567 * configure: Regenerated.
2569 2004-11-21 Andreas Schwab <schwab@suse.de>
2571 * linux-m68k-low.c (m68k_num_gregs): Define.
2572 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2573 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2574 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2575 (m68k_breakpoint_at): New. Add to the_low_target.
2577 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2578 srv_linux_thread_db to yes.
2580 2004-10-20 Joel Brobecker <brobecker@gnat.com>
2582 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2583 (ARCH_SET_FS): Likewise.
2584 (ARCH_GET_FS): Likewise.
2585 (ARCH_GET_GS): Likewise.
2587 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2589 * linux-i386-low.c (ps_get_thread_area): New.
2590 * linux-x86-64-low.c (ps_get_thread_area): New.
2591 * linux-low.c: Include <sys/syscall.h>.
2592 (linux_kill_one_process): Don't kill the first thread here.
2593 (linux_kill): Kill the first thread here.
2594 (kill_lwp): New function.
2595 (send_sigstop, linux_send_signal): Use it.
2596 * proc-service.c: Clean up #ifdefs.
2597 (fpregset_info): Delete.
2598 (ps_lgetregs): Update and enable implementation.
2599 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2601 * remote-utils.c (struct sym_cache, symbol_cache): New.
2602 (input_interrupt): Print a clearer message.
2603 (async_io_enabled): New variable.
2604 (enable_async_io, disable_async_io): Use it. Update comments.
2605 (look_up_one_symbol): Use the symbol cache.
2606 * thread-db.c (thread_db_look_up_symbols): New function.
2607 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2609 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2611 * configure.in: Test for -rdynamic.
2612 * configure: Regenerated.
2613 * Makefile (INTERNAL_LDFLAGS): New.
2614 (gdbserver, gdbreplay): Use it.
2616 2004-09-02 Andrew Cagney <cagney@gnu.org>
2618 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2620 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
2622 * linux-low.c (linux_wait): Clear all_processes list also.
2624 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2626 * linux-low.c: Include <errno.h>. Remove extern declaration of
2629 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2631 * gdbreplay.c, server.h, utils.c: Update copyright years.
2633 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2635 * server.c (main): Print child status or termination signal from
2636 variable 'signal', not 'sig'.
2638 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2640 * linux-low.c (linux_read_memory): Change return type to
2641 int. Check for and return error from ptrace().
2642 * target.c (read_inferior_memory): Change return type to int. Pass
2643 back return status from the_target->read_memory().
2644 * target.h (struct target_ops): Adapt *read_memory() prototype.
2646 (read_inferior_memory): Adapt prototype.
2647 * server.c (main): Return an error packet if
2648 read_inferior_memory() returns an error.
2650 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2652 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2653 Unify with other clean targets.
2655 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2657 * server.c (handle_v_cont): Call set_desired_inferior.
2659 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2661 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2663 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2665 * linux-low.c (linux_wait): Unblock async I/O.
2666 (linux_resume): Block and enable async I/O.
2667 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2668 * server.h (block_async_io, unblock_async_io): Add prototypes.
2670 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2672 * remote-utils.c (remote_open): Print a status notice after
2674 * server.c (attach_inferior): Print a status notice after
2677 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2679 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2681 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2683 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2685 * server.c, target.h: Update copyright years.
2687 2004-02-25 Roland McGrath <roland@redhat.com>
2689 * target.h (struct target_ops): New member `read_auxv'.
2690 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2691 * linux-low.c (linux_read_auxv): New function.
2692 (linux_target_ops): Initialize `read_auxv' member to that.
2694 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2696 Committed by Jim Blandy <jimb@redhat.com>.
2698 * linux-s390-low.c (s390_num_regs): Update.
2699 (s390_regmap): Remove control registers. Use __s390x__ predefine
2700 instead of GPR_SIZE to distiguish s390 and s390x targets.
2702 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2704 * linux-low.c: Update copyright year.
2705 (check_removed_breakpoint): Clear pending_is_breakpoint.
2706 (linux_set_resume_request, linux_queue_one_thread)
2707 (resume_status_pending_p): New functions.
2708 (linux_continue_one_thread): Use process->resume.
2709 (linux_resume): Only resume threads if there are no pending events.
2710 * linux-low.h (struct process_info): Add resume request
2713 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2715 * regcache.c (new_register_cache): Clear the allocated register
2716 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2718 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2720 * linux-low.c (linux_resume): Take a struct thread_resume *
2722 (linux_wait): Update call.
2723 (resume_ptr): New static variable.
2724 (linux_continue_one_thread): Renamed from
2725 linux_continue_one_process. Use resume_ptr.
2726 (linux_resume): Use linux_continue_one_thread.
2727 * server.c (handle_v_cont, handle_v_requests): New functions.
2728 (myresume): New function.
2729 (main): Handle 'v' case.
2730 * target.h (struct thread_resume): New type.
2731 (struct target_ops): Change argument of "resume" to struct
2733 (myresume): Delete macro.
2735 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2737 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2738 (uninstall): Support DESTDIR.
2740 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2742 * configure.srv: Add xscale*linux copy of arm*linux entry.
2744 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2746 * linux-arm-low.c (arm_reinsert_addr): New function.
2747 (the_low_target): Add arm_reinsert_addr.
2749 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2751 * mem-break.c: Remove whitespace at end of file.
2753 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2755 * configure.in: Check whether we need to prototype strerror.
2756 * server.h: Optionally prototype strerror.
2757 * gdbreplay.c (perror_with_name): Use strerror.
2758 * linux-low.c (linux_attach_lwp): Use strerror.
2759 * utils.c (perror_with_name): Use strerror.
2760 * config.in, configure: Regenerated.
2762 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2764 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2765 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2767 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2769 * Makefile.in (SFILES): Update.
2770 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2771 low-sun3.c: Remove files.
2773 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2775 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2776 (linux_detach_one_process, linux_detach): New functions.
2777 (linux_target_ops): Add linux_detach.
2778 * server.c (main): Handle 'D' packet.
2779 * target.h (struct target_ops): Add "detach" member.
2780 (detach_inferior): Define.
2782 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2784 From Kelley Cook <kelleycook@wideopenwest.com>:
2785 * configure.srv: Accept i[34567]86 variants.
2787 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2789 * linux-low.c (linux_wait_for_event): Correct comment typos.
2790 (linux_resume_one_process): Call check_removed_breakpoint.
2791 (linux_send_signal): New function.
2792 (linux_target_ops): Add linux_send_signal.
2793 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2795 * target.h (struct target_ops): Add send_signal.
2797 2003-05-29 Jim Blandy <jimb@redhat.com>
2799 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2800 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2801 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2802 away part of the register's value.
2804 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2806 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2807 (linux_wait_for_event, linux_init_signals): Likewise.
2809 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2811 * configure.in: Check for stdlib.h.
2812 * configure: Regenerated.
2813 * config.in: Regenerated.
2815 2003-01-04 Andreas Schwab <schwab@suse.de>
2817 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2819 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2821 * Makefile.in: Remove obsolete code.
2823 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2825 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2826 defined(PT_FPR0_HI).
2828 2002-11-17 Stuart Hughes <seh@zee2.com>
2830 * linux-arm-low.c (arm_num_regs): Increase.
2831 (arm_regmap): Include status register.
2833 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2835 * linux-low.c (register_addr): Remove incorrect -1 check.
2837 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2839 * linux-low.c (linux_create_inferior): Call setpgid. Return
2841 (unstopped_p, linux_signal_pid): Remove.
2842 (linux_target_ops): Remove linux_signal_pid.
2843 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2844 global instead of target method.
2845 * target.h (struct target_ops): Remove signal_pid. Update comment
2846 for create_inferior.
2847 * server.c (signal_pid): New variable.
2848 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2849 gdbserver. Set the child to be the foreground process group.
2850 (attach_inferior): Set signal_pid.
2852 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2854 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2856 2002-08-20 Jim Blandy <jimb@redhat.com>
2858 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2861 2002-08-01 Andrew Cagney <cagney@redhat.com>
2863 * Makefile.in: Make chill references obsolete.
2865 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2867 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2868 * configure: Regenerate.
2869 * config.in: Regenerate.
2871 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2873 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2874 (perror_with_name, remote_close, remote_open, expect, play): Static.
2876 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2878 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2879 byte offsets instead of an array of indexes.
2880 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2882 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2884 * regcache.c: Add comment.
2886 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2888 * thread-db.c: New file.
2889 * proc-service.c: New file.
2890 * acinclude.m4: New file.
2891 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2892 proc-service.o, and thread-db.o.
2893 (linux-low.o): Add USE_THREAD_DB.
2894 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2895 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2896 * aclocal.m4: Regenerated.
2897 * config.in: Regenerated.
2898 * configure: Regenerated.
2899 * configure.in: Check for proc_service.h, sys/procfs.h,
2900 thread_db.h, and linux/elf.h headrs.
2901 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2902 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2903 Check for -lthread_db and thread support.
2904 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2905 PowerPC, and SuperH.
2906 * i387-fp.c: Constify arguments.
2907 * i387-fp.h: Likewise.
2908 * inferiors.c: (struct thread_info): Renamed from
2909 `struct inferior_info'. Remove PID member. Use generic inferior
2910 list header. All uses updated.
2911 (inferiors, signal_pid): Removed.
2912 (all_threads): New variable.
2913 (get_thread): Define.
2914 (add_inferior_to_list): New function.
2915 (for_each_inferior): New function.
2916 (change_inferior_id): New function.
2917 (add_inferior): Removed.
2918 (remove_inferior): New function.
2919 (add_thread): New function.
2920 (free_one_thread): New function.
2921 (remove_thread): New function.
2922 (clear_inferiors): Use for_each_inferior and free_one_thread.
2923 (find_inferior): New function.
2924 (find_inferior_id): New function.
2925 (inferior_target_data): Update argument type.
2926 (set_inferior_target_data): Likewise.
2927 (inferior_regcache_data): Likewise.
2928 (set_inferior_regcache_data): Likewise.
2929 * linux-low.c (linux_bp_reinsert): Remove.
2930 (all_processes, stopping_threads, using_thrads)
2931 (struct pending_signals, debug_threads, pid_of): New.
2932 (inferior_pid): Replace with macro.
2933 (struct inferior_linux_data): Remove.
2934 (get_stop_pc, add_process): New functions.
2935 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2936 Use add_process and add_thread.
2937 (linux_attach_lwp): New function, based on old linux_attach. Use
2938 add_process and add_thread. Set stop_expected for new threads.
2939 (linux_attach): New function.
2940 (linux_kill_one_process): New function.
2941 (linux_kill): Kill all LWPs.
2942 (linux_thread_alive): Use find_inferior_id.
2943 (check_removed_breakpoints, status_pending_p): New functions.
2944 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2945 Update. Use WNOHANG. Wait for cloned processes also. Update process
2946 struct for the found process.
2947 (linux_wait_for_event): New function.
2948 (linux_wait): Use it. Support LWPs.
2949 (send_sigstop, wait_for_sigstop, stop_all_processes)
2950 (linux_resume_one_process, linux_continue_one_process): New functions.
2951 (linux_resume): Support LWPs.
2952 (REGISTER_RAW_SIZE): Remove.
2953 (fetch_register): Use register_size instead. Call supply_register.
2954 (usr_store_inferior_registers): Likewise. Call collect_register.
2956 (regsets_fetch_inferior_registers): Improve error message.
2957 (regsets_store_inferior_registers): Add debugging.
2958 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2959 (unstopped_p, linux_signal_pid): New functions.
2960 (linux_target_ops): Add linux_signal_pid.
2961 (linux_init_signals): New function.
2962 (initialize_low): Call it. Initialize using_threads.
2963 * regcache.c (inferior_regcache_data): Add valid
2965 (get_regcache): Fetch registers lazily. Add fetch argument
2966 and update all callers.
2967 (regcache_invalidate_one, regcache_invalidate): New
2969 (new_register_cache): Renamed from create_register_cache.
2970 Return the new regcache.
2971 (free_register_cache): Change argument to a void *.
2972 (registers_to_string, registers_from_string): Call get_regcache
2973 with fetch flag set.
2974 (register_data): Make static. Pass fetch flag to get_regcache.
2975 (supply_register): Call get_regcache with fetch flag clear.
2976 (collect_register): Call get_regcache with fetch flag set.
2977 (collect_register_as_string): New function.
2978 * regcache.h: Update.
2979 * remote-utils.c (putpkt): Flush after debug output and use
2981 Handle input interrupts while waiting for an ACK.
2982 (input_interrupt): Use signal_pid method.
2983 (getpkt): Flush after debug output and use stderr.
2984 (outreg): Use collect_register_as_string.
2985 (new_thread_notify, dead_thread_notify): New functions.
2986 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2988 (look_up_one_symbol): Flush after debug output.
2989 * server.c (step_thread, server_waiting): New variables.
2990 (start_inferior): Don't use signal_pid. Update call to mywait.
2991 (attach_inferior): Update call to mywait.
2992 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2993 (main): Don't fetch/store registers explicitly. Use
2994 set_desired_inferior. Support proposed ``Hs'' packet. Update
2997 (struct inferior_list, struct_inferior_list_entry): New.
2998 * target.c (set_desired_inferior): New.
2999 (write_inferior_memory): Constify.
3000 (mywait): New function.
3002 (struct target_ops): New signal_pid method.
3003 (mywait): Removed macro, added prototype.
3005 * linux-low.h (regset_func): Removed.
3006 (regset_fill_func, regset_store_func): New.
3007 (enum regset_type): New.
3008 (struct regset_info): Add type field. Use new operation types.
3009 (struct linux_target_ops): stop_pc renamed to get_pc.
3010 Add decr_pc_after_break and breakpoint_at.
3011 (get_process, get_thread_proess, get_process_thread)
3012 (strut process_info, all_processes, linux_attach_lwp)
3013 (thread_db_init): New.
3015 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3016 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3017 (the_low_target): Add new members.
3018 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3019 (i386_store_fpxregset): Constify.
3020 (target_regsets): Add new kind identifier.
3021 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3022 (i386_set_pc): Add debugging.
3023 (i386_breakpoint_at): New function.
3024 (the_low_target): Add new members.
3025 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3026 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3027 (mips_breakpoint_at): New.
3028 (the_low_target): Add new members.
3029 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3030 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3031 (the_low_target): Add new members.
3032 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3033 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3034 (the_low_target): Add new members.
3035 * linux-x86-64-low.c (target_regsets): Add new kind
3038 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
3040 From Martin Pool <mbp@samba.org>:
3041 * server.c (gdbserver_usage): New function.
3044 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
3046 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3049 2002-05-04 Andrew Cagney <ac131313@redhat.com>
3051 * Makefile.in: Remove obsolete code.
3053 2002-04-24 Michal Ludvig <mludvig@suse.cz>
3055 * linux-low.c (regsets_fetch_inferior_registers),
3056 (regsets_store_inferior_registers): Removed cast to int from
3058 * regcache.h: Added declaration of struct inferior_info.
3060 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3062 * inferiors.c (struct inferior_info): Add regcache_data.
3063 (add_inferior): Call create_register_cache.
3064 (clear_inferiors): Call free_register_cache.
3065 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3066 * regcache.c (struct inferior_regcache_data): New.
3067 (registers): Remove.
3068 (get_regcache): New function.
3069 (create_register_cache, free_register_cache): New functions.
3070 (set_register_cache): Don't initialize the register cache here.
3071 (registers_to_string, registers_from_string, register_data): Call
3073 * regcache.h: Add prototypes.
3074 * server.h: Likewise.
3076 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
3078 * mem-break.c: New file.
3079 * mem-break.h: New file.
3080 * Makefile.in: Add mem-break.o rule; update server.h
3082 * inferiors.c (struct inferior_info): Add target_data
3084 (clear_inferiors): Free target_data member if set.
3085 (inferior_target_data, set_inferior_target_data): New functions.
3086 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3087 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3088 * linux-low.c (linux_bp_reinsert): New variable.
3089 (struct inferior_linux_data): New.
3090 (linux_create_inferior): Use set_inferior_target_data.
3091 (linux_attach): Likewise. Call add_inferior.
3092 (linux_wait_for_one_inferior): New function.
3093 (linux_wait): Call it.
3094 (linux_write_memory): Add const.
3095 (initialize_low): Call set_breakpoint_data.
3096 * linux-low.h (struct linux_target_ops): Add breakpoint
3098 * server.c (attach_inferior): Remove extra add_inferior
3100 * server.h: Include mem-break.h. Update inferior.c
3102 * target.c (read_inferior_memory)
3103 (write_inferior_memory): New functions.
3104 * target.h (read_inferior_memory)
3105 (write_inferior_memory): Change macros to prototypes.
3106 (struct target_ops): Update comments. Add const to write_memory
3109 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
3111 * linux-low.c (usr_store_inferior_registers): Support
3112 registers which are allowed to fail to store.
3113 * linux-low.h (linux_target_ops): Likewise.
3114 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3115 (ppc_cannot_store_register): FPSCR may not be storable.
3117 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3119 * server.h: Include <string.h> if HAVE_STRING_H.
3120 * ChangeLog: Correct paths in last ChangeLog entry.
3122 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3124 * linux-low.h: Remove obsolete prototypes.
3125 (struct linux_target_ops): New.
3126 (extern the_low_target): New.
3127 * linux-low.c (num_regs, regmap): Remove declarations.
3128 (register_addr): Use the_low_target explicitly.
3129 (fetch_register): Likewise.
3130 (usr_fetch_inferior_registers): Likewise.
3131 (usr_store_inferior_registers): Likewise.
3132 * linux-arm-low.c (num_regs): Remove.
3133 (arm_num_regs): Define.
3134 (arm_regmap): Renamed from regmap, made static.
3135 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3137 (arm_cannot_store_register): Renamed from cannot_store_register,
3139 (the_low_target): New.
3140 * linux-i386-low.c (num_regs): Remove.
3141 (i386_num_regs): Define.
3142 (i386_regmap): Renamed from regmap, made static.
3143 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3145 (i386_cannot_store_register): Renamed from cannot_store_register,
3147 (the_low_target): New.
3148 * linux-ia64-low.c (num_regs): Remove.
3149 (ia64_num_regs): Define.
3150 (ia64_regmap): Renamed from regmap, made static.
3151 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3153 (ia64_cannot_store_register): Renamed from cannot_store_register,
3155 (the_low_target): New.
3156 * linux-m68k-low.c (num_regs): Remove.
3157 (m68k_num_regs): Define.
3158 (m68k_regmap): Renamed from regmap, made static.
3159 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3161 (m68k_cannot_store_register): Renamed from cannot_store_register,
3163 (the_low_target): New.
3164 * linux-mips-low.c (num_regs): Remove.
3165 (mips_num_regs): Define.
3166 (mips_regmap): Renamed from regmap, made static.
3167 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3169 (mips_cannot_store_register): Renamed from cannot_store_register,
3171 (the_low_target): New.
3172 * linux-ppc-low.c (num_regs): Remove.
3173 (ppc_num_regs): Define.
3174 (ppc_regmap): Renamed from regmap, made static.
3175 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3177 (ppc_cannot_store_register): Renamed from cannot_store_register,
3179 (the_low_target): New.
3180 * linux-s390-low.c (num_regs): Remove.
3181 (s390_num_regs): Define.
3182 (s390_regmap): Renamed from regmap, made static.
3183 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3185 (s390_cannot_store_register): Renamed from cannot_store_register,
3187 (the_low_target): New.
3188 * linux-sh-low.c (num_regs): Remove.
3189 (sh_num_regs): Define.
3190 (sh_regmap): Renamed from regmap, made static.
3191 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3193 (sh_cannot_store_register): Renamed from cannot_store_register,
3195 (the_low_target): New.
3196 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3197 (the_low_target): New.
3199 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3201 * Makefile.in: Add stamp-h target.
3202 * configure.in: Create stamp-h.
3203 * configure: Regenerated.
3205 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3207 * inferiors.c: New file.
3208 * target.c: New file.
3209 * target.h: New file.
3210 * Makefile.in: Add target.o and inferiors.o. Update
3212 * linux-low.c (inferior_pid): New static variable,
3213 moved from server.c.
3214 (linux_create_inferior): Renamed from create_inferior.
3215 Call add_inferior. Return 0 on success instead of a PID.
3216 (linux_attach): Renamed from myattach.
3217 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3218 (linux_thread_alive): Renamed from mythread_alive.
3219 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3221 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3222 (regsets_store_inferior_registers): Correct error message.
3223 Add missing ``return 0''.
3224 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3225 (linux_store_registers): Renamed from store_inferior_registers.
3226 (linux_read_memory): Renamed from read_inferior_memory.
3227 (linux_write_memory): Renamed from write_inferior_memory.
3228 (linux_target_ops): New structure.
3229 (initialize_low): Call set_target_ops ().
3230 * remote-utils.c (unhexify): New function.
3231 (hexify): New function.
3232 (input_interrupt): Send signals to ``signal_pid''.
3233 * server.c (inferior_pid): Remove.
3234 (start_inferior): Update create_inferior call.
3235 (attach_inferior): Call add_inferior.
3236 (handle_query): New function.
3237 (main): Call handle_query for `q' packets.
3238 * server.h: Include "target.h". Remove obsolete prototypes.
3239 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3241 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
3243 * Makefile.in: Add WARN_CFLAGS. Update configury
3245 * configure.in: Check for <string.h>
3246 * configure: Regenerate.
3247 * config.in: Regenerate.
3248 * gdbreplay.c: Include needed system headers.
3249 (remote_open): Remove strchr prototype.
3250 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3251 * regcache.c (supply_register): Change buf argument to const void *.
3252 (supply_register_by_name): Likewise.
3253 (collect_register): Change buf argument to void *.
3254 (collect_register_by_name): Likewise.
3255 * regcache.h: Add missing prototypes.
3256 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3257 * server.c (handle_query): New function.
3258 (attached): New static variable, moved out of main.
3259 (main): Quiet longjmp clobber warnings.
3260 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3261 * utils.c (error): Remove NORETURN.