1 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
3 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6 2002-11-17 Stuart Hughes <seh@zee2.com>
8 * linux-arm-low.c (arm_num_regs): Increase.
9 (arm_regmap): Include status register.
11 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
13 * linux-low.c (register_addr): Remove incorrect -1 check.
15 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17 * linux-low.c (linux_create_inferior): Call setpgid. Return
19 (unstopped_p, linux_signal_pid): Remove.
20 (linux_target_ops): Remove linux_signal_pid.
21 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22 global instead of target method.
23 * target.h (struct target_ops): Remove signal_pid. Update comment
25 * server.c (signal_pid): New variable.
26 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
27 gdbserver. Set the child to be the foreground process group.
28 (attach_inferior): Set signal_pid.
30 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
32 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
34 2002-08-20 Jim Blandy <jimb@redhat.com>
36 * Makefile.in (LDFLAGS): Allow the configure script to establish a
39 2002-08-01 Andrew Cagney <cagney@redhat.com>
41 * Makefile.in: Make chill references obsolete.
43 2002-07-24 Kevin Buettner <kevinb@redhat.com>
45 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
46 * configure: Regenerate.
47 * config.in: Regenerate.
49 2002-07-09 David O'Brien <obrien@FreeBSD.org>
51 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
52 (perror_with_name, remote_close, remote_open, expect, play): Static.
54 2002-07-04 Michal Ludvig <mludvig@suse.cz>
56 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
57 byte offsets instead of an array of indexes.
58 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
60 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
62 * regcache.c: Add comment.
64 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
66 * thread-db.c: New file.
67 * proc-service.c: New file.
68 * acinclude.m4: New file.
69 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
70 proc-service.o, and thread-db.o.
71 (linux-low.o): Add USE_THREAD_DB.
72 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
73 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
74 * aclocal.m4: Regenerated.
75 * config.in: Regenerated.
76 * configure: Regenerated.
77 * configure.in: Check for proc_service.h, sys/procfs.h,
78 thread_db.h, and linux/elf.h headrs.
79 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
80 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
81 Check for -lthread_db and thread support.
82 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
84 * i387-fp.c: Constify arguments.
85 * i387-fp.h: Likewise.
86 * inferiors.c: (struct thread_info): Renamed from
87 `struct inferior_info'. Remove PID member. Use generic inferior
88 list header. All uses updated.
89 (inferiors, signal_pid): Removed.
90 (all_threads): New variable.
92 (add_inferior_to_list): New function.
93 (for_each_inferior): New function.
94 (change_inferior_id): New function.
95 (add_inferior): Removed.
96 (remove_inferior): New function.
97 (add_thread): New function.
98 (free_one_thread): New function.
99 (remove_thread): New function.
100 (clear_inferiors): Use for_each_inferior and free_one_thread.
101 (find_inferior): New function.
102 (find_inferior_id): New function.
103 (inferior_target_data): Update argument type.
104 (set_inferior_target_data): Likewise.
105 (inferior_regcache_data): Likewise.
106 (set_inferior_regcache_data): Likewise.
107 * linux-low.c (linux_bp_reinsert): Remove.
108 (all_processes, stopping_threads, using_thrads)
109 (struct pending_signals, debug_threads, pid_of): New.
110 (inferior_pid): Replace with macro.
111 (struct inferior_linux_data): Remove.
112 (get_stop_pc, add_process): New functions.
113 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
114 Use add_process and add_thread.
115 (linux_attach_lwp): New function, based on old linux_attach. Use
116 add_process and add_thread. Set stop_expected for new threads.
117 (linux_attach): New function.
118 (linux_kill_one_process): New function.
119 (linux_kill): Kill all LWPs.
120 (linux_thread_alive): Use find_inferior_id.
121 (check_removed_breakpoints, status_pending_p): New functions.
122 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
123 Update. Use WNOHANG. Wait for cloned processes also. Update process
124 struct for the found process.
125 (linux_wait_for_event): New function.
126 (linux_wait): Use it. Support LWPs.
127 (send_sigstop, wait_for_sigstop, stop_all_processes)
128 (linux_resume_one_process, linux_continue_one_process): New functions.
129 (linux_resume): Support LWPs.
130 (REGISTER_RAW_SIZE): Remove.
131 (fetch_register): Use register_size instead. Call supply_register.
132 (usr_store_inferior_registers): Likewise. Call collect_register.
134 (regsets_fetch_inferior_registers): Improve error message.
135 (regsets_store_inferior_registers): Add debugging.
136 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
137 (unstopped_p, linux_signal_pid): New functions.
138 (linux_target_ops): Add linux_signal_pid.
139 (linux_init_signals): New function.
140 (initialize_low): Call it. Initialize using_threads.
141 * regcache.c (inferior_regcache_data): Add valid
143 (get_regcache): Fetch registers lazily. Add fetch argument
144 and update all callers.
145 (regcache_invalidate_one, regcache_invalidate): New
147 (new_register_cache): Renamed from create_register_cache.
148 Return the new regcache.
149 (free_register_cache): Change argument to a void *.
150 (registers_to_string, registers_from_string): Call get_regcache
152 (register_data): Make static. Pass fetch flag to get_regcache.
153 (supply_register): Call get_regcache with fetch flag clear.
154 (collect_register): Call get_regcache with fetch flag set.
155 (collect_register_as_string): New function.
156 * regcache.h: Update.
157 * remote-utils.c (putpkt): Flush after debug output and use
159 Handle input interrupts while waiting for an ACK.
160 (input_interrupt): Use signal_pid method.
161 (getpkt): Flush after debug output and use stderr.
162 (outreg): Use collect_register_as_string.
163 (new_thread_notify, dead_thread_notify): New functions.
164 (prepare_resume_reply): Check using_threads. Set thread_from_wait
166 (look_up_one_symbol): Flush after debug output.
167 * server.c (step_thread, server_waiting): New variables.
168 (start_inferior): Don't use signal_pid. Update call to mywait.
169 (attach_inferior): Update call to mywait.
170 (handle_query): Handle qfThreadInfo and qsThreadInfo.
171 (main): Don't fetch/store registers explicitly. Use
172 set_desired_inferior. Support proposed ``Hs'' packet. Update
175 (struct inferior_list, struct_inferior_list_entry): New.
176 * target.c (set_desired_inferior): New.
177 (write_inferior_memory): Constify.
178 (mywait): New function.
180 (struct target_ops): New signal_pid method.
181 (mywait): Removed macro, added prototype.
183 * linux-low.h (regset_func): Removed.
184 (regset_fill_func, regset_store_func): New.
185 (enum regset_type): New.
186 (struct regset_info): Add type field. Use new operation types.
187 (struct linux_target_ops): stop_pc renamed to get_pc.
188 Add decr_pc_after_break and breakpoint_at.
189 (get_process, get_thread_proess, get_process_thread)
190 (strut process_info, all_processes, linux_attach_lwp)
191 (thread_db_init): New.
193 * linux-arm-low.c (arm_get_pc, arm_set_pc,
194 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
195 (the_low_target): Add new members.
196 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
197 (i386_store_fpxregset): Constify.
198 (target_regsets): Add new kind identifier.
199 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
200 (i386_set_pc): Add debugging.
201 (i386_breakpoint_at): New function.
202 (the_low_target): Add new members.
203 * linux-mips-low.c (mips_get_pc, mips_set_pc)
204 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
205 (mips_breakpoint_at): New.
206 (the_low_target): Add new members.
207 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
208 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
209 (the_low_target): Add new members.
210 * linux-sh-low.c (sh_get_pc, sh_set_pc)
211 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
212 (the_low_target): Add new members.
213 * linux-x86-64-low.c (target_regsets): Add new kind
216 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
218 From Martin Pool <mbp@samba.org>:
219 * server.c (gdbserver_usage): New function.
222 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
224 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
227 2002-05-04 Andrew Cagney <ac131313@redhat.com>
229 * Makefile.in: Remove obsolete code.
231 2002-04-24 Michal Ludvig <mludvig@suse.cz>
233 * linux-low.c (regsets_fetch_inferior_registers),
234 (regsets_store_inferior_registers): Removed cast to int from
236 * regcache.h: Added declaration of struct inferior_info.
238 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
240 * inferiors.c (struct inferior_info): Add regcache_data.
241 (add_inferior): Call create_register_cache.
242 (clear_inferiors): Call free_register_cache.
243 (inferior_regcache_data, set_inferior_regcache_data): New functions.
244 * regcache.c (struct inferior_regcache_data): New.
246 (get_regcache): New function.
247 (create_register_cache, free_register_cache): New functions.
248 (set_register_cache): Don't initialize the register cache here.
249 (registers_to_string, registers_from_string, register_data): Call
251 * regcache.h: Add prototypes.
252 * server.h: Likewise.
254 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
256 * mem-break.c: New file.
257 * mem-break.h: New file.
258 * Makefile.in: Add mem-break.o rule; update server.h
260 * inferiors.c (struct inferior_info): Add target_data
262 (clear_inferiors): Free target_data member if set.
263 (inferior_target_data, set_inferior_target_data): New functions.
264 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
265 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
266 * linux-low.c (linux_bp_reinsert): New variable.
267 (struct inferior_linux_data): New.
268 (linux_create_inferior): Use set_inferior_target_data.
269 (linux_attach): Likewise. Call add_inferior.
270 (linux_wait_for_one_inferior): New function.
271 (linux_wait): Call it.
272 (linux_write_memory): Add const.
273 (initialize_low): Call set_breakpoint_data.
274 * linux-low.h (struct linux_target_ops): Add breakpoint
276 * server.c (attach_inferior): Remove extra add_inferior
278 * server.h: Include mem-break.h. Update inferior.c
280 * target.c (read_inferior_memory)
281 (write_inferior_memory): New functions.
282 * target.h (read_inferior_memory)
283 (write_inferior_memory): Change macros to prototypes.
284 (struct target_ops): Update comments. Add const to write_memory
287 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
289 * linux-low.c (usr_store_inferior_registers): Support
290 registers which are allowed to fail to store.
291 * linux-low.h (linux_target_ops): Likewise.
292 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
293 (ppc_cannot_store_register): FPSCR may not be storable.
295 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
297 * server.h: Include <string.h> if HAVE_STRING_H.
298 * ChangeLog: Correct paths in last ChangeLog entry.
300 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
302 * linux-low.h: Remove obsolete prototypes.
303 (struct linux_target_ops): New.
304 (extern the_low_target): New.
305 * linux-low.c (num_regs, regmap): Remove declarations.
306 (register_addr): Use the_low_target explicitly.
307 (fetch_register): Likewise.
308 (usr_fetch_inferior_registers): Likewise.
309 (usr_store_inferior_registers): Likewise.
310 * linux-arm-low.c (num_regs): Remove.
311 (arm_num_regs): Define.
312 (arm_regmap): Renamed from regmap, made static.
313 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
315 (arm_cannot_store_register): Renamed from cannot_store_register,
317 (the_low_target): New.
318 * linux-i386-low.c (num_regs): Remove.
319 (i386_num_regs): Define.
320 (i386_regmap): Renamed from regmap, made static.
321 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
323 (i386_cannot_store_register): Renamed from cannot_store_register,
325 (the_low_target): New.
326 * linux-ia64-low.c (num_regs): Remove.
327 (ia64_num_regs): Define.
328 (ia64_regmap): Renamed from regmap, made static.
329 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
331 (ia64_cannot_store_register): Renamed from cannot_store_register,
333 (the_low_target): New.
334 * linux-m68k-low.c (num_regs): Remove.
335 (m68k_num_regs): Define.
336 (m68k_regmap): Renamed from regmap, made static.
337 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
339 (m68k_cannot_store_register): Renamed from cannot_store_register,
341 (the_low_target): New.
342 * linux-mips-low.c (num_regs): Remove.
343 (mips_num_regs): Define.
344 (mips_regmap): Renamed from regmap, made static.
345 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
347 (mips_cannot_store_register): Renamed from cannot_store_register,
349 (the_low_target): New.
350 * linux-ppc-low.c (num_regs): Remove.
351 (ppc_num_regs): Define.
352 (ppc_regmap): Renamed from regmap, made static.
353 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
355 (ppc_cannot_store_register): Renamed from cannot_store_register,
357 (the_low_target): New.
358 * linux-s390-low.c (num_regs): Remove.
359 (s390_num_regs): Define.
360 (s390_regmap): Renamed from regmap, made static.
361 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
363 (s390_cannot_store_register): Renamed from cannot_store_register,
365 (the_low_target): New.
366 * linux-sh-low.c (num_regs): Remove.
367 (sh_num_regs): Define.
368 (sh_regmap): Renamed from regmap, made static.
369 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
371 (sh_cannot_store_register): Renamed from cannot_store_register,
373 (the_low_target): New.
374 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
375 (the_low_target): New.
377 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
379 * Makefile.in: Add stamp-h target.
380 * configure.in: Create stamp-h.
381 * configure: Regenerated.
383 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
385 * inferiors.c: New file.
386 * target.c: New file.
387 * target.h: New file.
388 * Makefile.in: Add target.o and inferiors.o. Update
390 * linux-low.c (inferior_pid): New static variable,
392 (linux_create_inferior): Renamed from create_inferior.
393 Call add_inferior. Return 0 on success instead of a PID.
394 (linux_attach): Renamed from myattach.
395 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
396 (linux_thread_alive): Renamed from mythread_alive.
397 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
399 (linux_resume): Renamed from myresume. Add missing ``return 0''.
400 (regsets_store_inferior_registers): Correct error message.
401 Add missing ``return 0''.
402 (linux_fetch_registers): Renamed from fetch_inferior_registers.
403 (linux_store_registers): Renamed from store_inferior_registers.
404 (linux_read_memory): Renamed from read_inferior_memory.
405 (linux_write_memory): Renamed from write_inferior_memory.
406 (linux_target_ops): New structure.
407 (initialize_low): Call set_target_ops ().
408 * remote-utils.c (unhexify): New function.
409 (hexify): New function.
410 (input_interrupt): Send signals to ``signal_pid''.
411 * server.c (inferior_pid): Remove.
412 (start_inferior): Update create_inferior call.
413 (attach_inferior): Call add_inferior.
414 (handle_query): New function.
415 (main): Call handle_query for `q' packets.
416 * server.h: Include "target.h". Remove obsolete prototypes.
417 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
419 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
421 * Makefile.in: Add WARN_CFLAGS. Update configury
423 * configure.in: Check for <string.h>
424 * configure: Regenerate.
425 * config.in: Regenerate.
426 * gdbreplay.c: Include needed system headers.
427 (remote_open): Remove strchr prototype.
428 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
429 * regcache.c (supply_register): Change buf argument to const void *.
430 (supply_register_by_name): Likewise.
431 (collect_register): Change buf argument to void *.
432 (collect_register_by_name): Likewise.
433 * regcache.h: Add missing prototypes.
434 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
435 * server.c (handle_query): New function.
436 (attached): New static variable, moved out of main.
437 (main): Quiet longjmp clobber warnings.
438 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
439 * utils.c (error): Remove NORETURN.