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