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