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