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