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