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