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