OSDN Git Service

* linux-target.c (struct peekuser_pokeuser_reginfo)
[pf3gnuchains/pf3gnuchains3x.git] / rda / unix / ChangeLog
1 2003-01-22  Kevin Buettner  <kevinb@redhat.com>
2
3         * linux-target.c (struct peekuser_pokeuser_reginfo)
4         [MIPS64_LINUX_TARGET, MIPS_LINUX_TARGET]: Disable registers ``cause''
5         and ``bad'' since they are not writable via ptrace().
6
7 2003-01-19  Alexandre Oliva  <aoliva@redhat.com>
8
9         * linux-target.c: Don't assume asm-mips/ is available, use just
10         asm instead.
11
12 2003-01-17  Kevin Buettner  <kevinb@redhat.com>
13
14         * configure.in (mips64*linux*n64, mips64*linux*n32, mips64*linux*o32):
15         Remove cases.  Instead, use compiler's preprocessor symbols to test
16         which ABI is being used.
17         * configure: Regenerate.
18
19 2003-01-16  Kevin Buettner  <kevinb@redhat.com>
20
21         * config.in (LIBTHREAD_DB_SO): New macro.
22         * configure.in (mips64*linux*): Remove no-threads.o from
23         TARGET_MODULES list.  Add thread-db.o to this list.
24         * configure: Regenerate.
25
26 2003-01-10  Kevin Buettner  <kevinb@redhat.com>
27
28         * Makefile.in: Regenerate using "automake --cygnus --ignore-deps".
29         Someday, when ``depcomp'' is added to the top level, the
30         --ignore-deps flag can be discarded.
31
32 2002-12-18  Kevin Buettner  <kevinb@redhat.com>
33
34         * ptrace-target.h, ptrace-target.c (ptrace_write_user)
35         (ptrace_read_user): Add struct gdbserv argument.
36         * linux-target.c: Fix all callers.
37         * ptrace-target.c (ptrace_write_user, ptrace_read_user): Add
38         debugging printf()s.
39         (ptrace_xfer_mem): Fix debugging printf()s so that they'll print
40         useful results when sizeof (long long) is the same as
41         sizeof (ptrace_xfer_type).
42         (ptrace_xfer_mem): Decode address using gdbserv_host_bytes_from_reg()
43         instead of gdbserv_reg_to_ulong().
44
45 2002-12-02  Kevin Buettner  <kevinb@redhat.com>
46
47         * linux-target.c (linux_get_reg, linux_set_reg, reg_from_regset)
48         (reg_to_regset, get_regset, put_regset reg_from_gregset)
49         (reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
50         (reg_from_xregset, reg_to_xregset): Adjust all calls to
51         gdbserv_host_bytes_to_reg() and gdbserv_host_bytes_from_reg()
52         to account for change in interface.  Remove code which is
53         no longer needed due to improvements in the aforementioned
54         functions.
55         (sign_extend): New constant.
56         (FPR_BASE, PC, CAUSE, BADVADDR, MMHI, MMLO, FPC_CSR, FPC_EIR):
57         Make sure these are defined.
58         (PROTO_SIZE): Define.
59         (reginfo) [MIPS_LINUX_TARGET]: Use PROTO_SIZE to initialize
60         table with size (width) of registers to use when communicating
61         with the client.
62         (NUM_REGS, PC_REGNUM, reginfo) [MIPS64_LINUX_TARGET]: Define.
63
64 2002-11-19  Michael Snyder  <msnyder@redhat.com>
65
66         * ptrace-target.c: Fix typo in copyright.
67
68 2002-08-23  Kevin Buettner  <kevinb@redhat.com>
69
70         * linux-target.c (linux_get_reg, linux_set_reg): Print an
71         error message for out of bound registers.
72
73 2002-08-23  Kevin Buettner  <kevinb@redhat.com>
74
75         * linux-target.c (NUM_REGS) [X86_LINUX_TARGET]: Bump to 42.
76         (getregs_setregs_reginfo) [X86_LINUX_TARGET]: Add entry for
77         register ``orig_eax''.
78         (linux_get_reg, linux_set_reg): Make sure ``regno'' value is valid.
79         (linux_detach, linux_attach, decr_pc_after_break): Call fprintf()
80         instead of printf().
81         (linux_detach, linux_attach): Don't always print informational
82         messages.
83         * ptrace-target.c (handle_waitstatus, ptrace_detach, ptrace_attach):
84         Don't always print informational messages.  Use fprintf() instead
85         of printf().
86         (noop_get_trap_number, noop_compute_signal, noop_exit_program)
87         (noop_signlestep_program, noop_break_program): Delete.
88         (ptrace_flush_i_cache): Renamed from noop_flush_i_cache.  Update
89         reference in ptrace_attach().
90         (continue_lwp, singlestep_lwp, attach_lwp, stop_lwp, ps_pstop)
91         (ps_continue, ps_lstop): Use fprintf() instead of printf().
92         * server.c (errno.h): Include.
93         (usage): New function.
94         (main): Add option processing code.
95         * server.h (struct child_process): Add new field,
96         ``debug_informational''.
97         * thread-db.c (ps_plog, select_pending_event, send_pending_signals)
98         (wait_all_threads, thread_db_check_child_state): Use fprintf()
99         instead of printf().
100         (thread_db_detach): Conditionally print informational messages.
101         Use fprintf() instead of printf().
102
103 2002-08-21  Kevin Buettner  <kevinb@redhat.com>
104
105         * Makefile.am, configure.in, dummy-target.c, linux-target.c,
106         ptrace-target.c, ptrace-target.h, server.h, solaris-target.c,
107         thread-db.c: Change ``libremote'' references into ``RDA''
108         references.
109         * Makefile.in, configure: Regenerate.
110
111 2002-08-15  Kevin Buettner  <kevinb@redhat.com>
112
113         * dummy-target.c, gdb_proc_service.h, gdbserv-thread-db.h,
114         linux-target.c, no-threads.c, ptrace-target.c,
115         ptrace-target.h, server.c, server.h, solaris-target.c,
116         thread-db.c: Update copyright notices.
117
118 2002-05-16  Kevin Buettner  <kevinb@redhat.com>
119
120         * config.in (GREGSET_T): Renamed from GDB_GREGSET_T.
121         (FPREGSET_T): Renamed from GDB_FPREGSET_T.
122         * configure.in: Likewise.
123         * gdbserv-thread-db.h: Likewise.
124         * linux-target.c: Likewise.
125         * thread-db.c: Likewise.
126         * gdb_proc_service.h: Remove everything that's not absolutely
127         needed.
128
129 2002-02-01  Kevin Buettner  <kevinb@redhat.com>
130
131         * configure.in (arm32): Change to ``yes''.
132         * configure: Regenerate.
133
134 2002-01-30  Kevin Buettner  <kevinb@redhat.com>
135
136         * linux-target.c (linux_get_reg) [GETREGS_SETREGS_REGINFO]: Add
137         NOREGS support.
138         (linux_set_reg) [GETREGS_SETREGS_REGINFO]: Likewise.
139
140 2002-01-28  Kevin Buettner  <kevinb@redhat.com>
141
142         * linux-target.c (write_reg_bytes): Print return status in
143         ptrace failure message.
144         * ptrace-target.c (ptrace_write_user): Enable existing 
145         Linux/MIPS related kernel bug workaround when MIPS_LINUX_TARGET
146         is defined (which is in addition to _MIPSEL).
147
148 2002-01-28  Kevin Buettner  <kevinb@redhat.com>
149
150         * thread-db.c (struct regset_cache): New struct declaration.
151         (thread_db_map_id2thr_cache_valid, fpregset_cache, gregset_cache):
152         New static globals.
153         (thread_db_map_id2thr, thread_db_invalidate_map_id2thr_cache)
154         (initialize_regset_cache, initialize_regset_caches)
155         (thread_db_flush_regset_cache, thread_db_flush_regset_caches)
156         (thread_db_get_regset, thread_db_set_regset)
157         (thread_db_invalidate_regset_cache, thread_db_invalidate_regset_caches)
158         (thread_db_invalidate_caches, thread_db_getfpregs)
159         (thread_db_set_fpregs, thread_db_getgregs, thread_db_setgregs)
160         (td_thr_getfpregs_wrapper, td_thr_getgregs_wrapper)
161         (td_thr_setfpregs_wrapper, td_thr_setgregs_wrapper):
162         New functions.
163         (update_thread_list, thread_db_get_thread_reg)
164         (thread_db_set_thread_reg): Call thread_db_map_id2thr() instead of
165         td_ta_map_id2thr_p().
166         (thread_db_get_thread_reg): Call thread_db_getfpregs() instead
167         of td_thr_getfpregs_p().  Call thread_db_getgregs() instead of
168         td_thr_getgregs_p().
169         (thread_db_set_thread_reg): Likewise.  Also, call
170         thread_db_setfpregs() instead of td_thr_setfpregs_p() and
171         call thread_db_setgregs() instead of td_thr_setgregs_p().
172         (continue_thread, thread_db_continue_program)
173         (thread_db_singlestep_program, thread_db_continue_thread)
174         (singlestep_thread): Call thread_db_flush_regset_caches() at
175         beginning of function and thread_db_invalidate_caches() at
176         end of function.
177         (thread_db_attach): Initialize regset caches.
178
179 2002-01-15  Kevin Buettner  <kevinb@redhat.com>
180
181         * config.in (Generated automatically comment): Revise to note
182         that this file was generated automatically at one time, but is
183         no longer.
184         (LINUX_TARGET, SOLARIS_TARGET): Fix comments.
185         (MIPS_LINUX_TARGET): Add.
186         * configure.in (i?86*linux*, powerpc*linux*, arm*linux*, mips*linux*):
187         Eliminate unnecessary duplication.
188         (mips*linux*): Target is MIPS_LINUX_TARGET, not SH_LINUX_TARGET.
189         * gdbserv-thread-db.h (is_gp_reg): New function.
190         (is_fp_reg, is_extended_reg): Revise comments.
191         * linux-target.c (enum regset): Add new constant NOREGS.
192         (is_gp_reg): New function.
193         (PEEKUSER_POKEUSER_REGINFO) [MIPS_LINUX_TARGET]: Define.
194         (SIZEOF_REGMAP, SIZEOF_MAPPEDREG) [MIPS_LINUX_TARGET]: Delete.
195         (NUM_REGS) [MIPS_LINUX_TARGET]: Change from 38 to 70 to account
196         for addition of floating point support.
197         (regmap) [MIPS_LINUX_TARGET]: Delete this array.
198         (is_fp_reg, is_extended_reg) [MIPS_LINUX_TARGET]: Delete.
199         (reginfo) [MIPS_LINUX_TARGET]: Define.
200         (DEBUG): Delete this macro definition.
201         (disp_gdb_mesg, ptrace_get_mem, ptrace_set_mem): Delete function
202         declarations.
203         (linux_get_reg, linux_set_reg) [PEEKUSER_POKEUSER_REGINFO]: Add
204         NOREGS support.
205         (put_regset) [PEEKUSER_POKEUSER_REGINFO]: Add missing return
206         statement.
207         (mips_get_reg): Use read_reg_bytes() to fetch the register.
208         (mips_singlestep_program): Eliminate unused variables ``u_regs_base'',
209         ``temp_reg''.  Fix fprintf related format warning.
210         * ptrace-target.h (ptrace_check_child_state): Declare.
211         * thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
212         Handle case of target not supporting one or more registers.
213
214 2001-10-15  Kevin Buettner  <kevinb@redhat.com>
215
216         * gdbserv-thread-db.h (is_extended_reg, reg_to_xregset)
217         (reg_from_xregset): New functions.
218         (debug_get_pc, decr_pc_after_break): Add declaration.
219         * linux-target.c (sys/procfs.h): Include.
220         (MAX_REG_SIZE): New anonymous enum constant.
221         (enum regset): New enum.
222         (getregs_setregs_reginfo, peekuser_pokeuser_reginfo): New structs.
223         (offsetof, fieldsize): New macros.
224         (ARM_LINUX_TARGET, X86_LINUX_TARGET, PPC_LINUX_TARGET): Deleted
225         old data structures defining register maps for these registers.
226         Replaced with new tables using either getregs_setregs_reginfo
227         or peekuser_pokeuser_reginfo structs.  Other architectures
228         remain the same, though reoranized somewhat.
229         (linux_next_gg_reg, linux_gg_reg_nr): Revise comments.  Use
230         NUM_REGS instead of NUM_G_PACKET_REGS.
231         (get_xregsetsize): New function.
232         (linux_reg_format, linux_sizeof_reg, is_fp_reg, is_extended_reg)
233         [PEEKUSER_POKEUSER_REGINFO, GETREGS_SETREGS_REGINFO]: New functions.
234         (read_reg_bytes, write_reg_bytes, debug_get_reg, debug_get_pc)
235         (linux_get_reg, linux_set_reg, reg_from_regset, reg_to_regset)
236         (reg_from_gregset, reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
237         (reg_from_xregset, reg_to_xregset, get_regset, put_regset, get_gregset)
238         (put_gregset, get_fpregset, put_fpregset, get_xregset, put_xregset)
239         [PEEKUSER_POKEUSER_REGINFO]: New functions.
240         (read_reg_as_ulong, write_reg_as_ulong, debug_get_reg, debug_get_pc)
241         (linux_get_reg, linux_set_reg, regs_from_gregset, regs_to_gregset)
242         (reg_from_fpregset, reg_to_fpregset, reg_from_xregset, reg_to_xregset)
243         (get_gregset, put_gregset, get_fpregset, put_fpregset, get_xregset)
244         (put_xregset) [GETREGS_SETREGS_REGINFO]: New functions.
245         (linux_process_get_regs, linux_process_get_reg, linux_process_set_reg)
246         (linux_process_set_regs, ppc_linux_process_set_reg)
247         (ppc_linux_process_get_reg, ppc_linux_process_set_regs)
248         (ppc_linux_process_get_regs): Deleted.
249         (linux_attach): Reorganize initializations.
250         (generic_linux_set_reg): Renamed to linux_set_reg.
251         (generic_linux_get_reg): Renamed to linux_get_reg.
252         (generic_linux_sizeof_reg): Renamed to linux_sizeof_reg.
253         (generic_linux_gg_reg_nr): Renamed to linux_gg_reg_nr.
254         (generic_linux_next_gg_reg): Renamed to linux_next_gg_reg.
255         (generic_linux_reg_format): Renamed to linux_reg_format.
256         (decr_pc_after_break): Consolidated versions of this function
257         down to two; one for x86 and one for everything else.  Also,
258         add ``serv'' parameter and fix all callers.
259         (debug_get_pc, debug_get_reg): Now only three versions of
260         this function, one for PEEKUSER_POKEUSER_REGINFO code,
261         one for GETREGS_SETREGS_REGINFO code, and one for legacy
262         code.  Also, debug_get_pc() now takes a ``serv'' parameter.
263         Fixed all callers.
264         (ps_lgetregs): Use new get_gregset() interface.
265         (ps_lsetregs): Use new put_gregset() interface.
266         (ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs)
267         (ps_lsetxregs): Implement.
268         * ptrace-target.c (ptrace_read_user, ptrace_write_user): Make
269         ``buff'' argument of type ``void *'' instead of ``char *''.
270         (ptrace_get_gregs): Add new parameter ``alt_pid''.
271         (ptrace_set_gregs): Likewise.
272         (ptrace_get_fpregs): Add new parameter alt_pid.  Also fix call
273         to ptrace() so parameters are in correct order.
274         (ptrace_set_fpregs): Likewise.
275         (ptrace_get_fpxregs, ptrace_set_fpxregs): New functions.
276         * ptrace-target.h (ptrace_write_user, ptrace_read_user)
277         (ptrace_get_gregs, ptrace_set_gregs, ptrace_get_fpregs)
278         (ptrace_set_fpregs, ptrace_get_fpxregs, ptrace_set_fpxregs):
279         Declare.
280         * thread-db.c (td_thr_getxregsize_p, td_thr_getxregs_p)
281         (td_thr_setxregs_p): New function pointers.
282         (thread_db_dlopen): Initialize new function pointers.
283         (send_pending_signals): Add ``process'' parameter so that
284         decr_pc_after_break() can get the ``serv'' argument.  Fix all
285         callers.
286         (thread_db_get_thread_reg, thread_db_set_thread_reg): Add xregset
287         support.
288
289 2001-10-14  Kevin Buettner  <kevinb@redhat.com>
290
291         * ptrace-target.c (unistd.h): Include.
292         (close_open_files): New function.
293         (ptrace_create_child):  In newly forked child process, call
294         close_open_files() before invoking execv().
295
296 2001-10-13  Kevin Buettner  <kevinb@redhat.com>
297
298         * server.c (signal.h): Include.
299         (chld_handler): New function.
300         (main): Establish chld_handler as the SIGCHLD signal handler.
301         Also, wait 1 second instead of 0 seconds to avoid busy waiting.
302
303 2001-09-26  Louis Hamilton  <hamilton@redhat.com>
304
305         * configure.in: Use thread-db.c for ARM.
306         * configure: Regenerated.
307         * linux-target.c (ARM_R11, ARM_R12): Added to regmap[].
308         (ARM_FP, ARM_CPSR): Revised mappings of these ARM registers.
309         (debug_get_reg, debug_get_pc, decr_pc_after_break) [ARM_LINUX_TARGET]:
310         New functions.
311         
312 2001-09-20  Kevin Buettner  <kevinb@redhat.com>
313
314         * configure.in: Use thread-db.c for Linux/PPC too.
315         * configure: Regenerated.
316         * linux-target.c (linux_read_reg): Add forward declaration.
317         (debug_get_reg, debug_get_pc, decr_pc_after_break) [PPC_LINUX_TARGET]:
318         New functions.
319
320 2001-09-20  Kevin Buettner  <kevinb@redhat.com>
321
322         * linux-target.c (SIZEOF_MAPPEDREG) [PPC_LINUX_TARGET]: Add comment.
323         (PC_REGNUM) [PPC_LINUX_TARGET]: Remove FIXME comment.
324         (is_fp_reg) [PPC_LINUX_TARGET]: Revise upper bound on floating
325         point register numbers.
326         (ppc_linux_getset_reg): Rewritten to use regmap[] to fetch
327         ptrace() offsets.  This'll handle the (previously unsupported)
328         floating point registers, cr, lr, ctr, and xer.
329         (ppc_linux_process_set_regs, ppc_linux_process_get_regs): Don't
330         hardcode loop upper bound.
331         (ppc_linux_process_get_regs): Revise declarator to match
332         process_get_regs member in struct gdbserv_target.
333
334 2001-09-18  Andrew Haley  <aph@cambridge.redhat.com>
335
336         * server.c (main): Work around SIGCHLD problem.
337
338 2001-08-05  Michael Chastain  <chastain@redhat.com>
339
340         * ptrace-target.c (ptrace_write_user): Ignore ESRCH on MIPS,
341         because mips linux kernel 2.4 has a bug where PTRACE_POKEUSER
342         returns -ESRCH even when it succeeds.
343
344 2001-08-03  Michael Keezer  <mkeezer@redhat.com>
345
346         * configure.in: Add am33_2.0 & mn10300.
347         * config.in: Add AM33_LINUX_TARGET & AM33_2_0_LINUX_TARGET.
348         * linux-target.c: am33_2.0 & mn10300 support.
349
350 2001-07-23  David Howells  <dhowells@redhat.com>
351
352         * ptrace-target.c: Added big-endian MIPS support.
353         * linux-target.c: ditto.
354         * server.h: ditto.
355
356 2001-06-25  Michael Snyder  <msnyder@redhat.com>
357
358         * ptrace-target.c (ptrace_compute_signal): Implement conversion 
359         from native signals to GDB's signal numbering.
360         (ptrace_process_signal): Implement conversion from GDB's signal
361         numbering to native signals.
362         (stop_lwp): Comment out debugging output of SIGSTOP signals.
363         * linix-target.c (linux_fromtarget_break): Call compute_signal.
364         (linux_fromtarget_terminate): Ditto.
365         * thread-db.c (thread_db_check_child_state): Don't do any conversion
366         when passing a signal directly back to the inferior; just copy from
367         stop_signal to signal_to_send.
368         (thread_db_fromtarget_thread_break): Convert signal from native
369         numbering to GDB's numbering.
370
371 2001-06-18  Michael Snyder  <msnyder@redhat.com>
372
373         * linux-target.c (generic_linux_set_reg): Fix typo.
374         (decr_pc_after_break): Mute the debugging output.
375
376 2001-06-15  Michael Snyder  <msnyder@redhat.com>
377
378         * thread_db.c: Disable noisy debugging output.
379         (select_pending_event): Add new selection criterion, giving
380         preference to a thread that is being single-stepped.  This 
381         avoids the problem of deciding whether to decrement the pc if
382         we don't know whether a SIGTRAP was caused by stepping or by
383         hitting a breakpoint.
384
385 2001-06-14  Michael Snyder  <msnyder@redhat.com>
386
387         * thread-db.c (thread_db_set_gen, thread_db_get_gen): Rewrite
388         syntax for qSymbol messages.
389         * gdb_proc_service.h: New file.
390         * Makefile.am (INCLUDES): Remove $(srcdir)/../../include.
391         * Makefile.in: Regenerate.
392
393 2001-05-31  Michael Snyder  <msnyder@redhat.com>
394
395         * thread-db.c (add_thread_to_list): Return explicit value!
396
397 2001-05-23  Jackie Smith Cashion <jsmith@redhat.com>
398
399         * linux-target.c: Change MIPS SIZEOF_MAPPEDREG from 1 to 4.
400         (linux_register_offset): For MIPS return regmap[regnum] instead of
401         SIZEOF_MAPPEDREG * regmap[regnum].
402         (mips_get_reg): Pass pid as argument to ptrace_read_user instead of
403         gdbserv pointer.
404         
405 2001-05-22  Michael Snyder  <msnyder@redhat.com>
406
407         * no-threads.c: New file.
408         * configure.in: Use thread-db.c only for specified architectures, 
409         (including x86); otherwise default to using no-threads.c.
410         * configure: Regenerate.
411         
412 2001-05-10  Martin M. Hunt  <hunt@redhat.com>   
413
414         * linux-target.c (is_fp_reg): New function for mips. 
415         FP not implemented.
416         
417         Merged changes from symbol branch with appropriate modifications.
418
419 Mon Mar 26 08:54:41 PST 2001  Brendan Conoboy <blc@redhat.com>
420  
421         * configure.in: Added mipsvr4181el* target
422         * configure: regenerate
423  
424 2001-01-26  Rudy Folden <rfolden@redhat.com>
425         
426         * server.c: Changed name from gdbgeneral_xxx to gdbconnect_xx.
427  
428 2001-01-24  Rudy Folden <rfolden@redhat.com>
429  
430         * configure: Added mipsel* target.
431         * linux-target.c: Add support for MIPS processor, including single-
432         stepping which doesn't exist in mips ptrace.
433         * ptrace-target.c (ptrace_handle_waitstatus): Added single-stepping
434         instruction restore for mips.
435         (ptrace_attach): Added single stepping initialization code.
436         * server (main): Added generic interfaces, gdbgeneral_startup/shutdown
437         for serial or tcp/ip selection. Also added server_quit_p to X and W 
438         for serial support (no socket shutdown).
439         * server.h (child_process): Added mips instruction save area for
440         single-step support.
441
442         2001-01-10  Rudy Folden <rfolden@redhat.com>
443         * ptrace-target.c (enum): Added U_REGS_OFFSET to processor
444         dependent enums.
445
446 2001-04-26  Michael Snyder  <msnyder@redhat.com>
447
448         * linux-target.c (is_fp_reg): New function.
449         (reg_from_fpregset, reg_to_fpregset): New functions.
450         Support for thread_db_get_thread_reg floating point regs.
451         * thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
452         Infrastructure for support of floating point regs.
453         (Attach_thread): New function, abstracted from below.
454         (find_new_threads_callback): Call attach_thread.
455         (stop_thread): New function, abstracted from stop_all_threads.
456         (stop_all_threads): Call stop_thread.
457         (continue_thread): Test for lwp == 0 before calling continue_lwp.
458         * ptrace-target.c (stop_lwp): New function.
459         * gdbserv-thread-db.h (reg_to_regnum, reg_from_regnu): Declare.
460
461 2001-04-25  Michael Snyder  <msnyder@redhat.com>
462
463         Move all ptrace references out of thread-db.c.
464         * gdbserv-thread-db.h: New file.
465         * thread-db.c (struct ps_prochandle): Move to gdbserv-thread-db.h.
466         (gdb_ps_prochandle_t): Ditto.
467         (gdb_ps_read_buf_t, gdb_ps_write_buf_t, gdb_ps_size_t): Ditto.
468         (ps_pstop, ps_pcontinue): Move to ptrace-target.c.
469         (ps_lstop, ps_lcontinue): Ditto.
470         (ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite): Ditto.
471         (ps_lgetxregsize): Move to linux-target.c.
472         (ps_lgetxregs, ps_lsetxregs, ps_getpid): Ditto.
473         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Ditto.
474         (find_new_threads_callback): Abstract attach bits into new function
475         attach_lwp, and move that to ptrace-target.c.
476         (wait_all_threads): Call continue_lwp instead of ptrace.
477         (continue_pid): Rename as continue_lwp, move into ptrace-target.c.
478         (singlestep_pid): Rename as continue_lwp, move into ptrace-target.c.
479         (struct symbol_cache): Change value to a paddr_t.
480         (add_symbol_to_list, lookup_cached_symbol): Ditto.
481         * linux-target.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, 
482         ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs,
483         ps_getpid): Moved to here from thread-db.c.
484         * ptrace-target.c (continue_lwp, singlestep_lwp, attach_lwp,
485         (ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_pdread,
486         ps_pdwrite, ps_ptread, ps_ptwrite): Moved here from thread-db.c.
487         (ptrace_handle_waitstatus): Renamed as handle_waitstatus.
488         (ps_lcontinue): Implement (untested).
489         * server.c (main): Check server_quit_p after calling gdbloop_poll.
490
491
492 2001-04-24  Michael Snyder  <msnyder@redhat.com>
493
494         * thread-db.c (continue_pid, continue_thread): New functions.
495         (singlestep_pid, singlestep_thread): New functions.
496         (continue_all_threads): Use new function continue_thread.
497         (thread_db_continue_program): Ditto.
498         (thread_db_singlestep_program): Ditto.
499         (thread_db_continue_thread): Ditto.
500         (thread_db_singlestep_thread): Ditto.
501         
502         * thread-db.c: Remove some debugging printfs.
503         Add activation and handling of the thread debug signal.
504         (get_thread_signals): Get the debug signal as well as the others.
505         Set target flag to activate the debug signal.
506         (set_target_int_by_name): New function.
507         (struct gdbserv_thread): Rename "sigstopped" flag to just "stopped".
508         (stop_all_threads): Mark the event thread "stopped".
509         (wait_all_threads): Mark the event thread "waited".
510         Don't stash the debug signal (throw it away).
511         (continue_all_threads): Always send the restart signal to any
512         thread that has just been attached.
513         (thread_db_check_child_state): Make two calls to waitpid (one with
514         WCLONE, one without) instead of alternating every other time.
515         Add debug_signal to the list of events to ignore.
516         (thread_db_attach): Add "__pthread_threads_debug" to list of symbols.
517
518 2001-04-20  Michael Snyder  <msnyder@redhat.com>
519
520         * thread-db.c (thread_db_check_child_state): Add SIGCHLD to the
521         list of signals to ignore.  When a thread exits, make sure that
522         the other threads get restarted.
523
524 2001-04-19  Michael Snyder  <msnyder@redhat.com>
525
526         * thread-db.c (wait_all_threads): Save exit and term events.
527         Save SIGINT like any other signal event.  
528         (send_pending_signals): Don't send SIGINT.
529         (select_pending_event): Give preference to SIGINT.
530         (thread_db_check_child_state): Move special handling of 
531         cancel and restart signals to after the stop_all_threads
532         and wait_all_threads calls, so we can catch these signals
533         even if they aren't the first signal we get notification of.
534
535 2001-04-19  Michael Snyder  <msnyder@redhat.com>
536
537         Major change to select an event so as to avoid starvation.
538         * thread-db.c (select_pending_event): New function.  Choose an
539         event from the list of pending events, and make its thread the
540         event thread.
541         (stop_all_threads): Don't mark the event thread.  That will now
542         be done by select_pending_event.
543         (struct signal_list): Rename to event_list.  Save the thread and
544         the entire wait status, so that all events (not just signals)
545         can be saved.
546         (add_pending_signal): Rename to add_pending_event.
547         (send_pending_signals): Ignore non-signal events.
548         Ignore the selected event (which will be returned to the debugger).
549         Push back breakpoint events (moved here from wait_all_threads).
550         (wait_all_threads): Remove special handling for SIGTRAP (moved
551         into send_pending_signals).  Call select_pending_event.
552         (thread_db_check_child_status): Add initial event to event list.
553
554 2001-04-16  Michael Snyder  <msnyder@redhat.com>
555         * thread-db.c (thread_db_continue_thread): Handle the signal param.
556         (thread_db_singlestep_thread): Ditto.
557         (thread_db_check_child_state): Handle exit and termination separately.
558
559 2001-04-13  Michael Snyder  <msnyder@redhat.com>
560
561         * thread-db.c (find_new_threads_callback): Account for dead threads.
562         (update_thread_list): Keep zombie threads in thread list, but
563         delete them if they've been joined or detached.
564         (stop_all_threads): Don't stop dead threads.
565         (continue_all_threads): Don't continue if not waited.
566         (thread_db_check_child_state): Move handling of terminate and
567         exit earlier.  Handle termination or exit of children specially.
568         (thread_db_get_thread_reg): Test for defunct threads.
569         (thread_db_set_thread_reg): Ditto.
570         * ptrace-target.c (ptrace_xfer_mem): Don't be noisy about ptrace
571         errors caused by illegal memory accesses.
572
573 2001-04-12  Andrew Cagney  <ac131313@redhat.com>
574
575         * server.c: Include "gdbloop.h".  Replace gdbsocket_poll with
576         gdbloop_poll.
577         * ptrace-target.c, linux-target.c, solaris-target.c: 
578         * dummy-target.c: Update comments.
579
580 2001-04-11  Michael Snyder  <msnyder@redhat.com>
581
582         * thread-db.c (struct gdbserv_thread): Add new flag 'stepping'.
583         (stop_all_threads): Add parameter 'process'.
584         Set the process->event_thread here, instead of in check_child_state.
585         (wait_all_threads): Accept process as a parameter instead of eventpid.
586         Handle SIGTRAP differently if the thread was singlestepping.
587         (thread_db_singlestep_program): Clear flags for event thread.
588         (thread_db_singlestep_thread): Ditto.
589         (thread_db_continue_program): Ditto.
590         (thread_db_continue_thread): Ditto.
591         (thread_db_check_child_state): Cancel the stepping flag.
592         Don't set the event thread, this is now done in stop_all_threads.
593         * linux-target.c (debug_get_reg, debug_get_pc): New functions.
594         Purely for debugging output.  Architecture dependent.
595
596 2001-04-09  Michael Snyder  <msnyder@redhat.com>
597
598         * thread_db.c (thread_db_continue_thread): Continue the actual
599         thread given, not necessarily the event thread.
600         (thread_db_singlestep_thread): Step the actual thread given, 
601         not necessarily the event thread.
602
603 2001-04-09  Michael Snyder  <msnyder@redhat.com>
604
605         * thread-db.c (stop_all_threads): Do not send SIGSTOP to a thread
606         if it has already been sigstopped.
607         (thread_db_continue_thread): New function.  Continue a single thread.
608         (thread_db_singlestep_thread): New function.  Step a single thread.
609         (thread_db_attach): Set up continue_thread, singlestep_thread methods.
610         
611 2001-04-09  Michael Snyder  <msnyder@redhat.com>
612
613         * linux-target.c (PC_REGNUM): New enum, define.
614         (decr_pc_after_break): New function.  Architecture dependent.
615         This version will probably serve for all targets for which
616         DECR_PC_AFTER_BREAK is one.  Those for which it is zero will
617         want to define a no-op version of this function.
618         * thread-db.c (first_thread_in_list): New function.
619         (update_thread_list, stop_all_threads, wait_all_threads, 
620         continue_all_threads): Use first_thread_in_list in for loops.
621         (wait_all_threads): Handle SIGINT and SIGTRAP specially.
622         Throw away SIGINT for all threads but the event thread.
623         For SIGTRAP in other than the event thread, call decr_pc_after_break
624         (giving the thread a chance to hit the trap again later).
625         (thread_db_continue_program, thread_db_singlestep_program):
626         Continue the event thread before all the others.
627
628 2001-04-05  Michael Snyder  <msnyder@redhat.com>
629
630         * thread-db.c (add_pending_signal, send_pending_signals):
631         New functions.  Allow wait_all_threads to collect any signals
632         other than SIGSTOP from the threads and defer them.
633         (wait_all_threads): Loop on each thread and call waitpid until
634         we get SIGSTOP.  Any other signals are pended by throwing them
635         into a list, and then sending them back to the threads using kill.
636         (thread_db_get_thread_reg): Remove temporary hack for libthread_db
637         bug.  (thread_db_set_thread_reg): Ditto.
638
639 2001-04-04  Michael Snyder  <msnyder@redhat.com>
640
641         * server.h (struct child_process): Add a 'running' flag.
642         * thread_db.c (continue_all_threads): Take gdbserv as argument.
643         Use it to find the current thread, and don't continue that one
644         (leave it up to the parent method to continue the event thread.)
645         (thread_db_continue_program): Child is running -- set a flag.
646         (thread_db_singlestep_program): Ditto.
647         (thread_db_check_child_state): Return immediately unles the child
648         is running.  Because this is a polling routine, we don't want to
649         return any new events unles the child is officially running.
650         Call waitpid with -1 instead of the process->pid, so that we
651         can get events from the threads.  Alternately use __WCLONE.
652         (thread_db_get_thread_reg): If thread is not specified, use
653         the event thread (if possible).  Temporarily hack around a
654         bug in the thread_db library.
655         (thread_db_set_thread_reg): Ditto.
656         
657 2001-04-04  Michael Snyder  <msnyder@redhat.com>
658
659         * thread-db.c (continue_all_threads): Zero the attached, stopped,
660         and waited flags only if thread is successfully continued.
661         * linux-target.c: Fix broken endif directive.
662         * configure.in: Test for sys/procfs.h.
663         * config.in: Define HAVE_SYS_PROCFS_H.
664         * configure: Regenerate.
665         * thread-db.c (thread_list_lookup_by_pid): New function.
666         (thread_db_check_child_state): Cache the event thread.
667         (thread_db_fromtarget_thread_break): New function.  Call
668         gdbserv_fromtarget_thread_break with the event thread.
669         (thread_db_attach): Take over the fromtarget_break vector.
670         * server.h (struct child_process): Add event_thread field.
671
672 2001-04-02  Michael Snyder  <msnyder@redhat.com>
673
674         * thread-db.c: include errno.h for error reporting.
675         (struct gdbserv_thread): Add flag 'waited'.
676         (thread_db_type_str): New function for thread_extra_info.
677         (find_new_threads_callback): Use errno for error reporting.
678         (thread_db_thread_info): New function, for thread_extra_info.
679         (wait_all_threads): New function.  Call waitpid on all threads
680         that have been attached or sigstopped.  Incomplete -- needs to
681         push back any signals other than SIGSTOP.
682         (continue_all_threads): Send PTRACE_CONT only to threads that
683         have been attached or sigstopped.
684         (check_child_state): Call wait_all_threads.
685         (thread_db_attach): Activate thread_info vector.
686
687 2001-03-30  Michael Snyder  <msnyder@redhat.com>
688
689         * linux-target.c (linux_read_reg, linux_write_reg): New functions.
690         Abstract out the code to actually read a register value, so that 
691         it can be shared by several methods.
692         (get_gregset): Use sizeof (GREGSET_T).
693         (generic_linux_gg_reg_nr): New function.  Support new reg methods.
694         (generic_linux_next_gg_reg): Ditto.
695         (generic_linux_sizeof_reg): Ditto.
696         (generic_linux_reg_format): Ditto.
697         (generic_linux_get_reg): New function.  Newer register method,
698         non-thread-aware version.
699         (linux_attach): Use new register method in target vector.
700         * thread-db.c: Remove some developmental ifdef code.
701         (thread_db_get_thread_reg): Fall back on parentvec.get_reg
702         if no thread or no thread_agent available.
703         (thread_db_attach): Replace get_reg vector with get_thread_reg.
704
705         * ptrace-target.c (ptrace_write_user): For X86 target, skip
706         write-protected location in user/context address space.
707         * linux-target.c (linux_process_get_reg): Use linux_read_reg.
708         (linux_process_set_reg): Use linux_write_reg.
709         (put_gregset): New function.  Write child's gregset.
710         (generic_linux_get_reg): Use SIZEOF_MAPPEDREG.
711         (generic_linux_set_reg): New function.  Newer register method.
712         (linux_attach): Add set_reg to target vector, not process_set_reg.
713         * thread-db.c (ps_lsetregs): Implement by calling put_gregset.
714         (thread_db_set_thread_reg): New function.  Implement set_thread_reg.
715         (thread_db_attach): Add set_thread_reg to target vector.
716
717 2001-03-29  Michael Snyder  <msnyder@redhat.com>
718
719         * ptrace-target.c (ptrace_read_user, ptrace_write_user):
720         Accept an explicit pid instead of a struct gdbserv.
721         * linux-target.c: Include gdb_proc_service.h for gregset_t
722         (FIXME: better place to get it from?)
723         (linux_register_offset): Return signed long to facilitate 
724         test for -1 error return value.
725         (ppc_linux_xfer_reg, linux_process_get_reg, linux_process_set_reg):
726         Calls to ptrace_read_user and ptrace_write_user now need a pid
727         argument instead of a struct gdbserv.
728         (reg_from_gregset): New function.
729         (reg_to_gregset): New function.
730         (get_gregset): New function.  Read child's gregset.
731         * thread-db.c (ps_lgetregs): Implement by calling get_gregset.
732         (thread_db_dlopen, thread_db_open, thread_db_attach): Change 
733         sense of return: -1 now means failure, 0 means success.
734         (thread_db_get_thread_reg): Call reg_from_gregset.
735
736 2001-03-29  Michael Snyder  <msnyder@redhat.com>
737
738         * thread-db.c: Include signal.h, sys/ptrace.h (FIXME ptrace).
739         (struct symbol_cache): Make value (address) unsigned.
740         (add_symbol_to_list, lookup_cached_symbol): Ditto.
741         (struct gdbserv_thread): Add attached, stopped flags to thread.
742         (add_thread_to_list): Return pointer to new thread in list.
743         (delete_thread_from_list): New function.
744         (ps_pglobal_lookup, ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite):
745         Muffle debugging output.
746         (find_new_threads_callback): Muffle debugging output.
747         Add thread to list only if it isn't already there.
748         Use ptrace to attach to new threads.  (FIXME explicit ptrace).
749         (update_thread_list): New function.  Only place where td_ta_thr_iter
750         is called.  Builds up the thread list, prunes it of any dead threads.
751         (thread_db_thread_next): Call update_thread_list.
752         (get_thread_signals): Read the values of the cancel and restart
753         signals from the target using hardcoded symbol names.
754         (stop_all_threads): New function.  First cut.  Deliver SIGSTOP
755         to all threads except the event thread and any new threads that
756         have just been attached.
757         (continue_all_threads): New function.  First cut.  Deliver
758         PTRACE_CONT to all threads except the main thread.  Needs work.
759         (thread_db_continue_program): New function.  
760         (thread_db_singlestep_program): New function.
761         (thread_db_get_thread_reg): New function, incomplete.
762         (thread_db_attach): Take over continue_program, singlestep_program.
763         Muffle some debugging output.
764
765 2001-03-26  Michael Snyder  <msnyder@redhat.com>
766
767         * thread-db.c: New file.  Linux thread debugging layer.
768         * linux-target.c (linux_attach): Call thread_db_attach.
769         * ptrace-target.c: Export ptrace_handle_waitstatus for
770         thread-db.c (FIXME).
771         * configure.in: Add thread-db.c to linux target modules.
772         (GREGSET_T, FPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T,
773         HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET): Define.
774         * config.in (GREGSET_T, FPREGSET_T, HAVE_LWPID_T, 
775         HAVE_PSADDR_T, HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET): 
776         Default undefine.
777         * configure: Regenerate.
778         * Makefile.am (INCLUDES): Add $(srcdir)/../../include
779         (devo/include), so that header files can be shared with gdb.
780         (server_LDFLAGS): Add -ldl -rdynamic (FIXME configure).
781         * Makefile.in: Regenerate.
782
783 2001-03-22  Andrew Cagney  <ac131313@redhat.com>
784
785         * server.c (main): Pass gdbserver.attach and process to
786         gdbserver_startup instead of gdbserver_poll.
787
788 2001-03-16  Michael Snyder  <msnyder@redhat.com>
789
790         * linux-target.c (linux_detach): Pass new parameter to ptrace_detach.
791         Fix file header comment typo.  Update copyright.
792
793 2001-03-16  Elena Zannoni  <ezannoni@cygnus.com>
794
795         * dummy-target.c (dummy_detach): Add new parameter.
796         * linux-target.c (linux_detach): Ditto.
797         * ptrace-target.c (ptrace_detach): Ditto.
798         * solaris-target.c (solaris_detach): Ditto.
799
800 2001-03-14  Andrew Cagney  <ac131313@redhat.com>
801
802         * ChangeLog: Move to here from ../native.
803         * Makefile.am: Ditto.
804         * aclocal.m4: Ditto.
805         * configure.in: Ditto.
806         * dummy-target.c: Ditto.
807         * linux-target.c: Ditto.
808         * ptrace-target.c: Ditto.
809         * ptrace-target.h: Ditto.
810         * server.c: Ditto.
811         * server.h: Ditto.
812         * solaris-target.c: Ditto.
813         * Makefile.in: Regenerate.
814         * config.in: Ditto.
815         * configure: Ditto.
816
817 2001-03-14  Andrew Cagney  <ac131313@redhat.com>
818
819         * Makefile.am (INCLUDES): Update. Headers moved to ../include.
820         * Makefile.in: Regenerate.
821
822 2000-11-27  Michael Snyder  <msnyder@happy.cygnus.com>
823
824         * ptrace-target.c (ptrace_xfer_mem): Return -1 on error.
825
826 2000-11-21  Michael Snyder  <msnyder@cleaver.cygnus.com>
827
828         * ptrace-target.c (noop_flush_i_cache): Comment out superfluous
829         debugging output.
830         * linux-target.c (linux_process_get_reg): Return value of 
831         linux_register_offset is unsigned (can't be less than zero).
832         (linux_process_rcmd): Just use '1' and '0' to control debug output.
833
834 2000-11-06  Michael Snyder  <msnyder@cleaver.cygnus.com>
835
836         * dummy-target.c (dummy_attach): Fix order of memset args.
837         * linux-target.c (linux_attach): Ditto.
838         * ptrace-target.c (ptrace_attach): Ditto.
839         * solaris-target.c (solaris_attach): Ditto.
840
841 2000-10-19  Belinda Brazelle <brazelle@redhat.com>
842
843         * linux-target.c: Add support for Arm processor.
844
845 2000-10-12  Michael Snyder  <msnyder@cleaver.cygnus.com>
846
847         * ptrace-target.c (ptrace_handle_waitstatus): Save exitstatus
848         in process->stop_signal.
849
850 2000-09-14  Michael Snyder  <msnyder@michael.wirespeed.com>
851
852         * linux-target.c: Define regmap etc. for SH target.
853         * configure.in: Add defines for SH target.
854         * configure: Rebuild.
855
856 2000-09-13  Michael Snyder  <msnyder@michael.wirespeed.com>
857
858         * server.h (fromtarget_terminate): New field.  Also fix up 
859         some overlooked function prototypes in the existing fields.
860         (struct client_process): Rename to struct child_process.
861         * linux-target.c (linux_fromtarget_terminate): New function.
862         Called from main when child terminates abnormally.
863         (linux_process_rcmd): New function.  Catches "qRcmd" requests, 
864         which are currently used just to turn on debug output.
865         * ptrace-target.c (ptrace_handle_waitstatus): Set stop_signal
866         for the WIFSTOPPED case.  (ptrace_process_signal): Return zero
867         instead of the signal number, to let libremote know that we have
868         handled the signal.  (ptrace_xfer_memory): Fix off-by-one error.
869         * solaris-target.c (solaris_fromtarget_terminate): New function.
870         * server.c (main): Call fromtarget_terminate for the 'T' case.
871         Do not request a one-second delay from gdbsocket_poll.
872
873 2000-09-08  Michael Snyder  <msnyder@cleaver.cygnus.com>
874
875         * solaris-target.c: New file.  Just a prototype, doesn't actually
876         work.  Used to confirm configurability to multiple targets.
877         * dummy-target.c: New file.  Dummy back-end for implementing new
878         targets such as solaris-target.c (above), before actually having
879         a working back-end.  The dummy target works just like the sample
880         target in the samples directory.
881         * configure.in: Add AC_SUBST(TARGET_MODULES) to add the 
882         appropriate target modules to the Makefile.  Add solaris target.
883         * configure: Regenerate.
884         * Makefile.am: Move *-target.c into EXTRA_server_SOURCES.
885         Add TARGET_MODULES to server_LDADD.  Define server_DEPENDENCIES.
886         * Makefile.in: Regenerate.
887         * ptrace-target.h: New file.  Defines needed only by ptrace.
888         * server.h: Remove ptrace-specific defines to ptrace-target.h.
889         (struct server_vector): New, for target entry points.
890         (struct nativeserver): Rename to struct client_process.
891         * server.c: Use client_process for entry points, and server_vector.
892         * linux-target.c: Include ptrace-target.h.  
893         (ppc_linux_get_reg): Rename to ppc_linux_process_get_reg.
894         (ppc_linux_set_reg): Rename to ppc_linux_process_set_reg.
895         (ppc_linux_get_regs): Rename to ppc_linux_process_get_regs.
896         (ppc_linux_set_regs): Rename to ppc_linux_process_set_regs.
897         (linux_get_reg): Rename to linux_process_get_reg.
898         (linux_set_reg): Rename to linux_process_set_reg.
899         (linux_get_regs): Rename to linux_process_get_regs.
900         (linux_set_regs): Rename to linux_process_set_regs.
901         (gdbserver_check_child_state): Rename to linux_check_child_state.
902         (gdbserver_fromtarget_break): Rename to linux_fromtarget_break.
903         (gdbserver_fromtarget_exit): Rename to linux_fromtarget_exit.
904         (struct server_vector gdbserver): New, defines entry points.
905         * ptrace-target.c: Include ptrace-target.h.
906         * aclocal.m4: New file.
907
908 2000-09-08  Michael Snyder  <msnyder@cleaver.cygnus.com>
909
910         * linux-target.c (linux_get_reg, linux_set_reg): Remove direct
911         calls to ptrace; instead use service call into ptrace-target.c.
912         (linux_get_regs, linux_set_regs): Remove ifdef PPC; instead use
913         an ifdef in linux_attach to set up the target vector pointers.
914         (linux_attach): If PPC_LINUX_TARGET, use PPC versions of register
915         functions instead of generic ones.  Define process_set_reg, so
916         that the "P" command is now handled.
917
918 2000-09-07  Michael Snyder  <msnyder@cleaver.cygnus.com>
919
920         * ptrace-target.c (ptrace_read_user, ptrace_write_user): New 
921         functions.  Exported so that linux-target does not have to 
922         call ptrace directly.  (ptrace_get_gregs, ptrace_set_gregs, 
923         ptrace_get_fpregs, ptrace_set_fpregs): New functions.
924         Exported for use by targets that use these methods.
925         (ptrace_xfer_mem): Use ptrace_arg3_type instead of long.
926         Add address to error messages.  
927         * linux-target.c: Start using config macros, port to alpha and ppc.
928         (ppc_linux_xfer_reg, ppc_linux_getset_reg, ppc_linux_get_reg,
929         ppc_linux_set_reg, ppc_linux_get_regs, ppc_linux_set_regs):
930         New functions.  Explicit knowledge of ppc linux register layout.
931         (linux_get_reg): Catch undefined regmap offsets.
932         (linux_set_reg): Ditto.
933         (linux_get_regs): Conditionally call ppc_linux_get_regs.
934         (linux_set_regs): Ditto.
935         * configure.in: Add PPC target, and export target defines.
936         * configure: Regenerate.
937         * config.in: Add new target defines.
938
939 2000-09-06  Michael Snyder  <msnyder@cleaver.cygnus.com>
940
941         * Makefile.am: Define CC and CFLAGS.
942         * Makefile.in: Regenerate.
943         * configure.in: New file.  Detect all manner of things.
944         * config.in: New file.  Input file for config.h.
945         * configure: Generate.
946         * ptrace-target.c (ptrace_xfer_type): Move def'n into server.h.
947         (PTRACE_XFER_SIZE): Ditto.
948         * linux-target.c (ptrace_xfer_type): Move def'n into server.h.
949         (ptrace_arg3_type): Ditto.
950         * server.h: Use config macros to determine definitions of 
951         ptrace_xfer_type, ptrace_arg1_type, ptrace_arg2_type, 
952         ptrace_arg3_type, ptrace_arg4_type.
953
954 2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>
955
956         * server.c (main): Detect exit status, and call fromtarget_exit
957         instead of fromtarget_break.
958         * linux-target.c (gdbserver_fromtarget_exit): New function.
959         * ptrace-target.c (ptrace_kill_program, ptrace_sigkill_program):
960         New functions.  Send signals to the child.
961         (ptrace_exit_program): New function.
962
963 2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>
964
965         * linux-target.c (linux_attach): Activate process_signal vector.
966         (gdbserver_check_child_state): Send real received signal, instead
967         of faking SIGTRAP.
968         * ptrace-target.c (ptrace_break_program): New function.  Implement
969         control-c interrupt from host.
970         (ptrace_process_signal): Implement continuation signal.
971         (ptrace_singlestep_program): Ditto.
972         (ptrace_continue_program): Ditto.
973         (ptrace_get_trap_number): New function.  Return signal to libremote.
974         (ptrace_compute_signal): Ditto.
975         (ptrace_attach): Activate break_program, process_signal, compute_signal
976         and get_trap_number vectors.
977         server.h (struct nativeserver): add signal_to_send field.
978         Rename stop_sig to stop_signal.
979
980 2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>
981
982         * ptrace-target.c (ptrace_singlestep_program): Make ptrace args long.
983         FIXME: needs to be configurable.
984         * linux-target.c (linux_get_reg, linux_set_reg): Make regaddr and
985         regval configurable types.  FIXME needs real configury.
986
987 2000-09-01  Michael Snyder  <msnyder@cleaver.cygnus.com>
988         New directory "native" for native gdbserver in libremote.
989         * server.c: New file.  Entry point and main event loop.
990         * server.h: New file.  Shared declarations.
991         * linux-target.c: New file.  Linux version of libremote native stub.
992         * ptrace-target.c: New file.  Ptrace operations for libremote stub.
993         * Makefile.am: New file.  Automake source.
994         * Makefile.in: New file.  Automake-generated makefile source.
995         Note: this work is incomplete and only partially working.
996         
997