* acconfig.h: Remove.
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2
3 * acconfig.h: Remove.
4 * configure.ac: Add a test for socklen_t. Use three-argument
5 AC_DEFINE throughout.
6 * config.in: Regenerated using autoheader 2.59.
7 * configure: Regenerated.
8
9 * gdbreplay.c (socklen_t): Provide a default.
10 (remote_open): Use socklen_t.
11 * remote-utils.c (socklen_t): Provide a default.
12 (remote_open): Use socklen_t.
13 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14 unsigned char.
15
16 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17 char for buffers.
18 * linux-low.c (linux_read_memory, linux_write_memory)
19 (linux_read_auxv): Likewise.
20 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21 (check_mem_write): Likewise.
22 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
23 Likewise.
24 * regcache.c (struct inferior_rgcache_data, registers_to_string)
25 (registers_from_string, register_data): Likewise.
26 * server.c (handle_query, main): Likewise.
27 * server.h (convert_ascii_to_int, convert_int_to_ascii)
28 (decode_M_packet): Likewise.
29 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
30 * target.h (struct target_ops): Update read_memory, write_memory,
31 and read_auxv.
32 (read_inferior_memory, write_inferior_memory): Update.
33 * linux-low.h (struct linux_target_ops): Change type of breakpoint
34 to unsigned char *.
35 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
36 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
37 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
38 linux-s390-low.c, linux-sh-low.c: Update for changes in
39 read_inferior_memory and the_low_target->breakpoint.
40
41 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
42
43 * Makefile.in (SFILES): Add linux-ppc64-low.c.
44 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
45 * configure.srv: Add powerpc64-*-linux*.
46 * linux-ppc64-low.c: New file.
47
48 2005-05-23 Orjan Friberg <orjanf@axis.com>
49
50 * linux-cris-low.c: New file with support for CRIS.
51 * linux-crisv32-low.c: Ditto for CRISv32.
52 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
53 (clean): Add reg-cris.c and reg-crisv32.c.
54 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
55 reg-crisv32.o, and reg-crisv32.c to make rules.
56 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
57 recognized targets.
58
59 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
60
61 * linux-low.c (fetch_register): Ensure buffer size is a multiple
62 of sizeof (PTRACE_XFER_TYPE).
63 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
64
65 2005-05-12 Orjan Friberg <orjanf@axis.com>
66
67 * target.h (struct target_ops): Add insert_watchpoint,
68 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
69 pointers for hardware watchpoint support.
70 * linux-low.h (struct linux_target_ops): Ditto.
71 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
72 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
73 to linux_target_ops.
74 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
75 reply packet.
76 * server.c (main): Recognize 'Z' and 'z' packets.
77
78 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
79
80 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
81 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
82 (the_low_target): Add new members.
83
84 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
85
86 * proc-service.c (ps_lgetregs): Search all_processes instead of
87 all_threads.
88
89 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
90
91 * server.c (start_inferior): Change return type to int.
92 (attach_inferior): Change sigptr to int *.
93 (handle_v_cont, handle_v_requests): Change signal to int *.
94 (main): Change signal to int.
95
96 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
97
98 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
99 * configure.srv: Add m32r*-*-linux*.
100 * linux-m32r-low.c: New file.
101
102 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
103
104 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
105
106 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
107
108 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
109 Take unsigned long arguments for PIDs.
110 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
111 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
112 (wait_for_sigstop, linux_resume_one_process)
113 (regsets_fetch_inferior_registers, linux_send_signal)
114 (linux_read_auxv): Likewise. Update the types of variables holding
115 PIDs. Update format string specifiers.
116 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
117 * remote-utils.c (prepare_resume_reply): Likewise.
118 * server.c (cont_thread, general_thread, step_thread)
119 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
120 unsigned long.
121 (handle_query): Update format specifiers.
122 (handle_v_cont, main): Use strtoul for thread IDs.
123 * server.h (struct inferior_list_entry): Use unsigned long for ID.
124 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
125 (general_thread, step_thread, thread_from_wait)
126 (old_thread_from_wait): Update.
127 * target.h (struct thread_resume): Use unsigned long for THREAD.
128 (struct target_ops): Use unsigned long for arguments to attach and
129 thread_alive.
130
131 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
132
133 * acinclude.m4: Include bfd/bfd.m4 directly.
134 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
135 <agriffis@toolchain.org>.
136 * aclocal.m4, configure: Regenerated.
137
138 2005-01-07 Andrew Cagney <cagney@gnu.org>
139
140 * configure.ac: Rename configure.in, require autoconf 2.59.
141 * configure: Re-generate.
142
143 2004-12-08 Daniel Jacobowitz <dan@debian.org>
144
145 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
146 LIBS when finished.
147 * aclocal.m4: Regenerated.
148 * configure: Regenerated.
149
150 2004-11-21 Andreas Schwab <schwab@suse.de>
151
152 * linux-m68k-low.c (m68k_num_gregs): Define.
153 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
154 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
155 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
156 (m68k_breakpoint_at): New. Add to the_low_target.
157
158 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
159 srv_linux_thread_db to yes.
160
161 2004-10-20 Joel Brobecker <brobecker@gnat.com>
162
163 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
164 (ARCH_SET_FS): Likewise.
165 (ARCH_GET_FS): Likewise.
166 (ARCH_GET_GS): Likewise.
167
168 2004-10-16 Daniel Jacobowitz <dan@debian.org>
169
170 * linux-i386-low.c (ps_get_thread_area): New.
171 * linux-x86-64-low.c (ps_get_thread_area): New.
172 * linux-low.c: Include <sys/syscall.h>.
173 (linux_kill_one_process): Don't kill the first thread here.
174 (linux_kill): Kill the first thread here.
175 (kill_lwp): New function.
176 (send_sigstop, linux_send_signal): Use it.
177 * proc-service.c: Clean up #ifdefs.
178 (fpregset_info): Delete.
179 (ps_lgetregs): Update and enable implementation.
180 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
181 implementations.
182 * remote-utils.c (struct sym_cache, symbol_cache): New.
183 (input_interrupt): Print a clearer message.
184 (async_io_enabled): New variable.
185 (enable_async_io, disable_async_io): Use it. Update comments.
186 (look_up_one_symbol): Use the symbol cache.
187 * thread-db.c (thread_db_look_up_symbols): New function.
188 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
189
190 2004-10-16 Daniel Jacobowitz <dan@debian.org>
191
192 * configure.in: Test for -rdynamic.
193 * configure: Regenerated.
194 * Makefile (INTERNAL_LDFLAGS): New.
195 (gdbserver, gdbreplay): Use it.
196
197 2004-09-02 Andrew Cagney <cagney@gnu.org>
198
199 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
200
201 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
202
203 * linux-low.c (linux_wait): Clear all_processes list also.
204
205 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
206
207 * linux-low.c: Include <errno.h>. Remove extern declaration of
208 errno.
209
210 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
211
212 * gdbreplay.c, server.h, utils.c: Update copyright years.
213
214 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
215
216 * server.c (main): Print child status or termination signal from
217 variable 'signal', not 'sig'.
218
219 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
220
221 * linux-low.c (linux_read_memory): Change return type to
222 int. Check for and return error from ptrace().
223 * target.c (read_inferior_memory): Change return type to int. Pass
224 back return status from the_target->read_memory().
225 * target.h (struct target_ops): Adapt *read_memory() prototype.
226 Update comment.
227 (read_inferior_memory): Adapt prototype.
228 * server.c (main): Return an error packet if
229 read_inferior_memory() returns an error.
230
231 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
232
233 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
234 Unify with other clean targets.
235
236 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
237
238 * server.c (handle_v_cont): Call set_desired_inferior.
239
240 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
241
242 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
243
244 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
245
246 * linux-low.c (linux_wait): Unblock async I/O.
247 (linux_resume): Block and enable async I/O.
248 * remote-utils.c (block_async_io, unblock_async_io): New functions.
249 * server.h (block_async_io, unblock_async_io): Add prototypes.
250
251 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
252
253 * remote-utils.c (remote_open): Print a status notice after
254 opening a TCP port.
255 * server.c (attach_inferior): Print a status notice after
256 attaching.
257
258 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
259
260 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
261
262 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
263
264 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
265 error packet.
266 * server.c, target.h: Update copyright years.
267
268 2004-02-25 Roland McGrath <roland@redhat.com>
269
270 * target.h (struct target_ops): New member `read_auxv'.
271 * server.c (handle_query): Handle qPart:auxv:read: query using that.
272 * linux-low.c (linux_read_auxv): New function.
273 (linux_target_ops): Initialize `read_auxv' member to that.
274
275 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
276
277 Committed by Jim Blandy <jimb@redhat.com>.
278
279 * linux-s390-low.c (s390_num_regs): Update.
280 (s390_regmap): Remove control registers. Use __s390x__ predefine
281 instead of GPR_SIZE to distiguish s390 and s390x targets.
282
283 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
284
285 * linux-low.c: Update copyright year.
286 (check_removed_breakpoint): Clear pending_is_breakpoint.
287 (linux_set_resume_request, linux_queue_one_thread)
288 (resume_status_pending_p): New functions.
289 (linux_continue_one_thread): Use process->resume.
290 (linux_resume): Only resume threads if there are no pending events.
291 * linux-low.h (struct process_info): Add resume request
292 pointer.
293
294 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
295
296 * regcache.c (new_register_cache): Clear the allocated register
297 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
298
299 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
300
301 * linux-low.c (linux_resume): Take a struct thread_resume *
302 argument.
303 (linux_wait): Update call.
304 (resume_ptr): New static variable.
305 (linux_continue_one_thread): Renamed from
306 linux_continue_one_process. Use resume_ptr.
307 (linux_resume): Use linux_continue_one_thread.
308 * server.c (handle_v_cont, handle_v_requests): New functions.
309 (myresume): New function.
310 (main): Handle 'v' case.
311 * target.h (struct thread_resume): New type.
312 (struct target_ops): Change argument of "resume" to struct
313 thread_resume *.
314 (myresume): Delete macro.
315
316 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
317
318 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
319 (uninstall): Support DESTDIR.
320
321 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
322
323 * configure.srv: Add xscale*linux copy of arm*linux entry.
324
325 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
326
327 * linux-arm-low.c (arm_reinsert_addr): New function.
328 (the_low_target): Add arm_reinsert_addr.
329
330 2003-07-08 Mark Kettenis <kettenis@gnu.org>
331
332 * mem-break.c: Remove whitespace at end of file.
333
334 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
335
336 * configure.in: Check whether we need to prototype strerror.
337 * server.h: Optionally prototype strerror.
338 * gdbreplay.c (perror_with_name): Use strerror.
339 * linux-low.c (linux_attach_lwp): Use strerror.
340 * utils.c (perror_with_name): Use strerror.
341 * config.in, configure: Regenerated.
342
343 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
344
345 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
346 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
347
348 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
349
350 * Makefile.in (SFILES): Update.
351 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
352 low-sun3.c: Remove files.
353
354 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
355
356 * linux-low.c: Move comment to linux_thread_alive where it belonged.
357 (linux_detach_one_process, linux_detach): New functions.
358 (linux_target_ops): Add linux_detach.
359 * server.c (main): Handle 'D' packet.
360 * target.h (struct target_ops): Add "detach" member.
361 (detach_inferior): Define.
362
363 2003-06-13 Mark Kettenis <kettenis@gnu.org>
364
365 From Kelley Cook <kelleycook@wideopenwest.com>:
366 * configure.srv: Accept i[34567]86 variants.
367
368 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
369
370 * linux-low.c (linux_wait_for_event): Correct comment typos.
371 (linux_resume_one_process): Call check_removed_breakpoint.
372 (linux_send_signal): New function.
373 (linux_target_ops): Add linux_send_signal.
374 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
375 of kill.
376 * target.h (struct target_ops): Add send_signal.
377
378 2003-05-29 Jim Blandy <jimb@redhat.com>
379
380 * linux-low.c (usr_store_inferior_registers): Transfer buf in
381 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
382 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
383 away part of the register's value.
384
385 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
386
387 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
388 (linux_wait_for_event, linux_init_signals): Likewise.
389
390 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
391
392 * configure.in: Check for stdlib.h.
393 * configure: Regenerated.
394 * config.in: Regenerated.
395
396 2003-01-04 Andreas Schwab <schwab@suse.de>
397
398 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
399
400 2003-01-02 Andrew Cagney <ac131313@redhat.com>
401
402 * Makefile.in: Remove obsolete code.
403
404 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
405
406 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
407 defined(PT_FPR0_HI).
408
409 2002-11-17 Stuart Hughes <seh@zee2.com>
410
411 * linux-arm-low.c (arm_num_regs): Increase.
412 (arm_regmap): Include status register.
413
414 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
415
416 * linux-low.c (register_addr): Remove incorrect -1 check.
417
418 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
419
420 * linux-low.c (linux_create_inferior): Call setpgid. Return
421 the new PID.
422 (unstopped_p, linux_signal_pid): Remove.
423 (linux_target_ops): Remove linux_signal_pid.
424 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
425 global instead of target method.
426 * target.h (struct target_ops): Remove signal_pid. Update comment
427 for create_inferior.
428 * server.c (signal_pid): New variable.
429 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
430 gdbserver. Set the child to be the foreground process group.
431 (attach_inferior): Set signal_pid.
432
433 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
434
435 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
436
437 2002-08-20 Jim Blandy <jimb@redhat.com>
438
439 * Makefile.in (LDFLAGS): Allow the configure script to establish a
440 default for this.
441
442 2002-08-01 Andrew Cagney <cagney@redhat.com>
443
444 * Makefile.in: Make chill references obsolete.
445
446 2002-07-24 Kevin Buettner <kevinb@redhat.com>
447
448 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
449 * configure: Regenerate.
450 * config.in: Regenerate.
451
452 2002-07-09 David O'Brien <obrien@FreeBSD.org>
453
454 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
455 (perror_with_name, remote_close, remote_open, expect, play): Static.
456
457 2002-07-04 Michal Ludvig <mludvig@suse.cz>
458
459 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
460 byte offsets instead of an array of indexes.
461 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
462
463 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
464
465 * regcache.c: Add comment.
466
467 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
468
469 * thread-db.c: New file.
470 * proc-service.c: New file.
471 * acinclude.m4: New file.
472 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
473 proc-service.o, and thread-db.o.
474 (linux-low.o): Add USE_THREAD_DB.
475 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
476 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
477 * aclocal.m4: Regenerated.
478 * config.in: Regenerated.
479 * configure: Regenerated.
480 * configure.in: Check for proc_service.h, sys/procfs.h,
481 thread_db.h, and linux/elf.h headrs.
482 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
483 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
484 Check for -lthread_db and thread support.
485 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
486 PowerPC, and SuperH.
487 * i387-fp.c: Constify arguments.
488 * i387-fp.h: Likewise.
489 * inferiors.c: (struct thread_info): Renamed from
490 `struct inferior_info'. Remove PID member. Use generic inferior
491 list header. All uses updated.
492 (inferiors, signal_pid): Removed.
493 (all_threads): New variable.
494 (get_thread): Define.
495 (add_inferior_to_list): New function.
496 (for_each_inferior): New function.
497 (change_inferior_id): New function.
498 (add_inferior): Removed.
499 (remove_inferior): New function.
500 (add_thread): New function.
501 (free_one_thread): New function.
502 (remove_thread): New function.
503 (clear_inferiors): Use for_each_inferior and free_one_thread.
504 (find_inferior): New function.
505 (find_inferior_id): New function.
506 (inferior_target_data): Update argument type.
507 (set_inferior_target_data): Likewise.
508 (inferior_regcache_data): Likewise.
509 (set_inferior_regcache_data): Likewise.
510 * linux-low.c (linux_bp_reinsert): Remove.
511 (all_processes, stopping_threads, using_thrads)
512 (struct pending_signals, debug_threads, pid_of): New.
513 (inferior_pid): Replace with macro.
514 (struct inferior_linux_data): Remove.
515 (get_stop_pc, add_process): New functions.
516 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
517 Use add_process and add_thread.
518 (linux_attach_lwp): New function, based on old linux_attach. Use
519 add_process and add_thread. Set stop_expected for new threads.
520 (linux_attach): New function.
521 (linux_kill_one_process): New function.
522 (linux_kill): Kill all LWPs.
523 (linux_thread_alive): Use find_inferior_id.
524 (check_removed_breakpoints, status_pending_p): New functions.
525 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
526 Update. Use WNOHANG. Wait for cloned processes also. Update process
527 struct for the found process.
528 (linux_wait_for_event): New function.
529 (linux_wait): Use it. Support LWPs.
530 (send_sigstop, wait_for_sigstop, stop_all_processes)
531 (linux_resume_one_process, linux_continue_one_process): New functions.
532 (linux_resume): Support LWPs.
533 (REGISTER_RAW_SIZE): Remove.
534 (fetch_register): Use register_size instead. Call supply_register.
535 (usr_store_inferior_registers): Likewise. Call collect_register.
536 Fix recursive case.
537 (regsets_fetch_inferior_registers): Improve error message.
538 (regsets_store_inferior_registers): Add debugging.
539 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
540 (unstopped_p, linux_signal_pid): New functions.
541 (linux_target_ops): Add linux_signal_pid.
542 (linux_init_signals): New function.
543 (initialize_low): Call it. Initialize using_threads.
544 * regcache.c (inferior_regcache_data): Add valid
545 flag.
546 (get_regcache): Fetch registers lazily. Add fetch argument
547 and update all callers.
548 (regcache_invalidate_one, regcache_invalidate): New
549 functions.
550 (new_register_cache): Renamed from create_register_cache.
551 Return the new regcache.
552 (free_register_cache): Change argument to a void *.
553 (registers_to_string, registers_from_string): Call get_regcache
554 with fetch flag set.
555 (register_data): Make static. Pass fetch flag to get_regcache.
556 (supply_register): Call get_regcache with fetch flag clear.
557 (collect_register): Call get_regcache with fetch flag set.
558 (collect_register_as_string): New function.
559 * regcache.h: Update.
560 * remote-utils.c (putpkt): Flush after debug output and use
561 stderr.
562 Handle input interrupts while waiting for an ACK.
563 (input_interrupt): Use signal_pid method.
564 (getpkt): Flush after debug output and use stderr.
565 (outreg): Use collect_register_as_string.
566 (new_thread_notify, dead_thread_notify): New functions.
567 (prepare_resume_reply): Check using_threads. Set thread_from_wait
568 and general_thread.
569 (look_up_one_symbol): Flush after debug output.
570 * server.c (step_thread, server_waiting): New variables.
571 (start_inferior): Don't use signal_pid. Update call to mywait.
572 (attach_inferior): Update call to mywait.
573 (handle_query): Handle qfThreadInfo and qsThreadInfo.
574 (main): Don't fetch/store registers explicitly. Use
575 set_desired_inferior. Support proposed ``Hs'' packet. Update
576 calls to mywait.
577 * server.h: Update.
578 (struct inferior_list, struct_inferior_list_entry): New.
579 * target.c (set_desired_inferior): New.
580 (write_inferior_memory): Constify.
581 (mywait): New function.
582 * target.h: Update.
583 (struct target_ops): New signal_pid method.
584 (mywait): Removed macro, added prototype.
585
586 * linux-low.h (regset_func): Removed.
587 (regset_fill_func, regset_store_func): New.
588 (enum regset_type): New.
589 (struct regset_info): Add type field. Use new operation types.
590 (struct linux_target_ops): stop_pc renamed to get_pc.
591 Add decr_pc_after_break and breakpoint_at.
592 (get_process, get_thread_proess, get_process_thread)
593 (strut process_info, all_processes, linux_attach_lwp)
594 (thread_db_init): New.
595
596 * linux-arm-low.c (arm_get_pc, arm_set_pc,
597 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
598 (the_low_target): Add new members.
599 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
600 (i386_store_fpxregset): Constify.
601 (target_regsets): Add new kind identifier.
602 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
603 (i386_set_pc): Add debugging.
604 (i386_breakpoint_at): New function.
605 (the_low_target): Add new members.
606 * linux-mips-low.c (mips_get_pc, mips_set_pc)
607 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
608 (mips_breakpoint_at): New.
609 (the_low_target): Add new members.
610 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
611 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
612 (the_low_target): Add new members.
613 * linux-sh-low.c (sh_get_pc, sh_set_pc)
614 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
615 (the_low_target): Add new members.
616 * linux-x86-64-low.c (target_regsets): Add new kind
617 identifier.
618
619 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
620
621 From Martin Pool <mbp@samba.org>:
622 * server.c (gdbserver_usage): New function.
623 (main): Call it.
624
625 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
626
627 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
628 stop_at -> stop_pc.
629
630 2002-05-04 Andrew Cagney <ac131313@redhat.com>
631
632 * Makefile.in: Remove obsolete code.
633
634 2002-04-24 Michal Ludvig <mludvig@suse.cz>
635
636 * linux-low.c (regsets_fetch_inferior_registers),
637 (regsets_store_inferior_registers): Removed cast to int from
638 ptrace() calls.
639 * regcache.h: Added declaration of struct inferior_info.
640
641 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
642
643 * inferiors.c (struct inferior_info): Add regcache_data.
644 (add_inferior): Call create_register_cache.
645 (clear_inferiors): Call free_register_cache.
646 (inferior_regcache_data, set_inferior_regcache_data): New functions.
647 * regcache.c (struct inferior_regcache_data): New.
648 (registers): Remove.
649 (get_regcache): New function.
650 (create_register_cache, free_register_cache): New functions.
651 (set_register_cache): Don't initialize the register cache here.
652 (registers_to_string, registers_from_string, register_data): Call
653 get_regcache.
654 * regcache.h: Add prototypes.
655 * server.h: Likewise.
656
657 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
658
659 * mem-break.c: New file.
660 * mem-break.h: New file.
661 * Makefile.in: Add mem-break.o rule; update server.h
662 dependencies.
663 * inferiors.c (struct inferior_info): Add target_data
664 member.
665 (clear_inferiors): Free target_data member if set.
666 (inferior_target_data, set_inferior_target_data): New functions.
667 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
668 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
669 * linux-low.c (linux_bp_reinsert): New variable.
670 (struct inferior_linux_data): New.
671 (linux_create_inferior): Use set_inferior_target_data.
672 (linux_attach): Likewise. Call add_inferior.
673 (linux_wait_for_one_inferior): New function.
674 (linux_wait): Call it.
675 (linux_write_memory): Add const.
676 (initialize_low): Call set_breakpoint_data.
677 * linux-low.h (struct linux_target_ops): Add breakpoint
678 handling members.
679 * server.c (attach_inferior): Remove extra add_inferior
680 call.
681 * server.h: Include mem-break.h. Update inferior.c
682 prototypes.
683 * target.c (read_inferior_memory)
684 (write_inferior_memory): New functions.
685 * target.h (read_inferior_memory)
686 (write_inferior_memory): Change macros to prototypes.
687 (struct target_ops): Update comments. Add const to write_memory
688 definition.
689
690 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
691
692 * linux-low.c (usr_store_inferior_registers): Support
693 registers which are allowed to fail to store.
694 * linux-low.h (linux_target_ops): Likewise.
695 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
696 (ppc_cannot_store_register): FPSCR may not be storable.
697
698 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
699
700 * server.h: Include <string.h> if HAVE_STRING_H.
701 * ChangeLog: Correct paths in last ChangeLog entry.
702
703 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
704
705 * linux-low.h: Remove obsolete prototypes.
706 (struct linux_target_ops): New.
707 (extern the_low_target): New.
708 * linux-low.c (num_regs, regmap): Remove declarations.
709 (register_addr): Use the_low_target explicitly.
710 (fetch_register): Likewise.
711 (usr_fetch_inferior_registers): Likewise.
712 (usr_store_inferior_registers): Likewise.
713 * linux-arm-low.c (num_regs): Remove.
714 (arm_num_regs): Define.
715 (arm_regmap): Renamed from regmap, made static.
716 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
717 made static.
718 (arm_cannot_store_register): Renamed from cannot_store_register,
719 made static.
720 (the_low_target): New.
721 * linux-i386-low.c (num_regs): Remove.
722 (i386_num_regs): Define.
723 (i386_regmap): Renamed from regmap, made static.
724 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
725 made static.
726 (i386_cannot_store_register): Renamed from cannot_store_register,
727 made static.
728 (the_low_target): New.
729 * linux-ia64-low.c (num_regs): Remove.
730 (ia64_num_regs): Define.
731 (ia64_regmap): Renamed from regmap, made static.
732 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
733 made static.
734 (ia64_cannot_store_register): Renamed from cannot_store_register,
735 made static.
736 (the_low_target): New.
737 * linux-m68k-low.c (num_regs): Remove.
738 (m68k_num_regs): Define.
739 (m68k_regmap): Renamed from regmap, made static.
740 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
741 made static.
742 (m68k_cannot_store_register): Renamed from cannot_store_register,
743 made static.
744 (the_low_target): New.
745 * linux-mips-low.c (num_regs): Remove.
746 (mips_num_regs): Define.
747 (mips_regmap): Renamed from regmap, made static.
748 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
749 made static.
750 (mips_cannot_store_register): Renamed from cannot_store_register,
751 made static.
752 (the_low_target): New.
753 * linux-ppc-low.c (num_regs): Remove.
754 (ppc_num_regs): Define.
755 (ppc_regmap): Renamed from regmap, made static.
756 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
757 made static.
758 (ppc_cannot_store_register): Renamed from cannot_store_register,
759 made static.
760 (the_low_target): New.
761 * linux-s390-low.c (num_regs): Remove.
762 (s390_num_regs): Define.
763 (s390_regmap): Renamed from regmap, made static.
764 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
765 made static.
766 (s390_cannot_store_register): Renamed from cannot_store_register,
767 made static.
768 (the_low_target): New.
769 * linux-sh-low.c (num_regs): Remove.
770 (sh_num_regs): Define.
771 (sh_regmap): Renamed from regmap, made static.
772 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
773 made static.
774 (sh_cannot_store_register): Renamed from cannot_store_register,
775 made static.
776 (the_low_target): New.
777 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
778 (the_low_target): New.
779
780 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
781
782 * Makefile.in: Add stamp-h target.
783 * configure.in: Create stamp-h.
784 * configure: Regenerated.
785
786 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
787
788 * inferiors.c: New file.
789 * target.c: New file.
790 * target.h: New file.
791 * Makefile.in: Add target.o and inferiors.o. Update
792 dependencies.
793 * linux-low.c (inferior_pid): New static variable,
794 moved from server.c.
795 (linux_create_inferior): Renamed from create_inferior.
796 Call add_inferior. Return 0 on success instead of a PID.
797 (linux_attach): Renamed from myattach.
798 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
799 (linux_thread_alive): Renamed from mythread_alive.
800 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
801 child dies.
802 (linux_resume): Renamed from myresume. Add missing ``return 0''.
803 (regsets_store_inferior_registers): Correct error message.
804 Add missing ``return 0''.
805 (linux_fetch_registers): Renamed from fetch_inferior_registers.
806 (linux_store_registers): Renamed from store_inferior_registers.
807 (linux_read_memory): Renamed from read_inferior_memory.
808 (linux_write_memory): Renamed from write_inferior_memory.
809 (linux_target_ops): New structure.
810 (initialize_low): Call set_target_ops ().
811 * remote-utils.c (unhexify): New function.
812 (hexify): New function.
813 (input_interrupt): Send signals to ``signal_pid''.
814 * server.c (inferior_pid): Remove.
815 (start_inferior): Update create_inferior call.
816 (attach_inferior): Call add_inferior.
817 (handle_query): New function.
818 (main): Call handle_query for `q' packets.
819 * server.h: Include "target.h". Remove obsolete prototypes.
820 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
821
822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
823
824 * Makefile.in: Add WARN_CFLAGS. Update configury
825 dependencies.
826 * configure.in: Check for <string.h>
827 * configure: Regenerate.
828 * config.in: Regenerate.
829 * gdbreplay.c: Include needed system headers.
830 (remote_open): Remove strchr prototype.
831 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
832 * regcache.c (supply_register): Change buf argument to const void *.
833 (supply_register_by_name): Likewise.
834 (collect_register): Change buf argument to void *.
835 (collect_register_by_name): Likewise.
836 * regcache.h: Add missing prototypes.
837 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
838 * server.c (handle_query): New function.
839 (attached): New static variable, moved out of main.
840 (main): Quiet longjmp clobber warnings.
841 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
842 * utils.c (error): Remove NORETURN.
843 (fatal): Likewise.