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