1a3a7dc27fc66adc488219977e0020e4ea30eab0
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2
3 * linux-arm-low.c (arm_reinsert_addr): New function.
4 (the_low_target): Add arm_reinsert_addr.
5
6 2003-07-08 Mark Kettenis <kettenis@gnu.org>
7
8 * mem-break.c: Remove whitespace at end of file.
9
10 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11
12 * configure.in: Check whether we need to prototype strerror.
13 * server.h: Optionally prototype strerror.
14 * gdbreplay.c (perror_with_name): Use strerror.
15 * linux-low.c (linux_attach_lwp): Use strerror.
16 * utils.c (perror_with_name): Use strerror.
17 * config.in, configure: Regenerated.
18
19 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20
21 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
23
24 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
25
26 * Makefile.in (SFILES): Update.
27 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
28 low-sun3.c: Remove files.
29
30 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
31
32 * linux-low.c: Move comment to linux_thread_alive where it belonged.
33 (linux_detach_one_process, linux_detach): New functions.
34 (linux_target_ops): Add linux_detach.
35 * server.c (main): Handle 'D' packet.
36 * target.h (struct target_ops): Add "detach" member.
37 (detach_inferior): Define.
38
39 2003-06-13 Mark Kettenis <kettenis@gnu.org>
40
41 From Kelley Cook <kelleycook@wideopenwest.com>:
42 * configure.srv: Accept i[34567]86 variants.
43
44 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
45
46 * linux-low.c (linux_wait_for_event): Correct comment typos.
47 (linux_resume_one_process): Call check_removed_breakpoint.
48 (linux_send_signal): New function.
49 (linux_target_ops): Add linux_send_signal.
50 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
51 of kill.
52 * target.h (struct target_ops): Add send_signal.
53
54 2003-05-29 Jim Blandy <jimb@redhat.com>
55
56 * linux-low.c (usr_store_inferior_registers): Transfer buf in
57 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
58 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
59 away part of the register's value.
60
61 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
62
63 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
64 (linux_wait_for_event, linux_init_signals): Likewise.
65
66 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
67
68 * configure.in: Check for stdlib.h.
69 * configure: Regenerated.
70 * config.in: Regenerated.
71
72 2003-01-04 Andreas Schwab <schwab@suse.de>
73
74 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
75
76 2003-01-02 Andrew Cagney <ac131313@redhat.com>
77
78 * Makefile.in: Remove obsolete code.
79
80 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
81
82 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
83 defined(PT_FPR0_HI).
84
85 2002-11-17 Stuart Hughes <seh@zee2.com>
86
87 * linux-arm-low.c (arm_num_regs): Increase.
88 (arm_regmap): Include status register.
89
90 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
91
92 * linux-low.c (register_addr): Remove incorrect -1 check.
93
94 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
95
96 * linux-low.c (linux_create_inferior): Call setpgid. Return
97 the new PID.
98 (unstopped_p, linux_signal_pid): Remove.
99 (linux_target_ops): Remove linux_signal_pid.
100 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
101 global instead of target method.
102 * target.h (struct target_ops): Remove signal_pid. Update comment
103 for create_inferior.
104 * server.c (signal_pid): New variable.
105 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
106 gdbserver. Set the child to be the foreground process group.
107 (attach_inferior): Set signal_pid.
108
109 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
110
111 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
112
113 2002-08-20 Jim Blandy <jimb@redhat.com>
114
115 * Makefile.in (LDFLAGS): Allow the configure script to establish a
116 default for this.
117
118 2002-08-01 Andrew Cagney <cagney@redhat.com>
119
120 * Makefile.in: Make chill references obsolete.
121
122 2002-07-24 Kevin Buettner <kevinb@redhat.com>
123
124 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
125 * configure: Regenerate.
126 * config.in: Regenerate.
127
128 2002-07-09 David O'Brien <obrien@FreeBSD.org>
129
130 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
131 (perror_with_name, remote_close, remote_open, expect, play): Static.
132
133 2002-07-04 Michal Ludvig <mludvig@suse.cz>
134
135 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
136 byte offsets instead of an array of indexes.
137 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
138
139 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
140
141 * regcache.c: Add comment.
142
143 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
144
145 * thread-db.c: New file.
146 * proc-service.c: New file.
147 * acinclude.m4: New file.
148 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
149 proc-service.o, and thread-db.o.
150 (linux-low.o): Add USE_THREAD_DB.
151 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
152 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
153 * aclocal.m4: Regenerated.
154 * config.in: Regenerated.
155 * configure: Regenerated.
156 * configure.in: Check for proc_service.h, sys/procfs.h,
157 thread_db.h, and linux/elf.h headrs.
158 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
159 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
160 Check for -lthread_db and thread support.
161 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
162 PowerPC, and SuperH.
163 * i387-fp.c: Constify arguments.
164 * i387-fp.h: Likewise.
165 * inferiors.c: (struct thread_info): Renamed from
166 `struct inferior_info'. Remove PID member. Use generic inferior
167 list header. All uses updated.
168 (inferiors, signal_pid): Removed.
169 (all_threads): New variable.
170 (get_thread): Define.
171 (add_inferior_to_list): New function.
172 (for_each_inferior): New function.
173 (change_inferior_id): New function.
174 (add_inferior): Removed.
175 (remove_inferior): New function.
176 (add_thread): New function.
177 (free_one_thread): New function.
178 (remove_thread): New function.
179 (clear_inferiors): Use for_each_inferior and free_one_thread.
180 (find_inferior): New function.
181 (find_inferior_id): New function.
182 (inferior_target_data): Update argument type.
183 (set_inferior_target_data): Likewise.
184 (inferior_regcache_data): Likewise.
185 (set_inferior_regcache_data): Likewise.
186 * linux-low.c (linux_bp_reinsert): Remove.
187 (all_processes, stopping_threads, using_thrads)
188 (struct pending_signals, debug_threads, pid_of): New.
189 (inferior_pid): Replace with macro.
190 (struct inferior_linux_data): Remove.
191 (get_stop_pc, add_process): New functions.
192 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
193 Use add_process and add_thread.
194 (linux_attach_lwp): New function, based on old linux_attach. Use
195 add_process and add_thread. Set stop_expected for new threads.
196 (linux_attach): New function.
197 (linux_kill_one_process): New function.
198 (linux_kill): Kill all LWPs.
199 (linux_thread_alive): Use find_inferior_id.
200 (check_removed_breakpoints, status_pending_p): New functions.
201 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
202 Update. Use WNOHANG. Wait for cloned processes also. Update process
203 struct for the found process.
204 (linux_wait_for_event): New function.
205 (linux_wait): Use it. Support LWPs.
206 (send_sigstop, wait_for_sigstop, stop_all_processes)
207 (linux_resume_one_process, linux_continue_one_process): New functions.
208 (linux_resume): Support LWPs.
209 (REGISTER_RAW_SIZE): Remove.
210 (fetch_register): Use register_size instead. Call supply_register.
211 (usr_store_inferior_registers): Likewise. Call collect_register.
212 Fix recursive case.
213 (regsets_fetch_inferior_registers): Improve error message.
214 (regsets_store_inferior_registers): Add debugging.
215 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
216 (unstopped_p, linux_signal_pid): New functions.
217 (linux_target_ops): Add linux_signal_pid.
218 (linux_init_signals): New function.
219 (initialize_low): Call it. Initialize using_threads.
220 * regcache.c (inferior_regcache_data): Add valid
221 flag.
222 (get_regcache): Fetch registers lazily. Add fetch argument
223 and update all callers.
224 (regcache_invalidate_one, regcache_invalidate): New
225 functions.
226 (new_register_cache): Renamed from create_register_cache.
227 Return the new regcache.
228 (free_register_cache): Change argument to a void *.
229 (registers_to_string, registers_from_string): Call get_regcache
230 with fetch flag set.
231 (register_data): Make static. Pass fetch flag to get_regcache.
232 (supply_register): Call get_regcache with fetch flag clear.
233 (collect_register): Call get_regcache with fetch flag set.
234 (collect_register_as_string): New function.
235 * regcache.h: Update.
236 * remote-utils.c (putpkt): Flush after debug output and use
237 stderr.
238 Handle input interrupts while waiting for an ACK.
239 (input_interrupt): Use signal_pid method.
240 (getpkt): Flush after debug output and use stderr.
241 (outreg): Use collect_register_as_string.
242 (new_thread_notify, dead_thread_notify): New functions.
243 (prepare_resume_reply): Check using_threads. Set thread_from_wait
244 and general_thread.
245 (look_up_one_symbol): Flush after debug output.
246 * server.c (step_thread, server_waiting): New variables.
247 (start_inferior): Don't use signal_pid. Update call to mywait.
248 (attach_inferior): Update call to mywait.
249 (handle_query): Handle qfThreadInfo and qsThreadInfo.
250 (main): Don't fetch/store registers explicitly. Use
251 set_desired_inferior. Support proposed ``Hs'' packet. Update
252 calls to mywait.
253 * server.h: Update.
254 (struct inferior_list, struct_inferior_list_entry): New.
255 * target.c (set_desired_inferior): New.
256 (write_inferior_memory): Constify.
257 (mywait): New function.
258 * target.h: Update.
259 (struct target_ops): New signal_pid method.
260 (mywait): Removed macro, added prototype.
261
262 * linux-low.h (regset_func): Removed.
263 (regset_fill_func, regset_store_func): New.
264 (enum regset_type): New.
265 (struct regset_info): Add type field. Use new operation types.
266 (struct linux_target_ops): stop_pc renamed to get_pc.
267 Add decr_pc_after_break and breakpoint_at.
268 (get_process, get_thread_proess, get_process_thread)
269 (strut process_info, all_processes, linux_attach_lwp)
270 (thread_db_init): New.
271
272 * linux-arm-low.c (arm_get_pc, arm_set_pc,
273 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
274 (the_low_target): Add new members.
275 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
276 (i386_store_fpxregset): Constify.
277 (target_regsets): Add new kind identifier.
278 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
279 (i386_set_pc): Add debugging.
280 (i386_breakpoint_at): New function.
281 (the_low_target): Add new members.
282 * linux-mips-low.c (mips_get_pc, mips_set_pc)
283 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
284 (mips_breakpoint_at): New.
285 (the_low_target): Add new members.
286 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
287 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
288 (the_low_target): Add new members.
289 * linux-sh-low.c (sh_get_pc, sh_set_pc)
290 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
291 (the_low_target): Add new members.
292 * linux-x86-64-low.c (target_regsets): Add new kind
293 identifier.
294
295 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
296
297 From Martin Pool <mbp@samba.org>:
298 * server.c (gdbserver_usage): New function.
299 (main): Call it.
300
301 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
302
303 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
304 stop_at -> stop_pc.
305
306 2002-05-04 Andrew Cagney <ac131313@redhat.com>
307
308 * Makefile.in: Remove obsolete code.
309
310 2002-04-24 Michal Ludvig <mludvig@suse.cz>
311
312 * linux-low.c (regsets_fetch_inferior_registers),
313 (regsets_store_inferior_registers): Removed cast to int from
314 ptrace() calls.
315 * regcache.h: Added declaration of struct inferior_info.
316
317 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
318
319 * inferiors.c (struct inferior_info): Add regcache_data.
320 (add_inferior): Call create_register_cache.
321 (clear_inferiors): Call free_register_cache.
322 (inferior_regcache_data, set_inferior_regcache_data): New functions.
323 * regcache.c (struct inferior_regcache_data): New.
324 (registers): Remove.
325 (get_regcache): New function.
326 (create_register_cache, free_register_cache): New functions.
327 (set_register_cache): Don't initialize the register cache here.
328 (registers_to_string, registers_from_string, register_data): Call
329 get_regcache.
330 * regcache.h: Add prototypes.
331 * server.h: Likewise.
332
333 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
334
335 * mem-break.c: New file.
336 * mem-break.h: New file.
337 * Makefile.in: Add mem-break.o rule; update server.h
338 dependencies.
339 * inferiors.c (struct inferior_info): Add target_data
340 member.
341 (clear_inferiors): Free target_data member if set.
342 (inferior_target_data, set_inferior_target_data): New functions.
343 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
344 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
345 * linux-low.c (linux_bp_reinsert): New variable.
346 (struct inferior_linux_data): New.
347 (linux_create_inferior): Use set_inferior_target_data.
348 (linux_attach): Likewise. Call add_inferior.
349 (linux_wait_for_one_inferior): New function.
350 (linux_wait): Call it.
351 (linux_write_memory): Add const.
352 (initialize_low): Call set_breakpoint_data.
353 * linux-low.h (struct linux_target_ops): Add breakpoint
354 handling members.
355 * server.c (attach_inferior): Remove extra add_inferior
356 call.
357 * server.h: Include mem-break.h. Update inferior.c
358 prototypes.
359 * target.c (read_inferior_memory)
360 (write_inferior_memory): New functions.
361 * target.h (read_inferior_memory)
362 (write_inferior_memory): Change macros to prototypes.
363 (struct target_ops): Update comments. Add const to write_memory
364 definition.
365
366 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
367
368 * linux-low.c (usr_store_inferior_registers): Support
369 registers which are allowed to fail to store.
370 * linux-low.h (linux_target_ops): Likewise.
371 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
372 (ppc_cannot_store_register): FPSCR may not be storable.
373
374 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
375
376 * server.h: Include <string.h> if HAVE_STRING_H.
377 * ChangeLog: Correct paths in last ChangeLog entry.
378
379 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
380
381 * linux-low.h: Remove obsolete prototypes.
382 (struct linux_target_ops): New.
383 (extern the_low_target): New.
384 * linux-low.c (num_regs, regmap): Remove declarations.
385 (register_addr): Use the_low_target explicitly.
386 (fetch_register): Likewise.
387 (usr_fetch_inferior_registers): Likewise.
388 (usr_store_inferior_registers): Likewise.
389 * linux-arm-low.c (num_regs): Remove.
390 (arm_num_regs): Define.
391 (arm_regmap): Renamed from regmap, made static.
392 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
393 made static.
394 (arm_cannot_store_register): Renamed from cannot_store_register,
395 made static.
396 (the_low_target): New.
397 * linux-i386-low.c (num_regs): Remove.
398 (i386_num_regs): Define.
399 (i386_regmap): Renamed from regmap, made static.
400 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
401 made static.
402 (i386_cannot_store_register): Renamed from cannot_store_register,
403 made static.
404 (the_low_target): New.
405 * linux-ia64-low.c (num_regs): Remove.
406 (ia64_num_regs): Define.
407 (ia64_regmap): Renamed from regmap, made static.
408 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
409 made static.
410 (ia64_cannot_store_register): Renamed from cannot_store_register,
411 made static.
412 (the_low_target): New.
413 * linux-m68k-low.c (num_regs): Remove.
414 (m68k_num_regs): Define.
415 (m68k_regmap): Renamed from regmap, made static.
416 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
417 made static.
418 (m68k_cannot_store_register): Renamed from cannot_store_register,
419 made static.
420 (the_low_target): New.
421 * linux-mips-low.c (num_regs): Remove.
422 (mips_num_regs): Define.
423 (mips_regmap): Renamed from regmap, made static.
424 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
425 made static.
426 (mips_cannot_store_register): Renamed from cannot_store_register,
427 made static.
428 (the_low_target): New.
429 * linux-ppc-low.c (num_regs): Remove.
430 (ppc_num_regs): Define.
431 (ppc_regmap): Renamed from regmap, made static.
432 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
433 made static.
434 (ppc_cannot_store_register): Renamed from cannot_store_register,
435 made static.
436 (the_low_target): New.
437 * linux-s390-low.c (num_regs): Remove.
438 (s390_num_regs): Define.
439 (s390_regmap): Renamed from regmap, made static.
440 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
441 made static.
442 (s390_cannot_store_register): Renamed from cannot_store_register,
443 made static.
444 (the_low_target): New.
445 * linux-sh-low.c (num_regs): Remove.
446 (sh_num_regs): Define.
447 (sh_regmap): Renamed from regmap, made static.
448 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
449 made static.
450 (sh_cannot_store_register): Renamed from cannot_store_register,
451 made static.
452 (the_low_target): New.
453 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
454 (the_low_target): New.
455
456 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
457
458 * Makefile.in: Add stamp-h target.
459 * configure.in: Create stamp-h.
460 * configure: Regenerated.
461
462 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
463
464 * inferiors.c: New file.
465 * target.c: New file.
466 * target.h: New file.
467 * Makefile.in: Add target.o and inferiors.o. Update
468 dependencies.
469 * linux-low.c (inferior_pid): New static variable,
470 moved from server.c.
471 (linux_create_inferior): Renamed from create_inferior.
472 Call add_inferior. Return 0 on success instead of a PID.
473 (linux_attach): Renamed from myattach.
474 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
475 (linux_thread_alive): Renamed from mythread_alive.
476 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
477 child dies.
478 (linux_resume): Renamed from myresume. Add missing ``return 0''.
479 (regsets_store_inferior_registers): Correct error message.
480 Add missing ``return 0''.
481 (linux_fetch_registers): Renamed from fetch_inferior_registers.
482 (linux_store_registers): Renamed from store_inferior_registers.
483 (linux_read_memory): Renamed from read_inferior_memory.
484 (linux_write_memory): Renamed from write_inferior_memory.
485 (linux_target_ops): New structure.
486 (initialize_low): Call set_target_ops ().
487 * remote-utils.c (unhexify): New function.
488 (hexify): New function.
489 (input_interrupt): Send signals to ``signal_pid''.
490 * server.c (inferior_pid): Remove.
491 (start_inferior): Update create_inferior call.
492 (attach_inferior): Call add_inferior.
493 (handle_query): New function.
494 (main): Call handle_query for `q' packets.
495 * server.h: Include "target.h". Remove obsolete prototypes.
496 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
497
498 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
499
500 * Makefile.in: Add WARN_CFLAGS. Update configury
501 dependencies.
502 * configure.in: Check for <string.h>
503 * configure: Regenerate.
504 * config.in: Regenerate.
505 * gdbreplay.c: Include needed system headers.
506 (remote_open): Remove strchr prototype.
507 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
508 * regcache.c (supply_register): Change buf argument to const void *.
509 (supply_register_by_name): Likewise.
510 (collect_register): Change buf argument to void *.
511 (collect_register_by_name): Likewise.
512 * regcache.h: Add missing prototypes.
513 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
514 * server.c (handle_query): New function.
515 (attached): New static variable, moved out of main.
516 (main): Quiet longjmp clobber warnings.
517 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
518 * utils.c (error): Remove NORETURN.
519 (fatal): Likewise.
520