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