* linux-low.c (linux_wait_for_event): Do not pass signals while
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
2
3         * linux-low.c (linux_wait_for_event): Do not pass signals while
4         single-stepping.
5
6 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
7
8         * win32-low.c (create_process): New.
9         (win32_create_inferior): Use create_process instead of
10         CreateProcess.  If create_process failed retry appending an ".exe"
11         suffix.  Store the GetLastError result immediatelly after
12         create_process calls and use it on the call to error.
13
14 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15
16         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17
18 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
19
20         * configure.ac: Switch license to GPLv3.
21
22 2007-08-01  Michael Snyder  <msnyder@access-company.com>
23
24         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
25
26 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
27
28         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
29         typedef.
30         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
31         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
32         CloseToolhelp32Snapshot.
33         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
34         CloseToolhelp32Snapshot.
35
36 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
37
38         * server.c (main): Check for inferior exit before main loop.
39
40 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
41
42         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
43         instead of on tmp_desc.
44
45 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
46             Daniel Jacobowitz  <dan@codesourcery.com>
47
48         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
49         (add_thread): Minor cleanups.
50         (clear_inferiors): Move lower in the file.  Clear the DLL
51         list.
52         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
53         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
54         (xml_escape_text): New.
55         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
56         for qSupported.
57         (handle_v_cont): Report errors.
58         (gdbserver_version): Update.
59         (main): Correct size of own_buf.  Do not report initial DLL events.
60         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
61         (unloaded_dll, xml_escape_text): New.
62         * win32-low.c (enum target_waitkind): Update comments.
63         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
64         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
65         (win32_EnumProcessModules, win32_GetModuleInformation)
66         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
67         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
68         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
69         (win32_Module32First, win32_Module32Next, load_toolhelp)
70         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
71         (get_child_debug_event): Handle DLL events.
72         (win32_wait): Likewise.
73
74 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
75
76         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
77         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
78
79 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
80
81         * win32-low.c (handle_output_debug_string): Ignore event if not
82         waiting.
83
84 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
85
86         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
87
88 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
89
90         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
91
92 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
93
94         * inferiors.c (change_inferior_id): Add comment.
95         * linux-low.c (check_removed_breakpoint): Add an early
96         prototype.  Improve debug output.
97         (linux_attach): Doc update.
98         (linux_detach_one_process, linux_detach): Clean up before releasing
99         each process.
100         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
101         * linux-low.h (struct process_info): Doc improvement.
102         * mem-break.c (delete_all_breakpoints): New.
103         * mem-break.h (delete_all_breakpoints): New prototype.
104         * thread-db.c (find_first_thread): New.
105         (thread_db_create_event): Call it instead of
106         thread_db_find_new_threads.  Clean up unused variables.
107         (maybe_attach_thread): Remove first thread handling.
108         (thread_db_find_new_threads): Use find_first_thread.
109         (thread_db_get_tls_address): Likewise.
110
111 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
112
113         * thread-db.c (thread_db_find_new_threads): Add prototype.
114         (thread_db_create_event): Check for the main thread before adding
115         a new thread.
116         (maybe_attach_thread): Only enable event reporting if TID == 0.
117         (thread_db_get_tls_address): Check for new threads.
118
119 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
120
121         * linux-low.c (linux_create_inferior): Try execv before execvp.
122         * spu-low.c (spu_create_inferior): Likewise.
123
124 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
125
126         * linux-low.c (linux_create_inferior): Change execv to execvp.
127         * spu-low.c (spu_create_inferior): Likewies.
128
129 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
130
131         * Makefile.in (clean): Clean new files instead of deleted ones.
132         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
133         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
134         rules.
135         * configure.srv: Specify XML files and new regformats for MIPS and
136         MIPS64 GNU/Linux.
137         * linux-mips-low.c (mips_num_regs): Set to only used registers.
138         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
139         an entry for the restart register.
140         (mips_cannot_fetch_register, mips_cannot_store_register)
141         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
142         register names to match the XML descriptions.
143         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
144         restart register instead of $0.
145
146 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
147             Markus Deuling  <deuling@de.ibm.com>
148
149         * remote-utils.c (decode_xfer_write): New function.
150         * server.h (decode_xfer_write): Add prototype.
151         * server.c (handle_query): Add PACKET_LEN argument.  Support
152         qXfer:spu:read and qXfer:spu:write packets.
153         (main): Pass packet_len to handle_query.
154         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
155         * target.h (target_ops): Add qxfer_spu.
156
157 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
158
159         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
160         accessing non-seekable spufs files.
161
162 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
163
164         * server.c (handle_query): Add reply for qC packet. 
165
166 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
167             Leo Zayas  <lerele@champenstudios@com>
168
169         * server.h (check_remote_input_interrupt_request): New function.
170         * remote_utils.c (INVALID_DESCRIPTOR): New define.
171         (remote_desc): Initialize with INVALID_DESCRIPTOR.
172         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
173         (check_remote_input_interrupt_request): New function.
174         * server.h (check_remote_input_interrupt_request): Declare.
175         * win32-low.c (winapi_DebugBreakProcess,
176         winapi_GenerateConsoleCtrlEvent): New typedefs.
177         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
178         to 250 ms.
179         (win32_wait): Check for remote interrupt request
180         with check_remote_input_interrupt_request.
181         (win32_request_interrupt): New function.
182         (win32_target_op): Set request_interrupt to win32_request_interrupt.
183
184 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
185
186         * win32-low.c (debug_registers_changed,
187         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
188         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
189         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
190         (thread_rec): Get context using the low target.
191         (child_add_thread): Call thread_added on the low target,
192         which does the same thing.
193         (regptr): Delete.
194         (do_initial_child_stuff): Remove debug registers references.
195         Set context using the low target.  Resume threads after
196         setting the contexts.
197         (child_continue): Remove dead variable.  Remove debug
198         registers references.
199         (child_fetch_inferior_registers): Go through the low target.
200         (do_child_store_inferior_registers): Remove.
201         (child_store_inferior_registers): Go through the low target.
202         (win32_resume): Remove debug registers references.
203         Set context using the low target.
204         (handle_exception): Change return type to void.  Don't record
205         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
206         first chance exception.
207         (get_child_debug_event): Change return type to void.  Remove 
208         goto loop.  Always return after waiting for debug event.
209         (win32_wait): Convert to switch statement.  Handle spurious
210         events.
211
212         * win32-i386-low.c (debug_registers_changed,
213         debug_registers_used): New.
214         (initial_stuff): Rename to ...
215         (i386_initial_stuff): ... this.  Clear debug registers
216         state variables.
217         (store_debug_registers): Delete.
218         (i386_get_thread_context): New.
219         (load_debug_registers): Delete.
220         (i386_set_thread_context): New.
221         (i386_thread_added): New.
222         (single_step): Rename to ...
223         (i386_single_step): ... this.
224         (do_fetch_inferior_registers): Rename to ...
225         (i386_fetch_inferior_register): ... this.
226         (i386_store_inferior_register): New.
227         (the_low_target): Adapt to new interface.
228
229         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
230         (arm_get_thread_context): New.
231         (arm_set_thread_context): New.
232         (regptr): New.
233         (do_fetch_inferior_registers): Rename to ...
234         (arm_fetch_inferior_register): ... this.
235         (arm_store_inferior_register): New.
236         (arm_wince_breakpoint): Reimplement as unsigned long.
237         (arm_wince_breakpoint_len): Define.
238         (the_low_target): Adapt to new interface.
239
240         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
241         load_debug_registers.  Add get_thread_context, set_thread_context,
242         thread_added and store_inferior_register.  Rename
243         fetch_inferior_registers to fetch_inferior_register.
244         (regptr): Remove declaration.
245
246 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
247
248         * linux-low.c (linux_detach): Change return type to int.  Return 0.
249         * spu-low.c (spu_detach): Likewise.
250
251 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
252
253         * target.h (target_ops): Change return type of detach to int.
254         Add join.
255         (join_inferior): New.
256         * server.c (main): Don't skip detach support on mingw32.
257         If the inferior doesn't support detaching return error.
258         Call join_inferior instead of using waitpid.
259         * linux-low.c (linux_join): New.
260         (linux_target_op): Add linux_join.
261         * spu-low.c (spu_join): New.
262         (spu_target_ops): Add spu_join.
263         * win32-low.c (win32_detach): Adapt to new interface.
264         Reopen current_process_handle before detaching.  Issue a child
265         resume before detaching.
266         (win32_join): New.
267         (win32_target_op): Add win32_join.
268
269 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
270
271         * win32-low.c (win32-attach): Fix return value.
272         * target.h (target_ops): Describe ATTACH return values.
273
274 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
275
276         * win32-low.c (GETPROCADDRESS): Define.
277         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
278         (winapi_DebugSetProcessKillOnExit): Likewise.
279         (win32_create_inferior): Force usage of ansi CreateProcessA.
280         (win32_attach): Use GETPROCADDRESS.
281         (win32_detach): Likewise.
282
283 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
284
285         * win32-low.c (win32_wait): Don't use WSTOPSIG.
286
287 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
288
289         * win32-low.c: Commit leftover changes from 2007-03-29.
290
291 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
292
293         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
294         fields short instead of int.  Add explicit padding.
295         (i387_cache_to_fsave): Remove unnecessary casts.
296         (i387_fsave_to_cache): Doc fix.
297         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
298
299 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
300
301         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
302         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
303
304 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
305
306         * configure.srv (arm*-*-mingw32ce*): Move near the other
307         arm targets.
308
309 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
310
311         * configure.ac: Add errno checking.
312         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
313         sys/file.h and malloc.h.
314         (AC_CHECK_DECLS): Add perror.
315         (srv_mingwce): Handle.
316         * configure.srv (i[34567]86-*-cygwin*): Add
317         win32-i386-low.o to srv_tgtobj.
318         (i[34567]86-*-mingw*): Likewise.
319         (arm*-*-mingw32ce*): Add case.
320         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
321         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
322         [__MINGW32CE__] (strerror): New function.
323         [__MINGW32CE__] (errno): Define to GetLastError.
324         [__MINGW32CE__] (COUNTOF): New macro.
325         (remote_open): Remove extra close call.
326         * mem-break.c (delete_breakpoint_at): New function.
327         * mem-break.h (delete_breakpoint_at): Declare.
328         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
329         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
330         [USE_WIN32API] (read, write): Add char* casts.
331         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
332         * server.h: Include wincecompat.h on Windows CE.
333         [HAVE_ERRNO_H]: Check.
334         (perror): Declare if not declared.
335         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
336         (perror_with_name): Remove errno declaration.
337         * wincecompat.h: New.
338         * wincecompat.c: New.
339         * win32-low.h: New.
340         * win32-arm-low.c: New.
341         * win32-i386-low.c: New.
342         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
343         (OUTMSG2): Make it safe.
344         (_T): New macro.
345         (COUNTOF): New macro.
346         (NUM_REGS): Get it from the low target.
347         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
348         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
349         (thread_rec): Let low target handle debug registers.
350         (child_add_thread): Likewise.
351         (child_init_thread_list): Likewise.
352         (continue_one_thread): Likewise.
353         (regptr): New.
354         (do_child_fetch_inferior_registers): Move to ...
355         * win32-i386-low.c: ... here, and rename to ...
356         (do_fetch_inferior_registers): ... this.
357         * win32-low.c (child_fetch_inferior_registers): 
358         Go through the low target.
359         (do_child_store_inferior_registers): Use regptr.
360         (strwinerror): New function.
361         (win32_create_inferior): Handle Windows CE.
362         Use strwinerror instead of strerror on Windows error
363         codes.  Add program to the error output.
364         Don't close the main thread handle on Windows CE.
365         (win32_attach): Use coredll.dll on Windows CE.
366         (win32_kill): Close current process and current
367         thread handles.
368         (win32_detach): Use coredll.dll on Windows CE.
369         (win32_resume): Let low target handle debug registers, and
370         step request.
371         (handle_exception): Add/Remove initial breakpoint.  Avoid
372         non-existant WSTOPSIG on Windows CE.
373         (win32_read_inferior_memory): Cast to remove warning.
374         (win32_arch_string): Go through the low target.
375         (initialize_low): Call set_breakpoint_data with the low
376         target's breakpoint.
377         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
378         FOP_REGNUM, mappings): Move to ...
379         * win32-i386-low.c: ... here.
380         * win32-low.c (win32_thread_info): Move to ...
381         * win32-low.h: ... here.
382         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
383         win32-arm-low.c and wincecompat.c.
384         (all:): Add $EXEEXT.
385         (install-only:): Likewise.
386         (gdbserver:): Likewise.
387         (gdbreplay:): Likewise.
388         * config.in: Regenerate.
389         * configure: Regenerate.
390
391 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
392
393         * win32-low.c: Rename typedef thread_info to
394         win32_thread_info throughout.
395
396 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
397
398         * win32-i386-low.c: Rename to ...
399         * win32-low.c: ... this.
400         * configure.srv: Replace win32-i386-low.o with win32-low.o.
401         * Makefile.in: Likewise.
402
403 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
404
405         * remote-utils.c (monitor_output): Constify msg parameter.
406         * server.h (monitor_output): Likewise.
407         * win32-i386-low.c (handle_output_debug_string): New.
408         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
409         handle_output_debug_string.
410         (get_child_debug_event): Likewise.
411
412 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
413
414         * server.c (main): Correct strtoul check.
415
416 2007-03-27  Jon Ringle  <jon@ringle.org>
417
418         * linux-low.c: Check __ARCH_HAS_MMU__ also.
419
420 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
421
422         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
423
424 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
425
426         * terminal.h: Check HAVE_SGTTY_H.
427
428 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
429
430         * remote-utils.c (remote_open): Print out the assigned port number.
431
432 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
433
434         * remote-utils.c (monitor_output): New function.
435         * server.c (debug_threads): Define here.
436         (monitor_show_help): New function.
437         (handle_query): Handle qRcmd.
438         (main): Do not handle 'd' packet.
439         * server.h (debug_threads, remote_debug, monitor_output): Declare.
440         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
441         of debug_threads.
442
443 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
444
445         * Makefile.in (EXEEXT): New.
446         (clean): Use $(EXEEXT).
447
448 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
449
450         * target.h (target_ops): Rename send_signal to request_interrupt,
451         and remove enum target_signal parameter.
452         * linux-low.c (linux_request_interrupt): Rename from
453         linux_send_signal, and always send SIGINT.
454         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
455         and always send SIGINT.
456         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
457         of send_signal.
458         (input_interrupt): Likewise.
459
460 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
461
462         * server.c (get_features_xml): Check if target implemented
463         arch_string.
464         * win32-i386-low.c (win32_arch_string): New.
465         (win32_target_ops): Add win32_arch_string as arch_string member.
466
467 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
468
469         * spu-low.c (spu_arch_string): New.
470         (spu_target_ops): Add spu_arch_string.
471
472 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
473
474         * remote-utils.c: Remove HAVE_TERMINAL_H check.
475         * configure.ac: Do not check for terminal.h.
476         * configure, config.in: Regenerated.
477
478 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
479
480         * Makefile.in (OBS): Add $(XML_BUILTIN).
481         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
482         (clean): Update.
483         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
484         (arm-with-iwmmxt.c): New.
485         * config.in, configure: Regenerate.
486         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
487         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
488         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
489         (arm*-*-linux*): Add iWMMXt and regset support.
490         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
491         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
492         (arm_store_wmmxregset, target_regsets): New.
493         * server.c (get_features_xml): Take annex argument.  Check builtin
494         XML documents.
495         (handle_query): Handle multiple annexes.
496
497 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
498
499         * remote-utils.c [USE_WIN32API] (read, write): Define.
500         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
501         write.
502
503 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
504
505         * linux-i386-low.c (the_low_target): Set arch_string.
506         * linux-x86-64-low.c (the_low_target): Likewise.
507         * linux-low.c (linux_arch_string): New.
508         (linux_target_ops): Add it.
509         * linux-low.h (struct linux_target_ops): Add arch_string.
510         * server.c (write_qxfer_response): Use const void * for DATA.
511         (get_features_xml): New.
512         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
513         * target.h (struct target_ops): Add arch_string method.
514
515 2007-01-03  Denis Pilat  <denis.pilat@st.com>
516             Daniel Jacobowitz  <dan@codesourcery.com>
517
518         * linux-low.c (linux_kill): Handle being called with no threads.
519         * win32-i386-low.c (win32_kill): Likewise.
520         (get_child_debug_event): Clear current_process_handle.
521
522 2006-12-30  Denis PILAT  <denis.pilat@st.com>
523             Daniel Jacobowitz  <dan@codesourcery.com>
524
525         * remote-utils.c (remote_open): Check the type of specified
526         serial port devices before opening them.
527         * server.c (main): Kill the inferior if an error occurs during
528         the first remote_open.
529
530 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
531
532         * README: Update supported targets.
533
534 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
535
536         * Makefile.in (clean): Remove reg-mips64.c.
537         (reg-mips64.c, reg-mips64.o): New rules.
538         * configure.srv: Handle mips64.  Include regset support for mips.
539         * linux-mips-low.c (union mips_register): New.
540         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
541         (mips_breakpoint, mips_breakpoint_at): Use int.
542         (mips_collect_register, mips_supply_register)
543         (mips_collect_register_32bit, mips_supply_register_32bit)
544         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
545         (mips_store_fpregset, target_regsets): New.
546         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
547
548 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
549
550         * configure.srv: Add target "spu*-*-*".
551         * Makefile.in (clean): Remove reg-spu.c.
552         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
553         * spu-low.c: New file.
554
555 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
556
557         * configure.ac: Correct td_thr_tls_get_addr test.
558         * configure: Regenerated.
559
560 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
561
562         * linux-low.c (linux_wait_for_event): Reformat.  Use the
563         pass_signals array.
564         * remote-utils.c (decode_address_to_semicolon): New.
565         * server.c (pass_signals, handle_general_set): New.
566         (handle_query): Mention QPassSignals for qSupported.
567         (main): Call handle_general_set.
568         * server.h (pass_signals, decode_address_to_semicolon): New.
569
570 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
571
572         * server.c (handle_query): Correct error handling for read_auxv.
573
574 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
575
576         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
577         and srv_linux_thread_db to yes.
578         * linux-s390-low.c (s390_fill_gregset): New function.
579         (target_regsets): Define data structure.
580
581 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
582
583         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
584         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
585         * config.in, configure: Regenerated.
586         * inferiors.c (gdb_id_to_thread): New function.
587         (gdb_id_to_thread_id): Use it.
588         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
589         * linux-low.h (struct process_info): Add th member.
590         (thread_db_get_tls_address): New prototype.
591         * remote-utils.c (decode_address): Make non-static.
592         * server.c (handle_query): Handle qGetTLSAddr.
593         * server.h (gdb_id_to_thread, decode_address): New prototypes.
594         * target.h (struct target_ops): Add get_tls_address.
595         * thread-db.c (maybe_attach_thread): Save the thread handle.
596         (thread_db_get_tls_address): New.
597
598 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
599
600         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
601         (linux_resume_one_process): Take a siginfo_t *.  Update all
602         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
603         (struct pending_signals): Add a siginfo_t.
604         (linux_wait_for_process): Always set last_status.
605         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
606         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
607         * linux-low.h (struct process_info): Add last_status.
608
609 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
610
611         * remote-utils.c (try_rle): New function.
612         (putpkt_binary): Use it.
613
614 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
615
616         * Makefile.in (clean): Clean reg-x86-64-linux.c.
617         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
618         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
619         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
620         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
621         point registers.
622
623 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
624
625         * server.c (terminal_fd): New variable.
626         (old_foreground_pgrp): Likewise.
627         (restore_old_foreground_pgrp): New function.
628         (start_inferior): Record the terminal file descriptor in terminal_fd
629         and its original foreground group in old_foreground_pgrp.  Register
630         restore_old_foreground_pgrp with atexit().
631
632 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
633
634         * server.c (handle_query): Correct qPart to qXfer.
635
636 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
637
638         * configure.ac: Check for more headers which are missing on
639         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
640         * configure.srv: Add Cygwin and mingw32.
641         * remote-utils.c: Don't include headers unconditionally which
642         are missing on mingw32.  Include <winsock.h> for mingw32.
643         (remote_open): Adjust for mingw32 support.  Flush
644         standard error after writing to it.
645         (remote_close, putpkt_binary, input_interrupt, block_async_io)
646         (unblock_async_io, enable_async_io, disable_async_io)
647         (readchar, getpkt): Update for Winsock support.
648         (prepare_resume_reply): Expect a protocol signal number.
649         * server.c: Disable <sys/wait.h> on mingw32.
650         (start_inferior): Adjust for mingw32 support.  Flush
651         standard error after writing to it.
652         (attach_inferior): Likewise.  Use protocol signal
653         numbers.
654         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
655         and names.
656         * win32-i386-low.c: New file.
657         * Makefile.in (XM_CLIBS): Set.
658         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
659         (win32-i386-low.o): New dependency rule.
660         * linux-low.c (linux_wait): Use target signal numbers.
661         * target.h (struct target_ops): Doc fix.
662         * server.h (target_signal_to_name): New prototype.
663         * gdbreplay.c: Don't include headers unconditionally which
664         are missing on mingw32.  Include <winsock.h> for mingw32.
665         (remote_close, remote_open): Adjust for Winsock support.
666         * configure, config.in: Regenerated.
667
668 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
669
670         * server.c (decode_xfer_read, write_qxfer_response): New.
671         (handle_query): Take a packet length argument.  Handle
672         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
673         the qSupported response.
674         (main): Update call to handle_query.
675
676 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
677
678         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
679         (putpkt_binary): Renamed from putpkt and adjusted for binary
680         data.
681         (putpkt): New wrapper for putpkt_binary.
682         (readchar): Don't mask off the high bit.
683         (decode_X_packet): New function.
684         * server.c (main): Call putpkt_binary if a handler sets the packet
685         length.  Save the length of the incoming packet.  Handle 'X'.
686         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
687
688 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
689
690         * server.c (handle_query): Handle qSupported.
691
692 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
693
694         * remote-utils.c (all_symbols_looked_up): New variable.
695         (look_up_one_symbol): Check it.
696         * server.h (look_up_one_symbol): New declaration.
697         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
698
699 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
700
701         * Makefile.in (linux-arm-low.o): Update dependencies.
702         * linux-arm-low.c: Include "gdb_proc_service.h".
703         (PTRACE_GET_THREAD_AREA): Define.
704         (ps_get_thread_area): New function.
705
706 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
707
708         * configure.srv (m68k*-*-uclinux*): New target.
709         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
710         (linux_resume_one_process): Remove extraneous cast.
711         (linux_read_offsets): New.
712         (linux_target_op): Add linux_read_offsets on mmuless systems.
713         * server.c (handle_query): Add qOffsets logic.
714         * target.h (struct target_ops): Add read_offsets.
715
716 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
717
718         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
719         (PTRACE_GET_THREAD_AREA): Define.
720         (ps_get_thread_area): New function.
721         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
722         (linux-x86-64-low.o): Update.
723
724 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
725
726         * configure.ac: Remove checks for prfpregset_t.
727         * gdb_proc_service.h: New file.
728         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
729         new "gdb_proc_service.h".
730         * proc-service.c: Likewise.
731         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
732         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
733         * Makefile.in (gdb_proc_service_h): Updated.
734         * configure, config.in: Regenerated.
735
736 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
737
738         * remote-utils.c (prepare_resume_reply): Move declaration
739         of gdb_id_from_wait to the top of the block.
740
741 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
742
743         * linux-low.c (regsets_store_inferior_registers): Read the regset
744         from the target before filling it.
745
746 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
747
748         * server.c (attach_inferior): Return SIGTRAP for a successful
749         attach.
750
751 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
752
753         * Makefile.in (OBS): Add version.o.
754         (STAGESTUFF): Delete.
755         (version.o): Add dependencies.
756         (version.c): Replace rule.
757         (clean): Remove version.c.
758         * server.c (gdbserver_version): New.
759         (gdbserver_usage): Use printf.
760         (main): Handle --version and --help.
761         * server.h (version, host_name): Add declarations.
762
763 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
764
765         * linux-arm-low.c: 
766         * linux-arm-low.c: 
767         * inferiors.c: 
768         * i387-fp.h: 
769         * i387-fp.c: 
770         * gdbreplay.c: 
771         * regcache.c: 
772         * proc-service.c: 
773         * mem-break.h: 
774         * mem-break.c: 
775         * linux-x86-64-low.c: 
776         * linux-sh-low.c: 
777         * linux-s390-low.c: 
778         * linux-ppc64-low.c: 
779         * linux-ppc-low.c: 
780         * linux-mips-low.c: 
781         * linux-m68k-low.c: 
782         * linux-m32r-low.c: 
783         * linux-low.h: 
784         * linux-low.c: 
785         * linux-ia64-low.c: 
786         * linux-i386-low.c: 
787         * linux-crisv32-low.c: 
788         * thread-db.c: 
789         * terminal.h: 
790         * target.h: 
791         * target.c: 
792         * server.h: 
793         * server.c: 
794         * remote-utils.c: 
795         * regcache.h: 
796         * utils.c: 
797         * Makefile.in: 
798         * configure.ac: 
799         * gdbserver.1: Add (C) after Copyright.  Update the FSF
800         address.
801
802 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
803
804         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
805         (arm_breakpoint_at): Recognize both breakpoints.
806         (the_low_target): Use the correct breakpoint instruction.
807
808 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
809
810         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
811         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
812         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
813         (the_low_target): Update.
814
815 2005-10-25  Andreas Schwab  <schwab@suse.de>
816
817         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
818
819         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
820         (ia64_num_regs): Reduce to 462.
821
822 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
823
824         * acinclude.m4: Correct quoting.
825         * aclocal.m4: Regenerated.
826
827         Suggested by SZOKOVACS Robert <szo@ies.hu>:
828         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
829         (thread_db_init): Call thread_db_err_str.
830         * configure.ac: Check for TD_VERSION.
831         * config.in, configure: Regenerated.
832
833 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
834
835         * server.h (error, fatal, warning): Add ATTR_FORMAT.
836
837 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
838
839         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
840         is not available.  Define HAVE_PTRACE_GETREGS if it is.
841         * config.in, configure: Regenerated.
842         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
843         * linux-i386-low.c, linux-m68k-low.c: Update to use
844         HAVE_PTRACE_GETREGS.
845         * linux-low.c (regsets_fetch_inferior_registers)
846         (regsets_store_inferior_registers): Only return 0 if we processed
847         GENERAL_REGS.
848         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
849         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
850
851 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
852
853         * inferiors.c (struct thread_info): Add gdb_id.
854         (add_thread): Add gdb_id argument.
855         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
856         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
857         calls to add_thread.
858         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
859         * server.c (handle_query): Use thread_to_gdb_id.
860         (handle_v_cont, main): Use gdb_id_to_thread_id.
861         * server.h (add_thread): Update prototype.
862         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
863         prototypes.
864
865 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
866
867         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
868         left-padded registers.
869         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
870         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
871
872 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
873
874         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
875         * configure: Regenerate.
876         * config.in: Regenerate.
877         * server.h (NEED_DECLARATION_STRERROR):
878         Replace with !HAVE_DECL_STRERROR.
879
880 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
881
882         * linux-low.c (linux_wait, linux_send_signal): Don't test
883         an unsigned long variable for > 0 if it could be MAX_ULONG.
884         * server.c (myresume): Likewise.
885         * target.c (set_desired_inferior): Likewise.
886
887 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
888
889         * configure.ac: Simplify and improve check for socklen_t.
890         * configure, config.in: Regenerate.
891
892 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
893
894         * acconfig.h: Remove.
895         * configure.ac: Add a test for socklen_t.  Use three-argument
896         AC_DEFINE throughout.
897         * config.in: Regenerated using autoheader 2.59.
898         * configure: Regenerated.
899
900         * gdbreplay.c (socklen_t): Provide a default.
901         (remote_open): Use socklen_t.
902         * remote-utils.c (socklen_t): Provide a default.
903         (remote_open): Use socklen_t.
904         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
905         unsigned char.
906
907         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
908         char for buffers.
909         * linux-low.c (linux_read_memory, linux_write_memory)
910         (linux_read_auxv): Likewise.
911         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
912         (check_mem_write): Likewise.
913         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
914         Likewise.
915         * regcache.c (struct inferior_rgcache_data, registers_to_string)
916         (registers_from_string, register_data): Likewise.
917         * server.c (handle_query, main): Likewise.
918         * server.h (convert_ascii_to_int, convert_int_to_ascii)
919         (decode_M_packet): Likewise.
920         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
921         * target.h (struct target_ops): Update read_memory, write_memory,
922         and read_auxv.
923         (read_inferior_memory, write_inferior_memory): Update.
924         * linux-low.h (struct linux_target_ops): Change type of breakpoint
925         to unsigned char *.
926         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
927         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
928         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
929         linux-s390-low.c, linux-sh-low.c: Update for changes in
930         read_inferior_memory and the_low_target->breakpoint.
931
932 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
933
934         * Makefile.in (SFILES): Add linux-ppc64-low.c.
935         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
936         * configure.srv: Add powerpc64-*-linux*.
937         * linux-ppc64-low.c: New file.
938
939 2005-05-23  Orjan Friberg  <orjanf@axis.com>
940
941         * linux-cris-low.c: New file with support for CRIS.
942         * linux-crisv32-low.c: Ditto for CRISv32.
943         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
944         (clean): Add reg-cris.c and reg-crisv32.c.
945         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c, 
946         reg-crisv32.o, and reg-crisv32.c to make rules.
947         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
948         recognized targets.
949
950 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
951
952         * linux-low.c (fetch_register): Ensure buffer size is a multiple
953         of sizeof (PTRACE_XFER_TYPE).
954         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
955
956 2005-05-12  Orjan Friberg  <orjanf@axis.com>
957
958         * target.h (struct target_ops): Add insert_watchpoint, 
959         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
960         pointers for hardware watchpoint support.
961         * linux-low.h (struct linux_target_ops): Ditto.
962         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
963         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
964         to linux_target_ops.
965         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
966         reply packet.
967         * server.c (main): Recognize 'Z' and 'z' packets.
968
969 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
970
971         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
972         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
973         (the_low_target): Add new members.
974
975 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
976
977         * proc-service.c (ps_lgetregs): Search all_processes instead of
978         all_threads.
979
980 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
981
982         * server.c (start_inferior): Change return type to int.
983         (attach_inferior): Change sigptr to int *.
984         (handle_v_cont, handle_v_requests): Change signal to int *.
985         (main): Change signal to int.
986
987 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
988
989         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
990         * configure.srv: Add m32r*-*-linux*.
991         * linux-m32r-low.c: New file.
992
993 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
994
995         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
996
997 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
998
999         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1000         Take unsigned long arguments for PIDs.
1001         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1002         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1003         (wait_for_sigstop, linux_resume_one_process)
1004         (regsets_fetch_inferior_registers, linux_send_signal)
1005         (linux_read_auxv): Likewise.  Update the types of variables holding
1006         PIDs.  Update format string specifiers.
1007         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1008         * remote-utils.c (prepare_resume_reply): Likewise.
1009         * server.c (cont_thread, general_thread, step_thread)
1010         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1011         unsigned long.
1012         (handle_query): Update format specifiers.
1013         (handle_v_cont, main): Use strtoul for thread IDs.
1014         * server.h (struct inferior_list_entry): Use unsigned long for ID.
1015         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1016         (general_thread, step_thread, thread_from_wait)
1017         (old_thread_from_wait): Update.
1018         * target.h (struct thread_resume): Use unsigned long for THREAD.
1019         (struct target_ops): Use unsigned long for arguments to attach and
1020         thread_alive.
1021
1022 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
1023
1024         * acinclude.m4: Include bfd/bfd.m4 directly.
1025         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
1026         <agriffis@toolchain.org>.
1027         * aclocal.m4, configure: Regenerated.
1028
1029 2005-01-07  Andrew Cagney  <cagney@gnu.org>
1030
1031         * configure.ac: Rename configure.in, require autoconf 2.59.
1032         * configure: Re-generate.
1033
1034 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
1035
1036         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
1037         LIBS when finished.
1038         * aclocal.m4: Regenerated.
1039         * configure: Regenerated.
1040
1041 2004-11-21  Andreas Schwab  <schwab@suse.de>
1042
1043         * linux-m68k-low.c (m68k_num_gregs): Define.
1044         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1045         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1046         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1047         (m68k_breakpoint_at): New.  Add to the_low_target.
1048
1049         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1050         srv_linux_thread_db to yes.
1051
1052 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
1053
1054         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1055         (ARCH_SET_FS): Likewise.
1056         (ARCH_GET_FS): Likewise.
1057         (ARCH_GET_GS): Likewise.
1058
1059 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1060
1061         * linux-i386-low.c (ps_get_thread_area): New.
1062         * linux-x86-64-low.c (ps_get_thread_area): New.
1063         * linux-low.c: Include <sys/syscall.h>.
1064         (linux_kill_one_process): Don't kill the first thread here.
1065         (linux_kill): Kill the first thread here.
1066         (kill_lwp): New function.
1067         (send_sigstop, linux_send_signal): Use it.
1068         * proc-service.c: Clean up #ifdefs.
1069         (fpregset_info): Delete.
1070         (ps_lgetregs): Update and enable implementation.
1071         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1072         implementations.
1073         * remote-utils.c (struct sym_cache, symbol_cache): New.
1074         (input_interrupt): Print a clearer message.
1075         (async_io_enabled): New variable.
1076         (enable_async_io, disable_async_io): Use it.  Update comments.
1077         (look_up_one_symbol): Use the symbol cache.
1078         * thread-db.c (thread_db_look_up_symbols): New function.
1079         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
1080
1081 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1082
1083         * configure.in: Test for -rdynamic.
1084         * configure: Regenerated.
1085         * Makefile (INTERNAL_LDFLAGS): New.
1086         (gdbserver, gdbreplay): Use it.
1087
1088 2004-09-02  Andrew Cagney  <cagney@gnu.org>
1089
1090         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1091
1092 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
1093
1094         * linux-low.c (linux_wait): Clear all_processes list also.
1095
1096 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
1097
1098         * linux-low.c: Include <errno.h>.  Remove extern declaration of
1099         errno.
1100
1101 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
1102
1103         * gdbreplay.c, server.h, utils.c: Update copyright years.
1104
1105 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
1106
1107         * server.c (main): Print child status or termination signal from
1108         variable 'signal', not 'sig'.
1109
1110 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
1111
1112         * linux-low.c (linux_read_memory): Change return type to
1113         int.  Check for and return error from ptrace().
1114         * target.c (read_inferior_memory): Change return type to int.  Pass
1115         back return status from the_target->read_memory().
1116         * target.h (struct target_ops): Adapt *read_memory() prototype.
1117         Update comment.
1118         (read_inferior_memory): Adapt prototype.
1119         * server.c (main): Return an error packet if
1120         read_inferior_memory() returns an error.
1121
1122 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
1123
1124         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1125         Unify with other clean targets.
1126
1127 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1128
1129         * server.c (handle_v_cont): Call set_desired_inferior.
1130
1131 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1132
1133         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1134
1135 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1136
1137         * linux-low.c (linux_wait): Unblock async I/O.
1138         (linux_resume): Block and enable async I/O.
1139         * remote-utils.c (block_async_io, unblock_async_io): New functions.
1140         * server.h (block_async_io, unblock_async_io): Add prototypes.
1141
1142 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1143
1144         * remote-utils.c (remote_open): Print a status notice after
1145         opening a TCP port.
1146         * server.c (attach_inferior): Print a status notice after
1147         attaching.
1148
1149 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
1150
1151         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1152
1153 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
1154
1155         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1156         error packet.
1157         * server.c, target.h: Update copyright years.
1158
1159 2004-02-25  Roland McGrath  <roland@redhat.com>
1160
1161         * target.h (struct target_ops): New member `read_auxv'.
1162         * server.c (handle_query): Handle qPart:auxv:read: query using that.
1163         * linux-low.c (linux_read_auxv): New function.
1164         (linux_target_ops): Initialize `read_auxv' member to that.
1165
1166 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1167
1168         Committed by Jim Blandy  <jimb@redhat.com>.
1169
1170         * linux-s390-low.c (s390_num_regs): Update.
1171         (s390_regmap): Remove control registers.  Use __s390x__ predefine
1172         instead of GPR_SIZE to distiguish s390 and s390x targets.
1173
1174 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
1175
1176         * linux-low.c: Update copyright year.
1177         (check_removed_breakpoint): Clear pending_is_breakpoint.
1178         (linux_set_resume_request, linux_queue_one_thread)
1179         (resume_status_pending_p): New functions.
1180         (linux_continue_one_thread): Use process->resume.
1181         (linux_resume): Only resume threads if there are no pending events.
1182         * linux-low.h (struct process_info): Add resume request
1183         pointer.
1184
1185 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
1186
1187         * regcache.c (new_register_cache): Clear the allocated register
1188         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1189
1190 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
1191
1192         * linux-low.c (linux_resume): Take a struct thread_resume *
1193         argument.
1194         (linux_wait): Update call.
1195         (resume_ptr): New static variable.
1196         (linux_continue_one_thread): Renamed from
1197         linux_continue_one_process.  Use resume_ptr.
1198         (linux_resume): Use linux_continue_one_thread.
1199         * server.c (handle_v_cont, handle_v_requests): New functions.
1200         (myresume): New function.
1201         (main): Handle 'v' case.
1202         * target.h (struct thread_resume): New type.
1203         (struct target_ops): Change argument of "resume" to struct
1204         thread_resume *.
1205         (myresume): Delete macro.
1206
1207 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
1208
1209         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1210         (uninstall): Support DESTDIR.
1211
1212 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
1213
1214         * configure.srv: Add xscale*linux copy of arm*linux entry.
1215
1216 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
1217
1218         * linux-arm-low.c (arm_reinsert_addr): New function.
1219         (the_low_target): Add arm_reinsert_addr.
1220
1221 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
1222
1223         * mem-break.c: Remove whitespace at end of file.
1224
1225 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
1226
1227         * configure.in: Check whether we need to prototype strerror.
1228         * server.h: Optionally prototype strerror.
1229         * gdbreplay.c (perror_with_name): Use strerror.
1230         * linux-low.c (linux_attach_lwp): Use strerror.
1231         * utils.c (perror_with_name): Use strerror.
1232         * config.in, configure: Regenerated.
1233
1234 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
1235
1236         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1237         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1238
1239 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
1240
1241         * Makefile.in (SFILES): Update.
1242         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1243         low-sun3.c: Remove files.
1244
1245 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
1246
1247         * linux-low.c: Move comment to linux_thread_alive where it belonged.
1248         (linux_detach_one_process, linux_detach): New functions.
1249         (linux_target_ops): Add linux_detach.
1250         * server.c (main): Handle 'D' packet.
1251         * target.h (struct target_ops): Add "detach" member.
1252         (detach_inferior): Define.
1253
1254 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
1255
1256         From Kelley Cook  <kelleycook@wideopenwest.com>:
1257         * configure.srv: Accept i[34567]86 variants.
1258
1259 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
1260
1261         * linux-low.c (linux_wait_for_event): Correct comment typos.
1262         (linux_resume_one_process): Call check_removed_breakpoint.
1263         (linux_send_signal): New function.
1264         (linux_target_ops): Add linux_send_signal.
1265         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1266         of kill.
1267         * target.h (struct target_ops): Add send_signal.
1268
1269 2003-05-29  Jim Blandy  <jimb@redhat.com>
1270
1271         * linux-low.c (usr_store_inferior_registers): Transfer buf in
1272         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
1273         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1274         away part of the register's value.
1275
1276 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
1277
1278         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1279         (linux_wait_for_event, linux_init_signals): Likewise.
1280
1281 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
1282
1283         * configure.in: Check for stdlib.h.
1284         * configure: Regenerated.
1285         * config.in: Regenerated.
1286
1287 2003-01-04  Andreas Schwab  <schwab@suse.de>
1288
1289         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1290
1291 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
1292
1293         * Makefile.in: Remove obsolete code.
1294
1295 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
1296
1297         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1298         defined(PT_FPR0_HI).
1299
1300 2002-11-17  Stuart Hughes  <seh@zee2.com>
1301
1302         * linux-arm-low.c (arm_num_regs): Increase.
1303         (arm_regmap): Include status register.
1304
1305 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
1306
1307         * linux-low.c (register_addr): Remove incorrect -1 check.
1308
1309 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
1310
1311         * linux-low.c (linux_create_inferior): Call setpgid.  Return
1312         the new PID.
1313         (unstopped_p, linux_signal_pid): Remove.
1314         (linux_target_ops): Remove linux_signal_pid.
1315         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
1316         global instead of target method.
1317         * target.h (struct target_ops): Remove signal_pid.  Update comment
1318         for create_inferior.
1319         * server.c (signal_pid): New variable.
1320         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
1321         gdbserver.  Set the child to be the foreground process group.
1322         (attach_inferior): Set signal_pid.
1323
1324 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
1325
1326         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
1327
1328 2002-08-20  Jim Blandy  <jimb@redhat.com>
1329
1330         * Makefile.in (LDFLAGS): Allow the configure script to establish a
1331         default for this.
1332
1333 2002-08-01  Andrew Cagney  <cagney@redhat.com>
1334
1335         * Makefile.in: Make chill references obsolete.
1336
1337 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
1338
1339         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
1340         * configure: Regenerate.
1341         * config.in: Regenerate.
1342
1343 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
1344
1345         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
1346         (perror_with_name, remote_close, remote_open, expect, play): Static.
1347
1348 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
1349
1350         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
1351         byte offsets instead of an array of indexes.
1352         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
1353
1354 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
1355
1356         * regcache.c: Add comment.
1357
1358 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
1359
1360         * thread-db.c: New file.
1361         * proc-service.c: New file.
1362         * acinclude.m4: New file.
1363         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
1364         proc-service.o, and thread-db.o.
1365         (linux-low.o): Add USE_THREAD_DB.
1366         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
1367         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
1368         * aclocal.m4: Regenerated.
1369         * config.in: Regenerated.
1370         * configure: Regenerated.
1371         * configure.in: Check for proc_service.h, sys/procfs.h,
1372         thread_db.h, and linux/elf.h headrs.
1373         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
1374         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
1375         Check for -lthread_db and thread support.
1376         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
1377         PowerPC, and SuperH.
1378         * i387-fp.c: Constify arguments.
1379         * i387-fp.h: Likewise.
1380         * inferiors.c: (struct thread_info): Renamed from
1381         `struct inferior_info'.  Remove PID member.  Use generic inferior
1382         list header.  All uses updated.
1383         (inferiors, signal_pid): Removed.
1384         (all_threads): New variable.
1385         (get_thread): Define.
1386         (add_inferior_to_list): New function.
1387         (for_each_inferior): New function.
1388         (change_inferior_id): New function.
1389         (add_inferior): Removed.
1390         (remove_inferior): New function.
1391         (add_thread): New function.
1392         (free_one_thread): New function.
1393         (remove_thread): New function.
1394         (clear_inferiors): Use for_each_inferior and free_one_thread.
1395         (find_inferior): New function.
1396         (find_inferior_id): New function.
1397         (inferior_target_data): Update argument type.
1398         (set_inferior_target_data): Likewise.
1399         (inferior_regcache_data): Likewise.
1400         (set_inferior_regcache_data): Likewise.
1401         * linux-low.c (linux_bp_reinsert): Remove.
1402         (all_processes, stopping_threads, using_thrads)
1403         (struct pending_signals, debug_threads, pid_of): New.
1404         (inferior_pid): Replace with macro.
1405         (struct inferior_linux_data): Remove.
1406         (get_stop_pc, add_process): New functions.
1407         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
1408         Use add_process and add_thread.
1409         (linux_attach_lwp): New function, based on old linux_attach.  Use
1410         add_process and add_thread.  Set stop_expected for new threads.
1411         (linux_attach): New function.
1412         (linux_kill_one_process): New function.
1413         (linux_kill): Kill all LWPs.
1414         (linux_thread_alive): Use find_inferior_id.
1415         (check_removed_breakpoints, status_pending_p): New functions.
1416         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
1417         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
1418         struct for the found process.
1419         (linux_wait_for_event): New function.
1420         (linux_wait): Use it.  Support LWPs.
1421         (send_sigstop, wait_for_sigstop, stop_all_processes)
1422         (linux_resume_one_process, linux_continue_one_process): New functions.
1423         (linux_resume): Support LWPs.
1424         (REGISTER_RAW_SIZE): Remove.
1425         (fetch_register): Use register_size instead.  Call supply_register.
1426         (usr_store_inferior_registers): Likewise.  Call collect_register.
1427         Fix recursive case.
1428         (regsets_fetch_inferior_registers): Improve error message.
1429         (regsets_store_inferior_registers): Add debugging.
1430         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
1431         (unstopped_p, linux_signal_pid): New functions.
1432         (linux_target_ops): Add linux_signal_pid.
1433         (linux_init_signals): New function.
1434         (initialize_low): Call it.  Initialize using_threads.
1435         * regcache.c (inferior_regcache_data): Add valid
1436         flag.
1437         (get_regcache): Fetch registers lazily.  Add fetch argument
1438         and update all callers.
1439         (regcache_invalidate_one, regcache_invalidate): New
1440         functions.
1441         (new_register_cache): Renamed from create_register_cache.
1442         Return the new regcache.
1443         (free_register_cache): Change argument to a void *.
1444         (registers_to_string, registers_from_string): Call get_regcache
1445         with fetch flag set.
1446         (register_data): Make static.  Pass fetch flag to get_regcache.
1447         (supply_register): Call get_regcache with fetch flag clear.
1448         (collect_register): Call get_regcache with fetch flag set.
1449         (collect_register_as_string): New function.
1450         * regcache.h: Update.
1451         * remote-utils.c (putpkt): Flush after debug output and use
1452         stderr.
1453         Handle input interrupts while waiting for an ACK.
1454         (input_interrupt): Use signal_pid method.
1455         (getpkt): Flush after debug output and use stderr.
1456         (outreg): Use collect_register_as_string.
1457         (new_thread_notify, dead_thread_notify): New functions.
1458         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
1459         and general_thread.
1460         (look_up_one_symbol): Flush after debug output.
1461         * server.c (step_thread, server_waiting): New variables.
1462         (start_inferior): Don't use signal_pid.  Update call to mywait.
1463         (attach_inferior): Update call to mywait.
1464         (handle_query): Handle qfThreadInfo and qsThreadInfo.
1465         (main): Don't fetch/store registers explicitly.  Use
1466         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
1467         calls to mywait.
1468         * server.h: Update.
1469         (struct inferior_list, struct_inferior_list_entry): New.
1470         * target.c (set_desired_inferior): New.
1471         (write_inferior_memory): Constify.
1472         (mywait): New function.
1473         * target.h: Update.
1474         (struct target_ops): New signal_pid method.
1475         (mywait): Removed macro, added prototype.
1476
1477         * linux-low.h (regset_func): Removed.
1478         (regset_fill_func, regset_store_func): New.
1479         (enum regset_type): New.
1480         (struct regset_info): Add type field.  Use new operation types.
1481         (struct linux_target_ops): stop_pc renamed to get_pc.
1482         Add decr_pc_after_break and breakpoint_at.
1483         (get_process, get_thread_proess, get_process_thread)
1484         (strut process_info, all_processes, linux_attach_lwp)
1485         (thread_db_init): New.
1486
1487         * linux-arm-low.c (arm_get_pc, arm_set_pc,
1488         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
1489         (the_low_target): Add new members.
1490         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
1491         (i386_store_fpxregset): Constify.
1492         (target_regsets): Add new kind identifier.
1493         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
1494         (i386_set_pc): Add debugging.
1495         (i386_breakpoint_at): New function.
1496         (the_low_target): Add new members.
1497         * linux-mips-low.c (mips_get_pc, mips_set_pc)
1498         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
1499         (mips_breakpoint_at): New.
1500         (the_low_target): Add new members.
1501         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
1502         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
1503         (the_low_target): Add new members.
1504         * linux-sh-low.c (sh_get_pc, sh_set_pc)
1505         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
1506         (the_low_target): Add new members.
1507         * linux-x86-64-low.c (target_regsets): Add new kind
1508         identifier.
1509
1510 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
1511
1512         From Martin Pool <mbp@samba.org>:
1513         * server.c (gdbserver_usage): New function.
1514         (main): Call it.
1515
1516 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
1517
1518         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
1519         stop_at -> stop_pc.
1520
1521 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
1522
1523         * Makefile.in: Remove obsolete code.
1524
1525 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
1526
1527         * linux-low.c (regsets_fetch_inferior_registers),
1528         (regsets_store_inferior_registers): Removed cast to int from
1529         ptrace() calls.
1530         * regcache.h: Added declaration of struct inferior_info.
1531
1532 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
1533
1534         * inferiors.c (struct inferior_info): Add regcache_data.
1535         (add_inferior): Call create_register_cache.
1536         (clear_inferiors): Call free_register_cache.
1537         (inferior_regcache_data, set_inferior_regcache_data): New functions.
1538         * regcache.c (struct inferior_regcache_data): New.
1539         (registers): Remove.
1540         (get_regcache): New function.
1541         (create_register_cache, free_register_cache): New functions.
1542         (set_register_cache): Don't initialize the register cache here.
1543         (registers_to_string, registers_from_string, register_data): Call
1544         get_regcache.
1545         * regcache.h: Add prototypes.
1546         * server.h: Likewise.
1547
1548 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
1549
1550         * mem-break.c: New file.
1551         * mem-break.h: New file.
1552         * Makefile.in: Add mem-break.o rule; update server.h
1553         dependencies.
1554         * inferiors.c (struct inferior_info): Add target_data
1555         member.
1556         (clear_inferiors): Free target_data member if set.
1557         (inferior_target_data, set_inferior_target_data): New functions.
1558         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1559         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
1560         * linux-low.c (linux_bp_reinsert): New variable.
1561         (struct inferior_linux_data): New.
1562         (linux_create_inferior): Use set_inferior_target_data.
1563         (linux_attach): Likewise.  Call add_inferior.
1564         (linux_wait_for_one_inferior): New function.
1565         (linux_wait): Call it.
1566         (linux_write_memory): Add const.
1567         (initialize_low): Call set_breakpoint_data.
1568         * linux-low.h (struct linux_target_ops): Add breakpoint
1569         handling members.
1570         * server.c (attach_inferior): Remove extra add_inferior
1571         call.
1572         * server.h: Include mem-break.h.  Update inferior.c
1573         prototypes.
1574         * target.c (read_inferior_memory)
1575         (write_inferior_memory): New functions.
1576         * target.h (read_inferior_memory)
1577         (write_inferior_memory): Change macros to prototypes.
1578         (struct target_ops): Update comments.  Add const to write_memory
1579         definition.
1580
1581 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
1582
1583         * linux-low.c (usr_store_inferior_registers): Support
1584         registers which are allowed to fail to store.
1585         * linux-low.h (linux_target_ops): Likewise.
1586         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1587         (ppc_cannot_store_register): FPSCR may not be storable.
1588
1589 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
1590
1591         * server.h: Include <string.h> if HAVE_STRING_H.
1592         * ChangeLog: Correct paths in last ChangeLog entry.
1593
1594 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
1595
1596         * linux-low.h: Remove obsolete prototypes.
1597         (struct linux_target_ops): New.
1598         (extern the_low_target): New.
1599         * linux-low.c (num_regs, regmap): Remove declarations.
1600         (register_addr): Use the_low_target explicitly.
1601         (fetch_register): Likewise.
1602         (usr_fetch_inferior_registers): Likewise.
1603         (usr_store_inferior_registers): Likewise.
1604         * linux-arm-low.c (num_regs): Remove.
1605         (arm_num_regs): Define.
1606         (arm_regmap): Renamed from regmap, made static.
1607         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1608         made static.
1609         (arm_cannot_store_register): Renamed from cannot_store_register,
1610         made static.
1611         (the_low_target): New.
1612         * linux-i386-low.c (num_regs): Remove.
1613         (i386_num_regs): Define.
1614         (i386_regmap): Renamed from regmap, made static.
1615         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1616         made static.
1617         (i386_cannot_store_register): Renamed from cannot_store_register,
1618         made static.
1619         (the_low_target): New.
1620         * linux-ia64-low.c (num_regs): Remove.
1621         (ia64_num_regs): Define.
1622         (ia64_regmap): Renamed from regmap, made static.
1623         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1624         made static.
1625         (ia64_cannot_store_register): Renamed from cannot_store_register,
1626         made static.
1627         (the_low_target): New.
1628         * linux-m68k-low.c (num_regs): Remove.
1629         (m68k_num_regs): Define.
1630         (m68k_regmap): Renamed from regmap, made static.
1631         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1632         made static.
1633         (m68k_cannot_store_register): Renamed from cannot_store_register,
1634         made static.
1635         (the_low_target): New.
1636         * linux-mips-low.c (num_regs): Remove.
1637         (mips_num_regs): Define.
1638         (mips_regmap): Renamed from regmap, made static.
1639         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1640         made static.
1641         (mips_cannot_store_register): Renamed from cannot_store_register,
1642         made static.
1643         (the_low_target): New.
1644         * linux-ppc-low.c (num_regs): Remove.
1645         (ppc_num_regs): Define.
1646         (ppc_regmap): Renamed from regmap, made static.
1647         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1648         made static.
1649         (ppc_cannot_store_register): Renamed from cannot_store_register,
1650         made static.
1651         (the_low_target): New.
1652         * linux-s390-low.c (num_regs): Remove.
1653         (s390_num_regs): Define.
1654         (s390_regmap): Renamed from regmap, made static.
1655         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1656         made static.
1657         (s390_cannot_store_register): Renamed from cannot_store_register,
1658         made static.
1659         (the_low_target): New.
1660         * linux-sh-low.c (num_regs): Remove.
1661         (sh_num_regs): Define.
1662         (sh_regmap): Renamed from regmap, made static.
1663         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1664         made static.
1665         (sh_cannot_store_register): Renamed from cannot_store_register,
1666         made static.
1667         (the_low_target): New.
1668         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1669         (the_low_target): New.
1670
1671 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
1672
1673         * Makefile.in: Add stamp-h target.
1674         * configure.in: Create stamp-h.
1675         * configure: Regenerated.
1676
1677 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
1678
1679         * inferiors.c: New file.
1680         * target.c: New file.
1681         * target.h: New file.
1682         * Makefile.in:  Add target.o and inferiors.o.  Update
1683         dependencies.
1684         * linux-low.c (inferior_pid): New static variable,
1685         moved from server.c.
1686         (linux_create_inferior): Renamed from create_inferior.
1687         Call add_inferior.  Return 0 on success instead of a PID.
1688         (linux_attach): Renamed from myattach.
1689         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
1690         (linux_thread_alive): Renamed from mythread_alive.
1691         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
1692         child dies.
1693         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
1694         (regsets_store_inferior_registers): Correct error message.
1695         Add missing ``return 0''.
1696         (linux_fetch_registers): Renamed from fetch_inferior_registers.
1697         (linux_store_registers): Renamed from store_inferior_registers.
1698         (linux_read_memory): Renamed from read_inferior_memory.
1699         (linux_write_memory): Renamed from write_inferior_memory.
1700         (linux_target_ops): New structure.
1701         (initialize_low): Call set_target_ops ().
1702         * remote-utils.c (unhexify): New function.
1703         (hexify): New function.
1704         (input_interrupt): Send signals to ``signal_pid''.
1705         * server.c (inferior_pid): Remove.
1706         (start_inferior): Update create_inferior call.
1707         (attach_inferior): Call add_inferior.
1708         (handle_query): New function.
1709         (main): Call handle_query for `q' packets.
1710         * server.h: Include "target.h".  Remove obsolete prototypes.
1711         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1712
1713 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
1714
1715         * Makefile.in: Add WARN_CFLAGS.  Update configury
1716         dependencies.
1717         * configure.in: Check for <string.h>
1718         * configure: Regenerate.
1719         * config.in: Regenerate.
1720         * gdbreplay.c: Include needed system headers.
1721         (remote_open): Remove strchr prototype.
1722         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1723         * regcache.c (supply_register): Change buf argument to const void *.
1724         (supply_register_by_name): Likewise.
1725         (collect_register): Change buf argument to void *.
1726         (collect_register_by_name): Likewise.
1727         * regcache.h: Add missing prototypes.
1728         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1729         * server.c (handle_query): New function.
1730         (attached): New static variable, moved out of main.
1731         (main): Quiet longjmp clobber warnings.
1732         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
1733         * utils.c (error): Remove NORETURN.
1734         (fatal): Likewise.