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