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