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