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