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