]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
* gdb.threads/tls.exp: Allow stops in sem_post.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8264bb58
DJ
12006-12-30 Denis PILAT <denis.pilat@st.com>
2 Daniel Jacobowitz <dan@codesourcery.com>
3
4 * remote-utils.c (remote_open): Check the type of specified
5 serial port devices before opening them.
6 * server.c (main): Kill the inferior if an error occurs during
7 the first remote_open.
8
a5e13d24
DJ
92006-12-05 Markus Deuling <deuling@de.ibm.com>
10
11 * README: Update supported targets.
12
186947f7
DJ
132006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14
15 * Makefile.in (clean): Remove reg-mips64.c.
16 (reg-mips64.c, reg-mips64.o): New rules.
17 * configure.srv: Handle mips64. Include regset support for mips.
18 * linux-mips-low.c (union mips_register): New.
19 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20 (mips_breakpoint, mips_breakpoint_at): Use int.
21 (mips_collect_register, mips_supply_register)
22 (mips_collect_register_32bit, mips_supply_register_32bit)
23 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
24 (mips_store_fpregset, target_regsets): New.
25 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
26
a13e2c95
UW
272006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
28
29 * configure.srv: Add target "spu*-*-*".
30 * Makefile.in (clean): Remove reg-spu.c.
31 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
32 * spu-low.c: New file.
33
cb7283db
DJ
342006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
35
36 * configure.ac: Correct td_thr_tls_get_addr test.
37 * configure: Regenerated.
38
89be2091
DJ
392006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
40
41 * linux-low.c (linux_wait_for_event): Reformat. Use the
42 pass_signals array.
43 * remote-utils.c (decode_address_to_semicolon): New.
44 * server.c (pass_signals, handle_general_set): New.
45 (handle_query): Mention QPassSignals for qSupported.
46 (main): Call handle_general_set.
47 * server.h (pass_signals, decode_address_to_semicolon): New.
48
000ef4f0
DJ
492006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
50
51 * server.c (handle_query): Correct error handling for read_auxv.
52
b7149293
UW
532005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
54
55 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
56 and srv_linux_thread_db to yes.
57 * linux-s390-low.c (s390_fill_gregset): New function.
58 (target_regsets): Define data structure.
59
dae5f5cf
DJ
602006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
61
62 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
63 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
64 * config.in, configure: Regenerated.
65 * inferiors.c (gdb_id_to_thread): New function.
66 (gdb_id_to_thread_id): Use it.
67 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
68 * linux-low.h (struct process_info): Add th member.
69 (thread_db_get_tls_address): New prototype.
70 * remote-utils.c (decode_address): Make non-static.
71 * server.c (handle_query): Handle qGetTLSAddr.
72 * server.h (gdb_id_to_thread, decode_address): New prototypes.
73 * target.h (struct target_ops): Add get_tls_address.
74 * thread-db.c (maybe_attach_thread): Save the thread handle.
75 (thread_db_get_tls_address): New.
76
32ca6d61
DJ
772006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
78
79 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
80 (linux_resume_one_process): Take a siginfo_t *. Update all
81 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
82 (struct pending_signals): Add a siginfo_t.
83 (linux_wait_for_process): Always set last_status.
84 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
85 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
86 * linux-low.h (struct process_info): Add last_status.
87
5ffff7c1
DJ
882006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
89
90 * remote-utils.c (try_rle): New function.
91 (putpkt_binary): Use it.
92
8695c747
DJ
932006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
94
95 * Makefile.in (clean): Clean reg-x86-64-linux.c.
96 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
97 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
98 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
99 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
100 point registers.
101
290fadea
RS
1022006-08-08 Richard Sandiford <richard@codesourcery.com>
103
104 * server.c (terminal_fd): New variable.
105 (old_foreground_pgrp): Likewise.
106 (restore_old_foreground_pgrp): New function.
107 (start_inferior): Record the terminal file descriptor in terminal_fd
108 and its original foreground group in old_foreground_pgrp. Register
109 restore_old_foreground_pgrp with atexit().
110
9f2e1e63
DJ
1112006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
112
113 * server.c (handle_query): Correct qPart to qXfer.
114
b80864fb
DJ
1152006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
116
117 * configure.ac: Check for more headers which are missing on
118 Windows. Automatically supply -lwsock32 and USE_WIN32API.
119 * configure.srv: Add Cygwin and mingw32.
120 * remote-utils.c: Don't include headers unconditionally which
121 are missing on mingw32. Include <winsock.h> for mingw32.
122 (remote_open): Adjust for mingw32 support. Flush
123 standard error after writing to it.
124 (remote_close, putpkt_binary, input_interrupt, block_async_io)
125 (unblock_async_io, enable_async_io, disable_async_io)
126 (readchar, getpkt): Update for Winsock support.
127 (prepare_resume_reply): Expect a protocol signal number.
128 * server.c: Disable <sys/wait.h> on mingw32.
129 (start_inferior): Adjust for mingw32 support. Flush
130 standard error after writing to it.
131 (attach_inferior): Likewise. Use protocol signal
132 numbers.
133 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
134 and names.
135 * win32-i386-low.c: New file.
136 * Makefile.in (XM_CLIBS): Set.
137 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
138 (win32-i386-low.o): New dependency rule.
139 * linux-low.c (linux_wait): Use target signal numbers.
140 * target.h (struct target_ops): Doc fix.
141 * server.h (target_signal_to_name): New prototype.
142 * gdbreplay.c: Don't include headers unconditionally which
143 are missing on mingw32. Include <winsock.h> for mingw32.
144 (remote_close, remote_open): Adjust for Winsock support.
145 * configure, config.in: Regenerated.
146
0876f84a
DJ
1472006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
148
149 * server.c (decode_xfer_read, write_qxfer_response): New.
150 (handle_query): Take a packet length argument. Handle
151 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
152 the qSupported response.
153 (main): Update call to handle_query.
154
01f9e8fa
DJ
1552006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
156
157 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
158 (putpkt_binary): Renamed from putpkt and adjusted for binary
159 data.
160 (putpkt): New wrapper for putpkt_binary.
161 (readchar): Don't mask off the high bit.
162 (decode_X_packet): New function.
163 * server.c (main): Call putpkt_binary if a handler sets the packet
164 length. Save the length of the incoming packet. Handle 'X'.
165 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
166
be2a5f71
DJ
1672006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
168
169 * server.c (handle_query): Handle qSupported.
170
ea025f5f
DJ
1712006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
172
173 * remote-utils.c (all_symbols_looked_up): New variable.
174 (look_up_one_symbol): Check it.
175 * server.h (look_up_one_symbol): New declaration.
176 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
177
9308fc88
DJ
1782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
179
180 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 181 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
182 (PTRACE_GET_THREAD_AREA): Define.
183 (ps_get_thread_area): New function.
184
52fb6437
NS
1852006-05-09 Nathan Sidwell <nathan@codesourcery.com>
186
187 * configure.srv (m68k*-*-uclinux*): New target.
188 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
189 (linux_resume_one_process): Remove extraneous cast.
190 (linux_read_offsets): New.
191 (linux_target_op): Add linux_read_offsets on mmuless systems.
192 * server.c (handle_query): Add qOffsets logic.
193 * target.h (struct target_ops): Add read_offsets.
194
21b0f40c
DJ
1952006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
196
197 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
198 (PTRACE_GET_THREAD_AREA): Define.
199 (ps_get_thread_area): New function.
200 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
201 (linux-x86-64-low.o): Update.
202
0050a760
DJ
2032006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
204
205 * configure.ac: Remove checks for prfpregset_t.
206 * gdb_proc_service.h: New file.
207 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
208 new "gdb_proc_service.h".
209 * proc-service.c: Likewise.
210 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
211 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
212 * Makefile.in (gdb_proc_service_h): Updated.
213 * configure, config.in: Regenerated.
214
b92a518e
DJ
2152006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
216
217 * remote-utils.c (prepare_resume_reply): Move declaration
218 of gdb_id_from_wait to the top of the block.
219
545587ee
DJ
2202006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
221
222 * linux-low.c (regsets_store_inferior_registers): Read the regset
223 from the target before filling it.
224
9db87ebd
DJ
2252006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
226
227 * server.c (attach_inferior): Return SIGTRAP for a successful
228 attach.
229
dd24457d
DJ
2302006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
231
232 * Makefile.in (OBS): Add version.o.
233 (STAGESTUFF): Delete.
234 (version.o): Add dependencies.
235 (version.c): Replace rule.
236 (clean): Remove version.c.
237 * server.c (gdbserver_version): New.
238 (gdbserver_usage): Use printf.
239 (main): Handle --version and --help.
240 * server.h (version, host_name): Add declarations.
241
6f0f660e
EZ
2422005-12-23 Eli Zaretskii <eliz@gnu.org>
243
244 * linux-arm-low.c:
245 * linux-arm-low.c:
246 * inferiors.c:
247 * i387-fp.h:
248 * i387-fp.c:
249 * gdbreplay.c:
250 * regcache.c:
251 * proc-service.c:
252 * mem-break.h:
253 * mem-break.c:
254 * linux-x86-64-low.c:
255 * linux-sh-low.c:
256 * linux-s390-low.c:
257 * linux-ppc64-low.c:
258 * linux-ppc-low.c:
259 * linux-mips-low.c:
260 * linux-m68k-low.c:
261 * linux-m32r-low.c:
262 * linux-low.h:
263 * linux-low.c:
264 * linux-ia64-low.c:
265 * linux-i386-low.c:
266 * linux-crisv32-low.c:
267 * thread-db.c:
268 * terminal.h:
269 * target.h:
270 * target.c:
271 * server.h:
272 * server.c:
273 * remote-utils.c:
274 * regcache.h:
275 * utils.c:
276 * Makefile.in:
277 * configure.ac:
278 * gdbserver.1: Add (C) after Copyright. Update the FSF
279 address.
280
9d1fb177
DJ
2812005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
282
283 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
284 (arm_breakpoint_at): Recognize both breakpoints.
285 (the_low_target): Use the correct breakpoint instruction.
286
011a70c2
DJ
2872005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
288
289 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
290 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
291 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
292 (the_low_target): Update.
293
7fb85e41
AS
2942005-10-25 Andreas Schwab <schwab@suse.de>
295
296 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
297
298 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
299 (ia64_num_regs): Reduce to 462.
300
3db0444b
DJ
3012005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
302
303 * acinclude.m4: Correct quoting.
304 * aclocal.m4: Regenerated.
305
306 Suggested by SZOKOVACS Robert <szo@ies.hu>:
307 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
308 (thread_db_init): Call thread_db_err_str.
309 * configure.ac: Check for TD_VERSION.
310 * config.in, configure: Regenerated.
311
bee0189a
DJ
3122005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
313
314 * server.h (error, fatal, warning): Add ATTR_FORMAT.
315
e9d25b98
DJ
3162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
317
318 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
319 is not available. Define HAVE_PTRACE_GETREGS if it is.
320 * config.in, configure: Regenerated.
321 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
322 * linux-i386-low.c, linux-m68k-low.c: Update to use
323 HAVE_PTRACE_GETREGS.
324 * linux-low.c (regsets_fetch_inferior_registers)
325 (regsets_store_inferior_registers): Only return 0 if we processed
326 GENERAL_REGS.
327 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
328 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
329
a06660f7
DJ
3302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
331
332 * inferiors.c (struct thread_info): Add gdb_id.
333 (add_thread): Add gdb_id argument.
334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
335 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
336 calls to add_thread.
337 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
338 * server.c (handle_query): Use thread_to_gdb_id.
339 (handle_v_cont, main): Use gdb_id_to_thread_id.
340 * server.h (add_thread): Update prototype.
341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
342 prototypes.
343
5a1f5858
DJ
3442005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
345
346 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
347 left-padded registers.
348 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
349 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
350
e122f1f5
SE
3512005-07-01 Steve Ellcey <sje@cup.hp.com>
352
353 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
354 * configure: Regenerate.
355 * config.in: Regenerate.
356 * server.h (NEED_DECLARATION_STRERROR):
357 Replace with !HAVE_DECL_STRERROR.
358
d592fa2f
DJ
3592005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
360
361 * linux-low.c (linux_wait, linux_send_signal): Don't test
362 an unsigned long variable for > 0 if it could be MAX_ULONG.
363 * server.c (myresume): Likewise.
364 * target.c (set_desired_inferior): Likewise.
365
ccbd4912
MK
3662005-06-13 Mark Kettenis <kettenis@gnu.org>
367
368 * configure.ac: Simplify and improve check for socklen_t.
369 * configure, config.in: Regenerate.
370
f450004a
DJ
3712005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
372
373 * acconfig.h: Remove.
374 * configure.ac: Add a test for socklen_t. Use three-argument
375 AC_DEFINE throughout.
376 * config.in: Regenerated using autoheader 2.59.
377 * configure: Regenerated.
378
379 * gdbreplay.c (socklen_t): Provide a default.
380 (remote_open): Use socklen_t.
381 * remote-utils.c (socklen_t): Provide a default.
382 (remote_open): Use socklen_t.
383 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
384 unsigned char.
385
386 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
387 char for buffers.
388 * linux-low.c (linux_read_memory, linux_write_memory)
389 (linux_read_auxv): Likewise.
390 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
391 (check_mem_write): Likewise.
392 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
393 Likewise.
394 * regcache.c (struct inferior_rgcache_data, registers_to_string)
395 (registers_from_string, register_data): Likewise.
396 * server.c (handle_query, main): Likewise.
397 * server.h (convert_ascii_to_int, convert_int_to_ascii)
398 (decode_M_packet): Likewise.
399 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
400 * target.h (struct target_ops): Update read_memory, write_memory,
401 and read_auxv.
402 (read_inferior_memory, write_inferior_memory): Update.
403 * linux-low.h (struct linux_target_ops): Change type of breakpoint
404 to unsigned char *.
405 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
406 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
407 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
408 linux-s390-low.c, linux-sh-low.c: Update for changes in
409 read_inferior_memory and the_low_target->breakpoint.
410
eee84df1
DJ
4112005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
412
413 * Makefile.in (SFILES): Add linux-ppc64-low.c.
414 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
415 * configure.srv: Add powerpc64-*-linux*.
416 * linux-ppc64-low.c: New file.
417
45b134e5
OF
4182005-05-23 Orjan Friberg <orjanf@axis.com>
419
420 * linux-cris-low.c: New file with support for CRIS.
421 * linux-crisv32-low.c: Ditto for CRISv32.
422 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
423 (clean): Add reg-cris.c and reg-crisv32.c.
424 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
425 reg-crisv32.o, and reg-crisv32.c to make rules.
426 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
427 recognized targets.
428
48d93c75
UW
4292005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
430
431 * linux-low.c (fetch_register): Ensure buffer size is a multiple
432 of sizeof (PTRACE_XFER_TYPE).
433 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
434
e013ee27
OF
4352005-05-12 Orjan Friberg <orjanf@axis.com>
436
437 * target.h (struct target_ops): Add insert_watchpoint,
438 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
439 pointers for hardware watchpoint support.
440 * linux-low.h (struct linux_target_ops): Ditto.
441 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
442 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
443 to linux_target_ops.
444 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
445 reply packet.
446 * server.c (main): Recognize 'Z' and 'z' packets.
447
b0ded00b
UW
4482005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
449
450 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
451 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
452 (the_low_target): Add new members.
453
8643e2ad
DJ
4542005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
455
456 * proc-service.c (ps_lgetregs): Search all_processes instead of
457 all_threads.
458
fc620387
DJ
4592005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
460
461 * server.c (start_inferior): Change return type to int.
462 (attach_inferior): Change sigptr to int *.
463 (handle_v_cont, handle_v_requests): Change signal to int *.
464 (main): Change signal to int.
465
4662005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
467
468 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
469 * configure.srv: Add m32r*-*-linux*.
470 * linux-m32r-low.c: New file.
471
e0e76420
DJ
4722005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
473
474 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
475
a1928bad
DJ
4762005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
477
478 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
479 Take unsigned long arguments for PIDs.
480 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
481 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
482 (wait_for_sigstop, linux_resume_one_process)
483 (regsets_fetch_inferior_registers, linux_send_signal)
484 (linux_read_auxv): Likewise. Update the types of variables holding
485 PIDs. Update format string specifiers.
486 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
487 * remote-utils.c (prepare_resume_reply): Likewise.
488 * server.c (cont_thread, general_thread, step_thread)
489 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
490 unsigned long.
491 (handle_query): Update format specifiers.
492 (handle_v_cont, main): Use strtoul for thread IDs.
493 * server.h (struct inferior_list_entry): Use unsigned long for ID.
494 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
495 (general_thread, step_thread, thread_from_wait)
496 (old_thread_from_wait): Update.
497 * target.h (struct thread_resume): Use unsigned long for THREAD.
498 (struct target_ops): Use unsigned long for arguments to attach and
499 thread_alive.
500
dcdb98d2
DJ
5012005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
502
503 * acinclude.m4: Include bfd/bfd.m4 directly.
504 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
505 <agriffis@toolchain.org>.
506 * aclocal.m4, configure: Regenerated.
507
bec39cab
AC
5082005-01-07 Andrew Cagney <cagney@gnu.org>
509
510 * configure.ac: Rename configure.in, require autoconf 2.59.
511 * configure: Re-generate.
512
434c4c77
DJ
5132004-12-08 Daniel Jacobowitz <dan@debian.org>
514
515 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
516 LIBS when finished.
517 * aclocal.m4: Regenerated.
518 * configure: Regenerated.
519
db1d3e1b
AS
5202004-11-21 Andreas Schwab <schwab@suse.de>
521
522 * linux-m68k-low.c (m68k_num_gregs): Define.
523 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
524 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
525 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
526 (m68k_breakpoint_at): New. Add to the_low_target.
527
528 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
529 srv_linux_thread_db to yes.
530
43360365
JB
5312004-10-20 Joel Brobecker <brobecker@gnat.com>
532
533 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
534 (ARCH_SET_FS): Likewise.
535 (ARCH_GET_FS): Likewise.
536 (ARCH_GET_GS): Likewise.
537
fd500816
DJ
5382004-10-16 Daniel Jacobowitz <dan@debian.org>
539
540 * linux-i386-low.c (ps_get_thread_area): New.
541 * linux-x86-64-low.c (ps_get_thread_area): New.
542 * linux-low.c: Include <sys/syscall.h>.
543 (linux_kill_one_process): Don't kill the first thread here.
544 (linux_kill): Kill the first thread here.
545 (kill_lwp): New function.
546 (send_sigstop, linux_send_signal): Use it.
547 * proc-service.c: Clean up #ifdefs.
548 (fpregset_info): Delete.
549 (ps_lgetregs): Update and enable implementation.
550 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
551 implementations.
552 * remote-utils.c (struct sym_cache, symbol_cache): New.
553 (input_interrupt): Print a clearer message.
554 (async_io_enabled): New variable.
555 (enable_async_io, disable_async_io): Use it. Update comments.
556 (look_up_one_symbol): Use the symbol cache.
557 * thread-db.c (thread_db_look_up_symbols): New function.
558 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
559
f6de3c42
DJ
5602004-10-16 Daniel Jacobowitz <dan@debian.org>
561
562 * configure.in: Test for -rdynamic.
563 * configure: Regenerated.
564 * Makefile (INTERNAL_LDFLAGS): New.
565 (gdbserver, gdbreplay): Use it.
566
2c0fc042
AC
5672004-09-02 Andrew Cagney <cagney@gnu.org>
568
569 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
570
075b3282
DJ
5712004-03-23 Daniel Jacobowitz <drow@mvista.com>
572
573 * linux-low.c (linux_wait): Clear all_processes list also.
574
fa6a77dc
DJ
5752004-03-12 Daniel Jacobowitz <drow@mvista.com>
576
577 * linux-low.c: Include <errno.h>. Remove extern declaration of
578 errno.
579
6d782a97
DJ
5802004-03-12 Daniel Jacobowitz <drow@mvista.com>
581
582 * gdbreplay.c, server.h, utils.c: Update copyright years.
583
3a7fb99b
DJ
5842004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
585
586 * server.c (main): Print child status or termination signal from
587 variable 'signal', not 'sig'.
588
c3e735a6
DJ
5892004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
590
591 * linux-low.c (linux_read_memory): Change return type to
592 int. Check for and return error from ptrace().
593 * target.c (read_inferior_memory): Change return type to int. Pass
594 back return status from the_target->read_memory().
595 * target.h (struct target_ops): Adapt *read_memory() prototype.
596 Update comment.
597 (read_inferior_memory): Adapt prototype.
598 * server.c (main): Return an error packet if
599 read_inferior_memory() returns an error.
600
a59d1c82
DJ
6012004-03-04 Daniel Jacobowitz <drow@mvista.com>
602
603 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
604 Unify with other clean targets.
605
dc3f8883
DJ
6062004-02-29 Daniel Jacobowitz <drow@mvista.com>
607
608 * server.c (handle_v_cont): Call set_desired_inferior.
609
89a208da
DJ
6102004-02-29 Daniel Jacobowitz <drow@mvista.com>
611
612 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
613
62ea82f5
DJ
6142004-02-29 Daniel Jacobowitz <drow@mvista.com>
615
616 * linux-low.c (linux_wait): Unblock async I/O.
617 (linux_resume): Block and enable async I/O.
618 * remote-utils.c (block_async_io, unblock_async_io): New functions.
619 * server.h (block_async_io, unblock_async_io): Add prototypes.
620
6910d122
DJ
6212004-02-29 Daniel Jacobowitz <drow@mvista.com>
622
623 * remote-utils.c (remote_open): Print a status notice after
624 opening a TCP port.
625 * server.c (attach_inferior): Print a status notice after
626 attaching.
627
6282004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
629
630 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
631
c89dc5d4
DJ
6322004-02-26 Daniel Jacobowitz <drow@mvista.com>
633
634 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
635 error packet.
636 * server.c, target.h: Update copyright years.
637
4b8dad4a
RM
6382004-02-25 Roland McGrath <roland@redhat.com>
639
640 * target.h (struct target_ops): New member `read_auxv'.
641 * server.c (handle_query): Handle qPart:auxv:read: query using that.
642 * linux-low.c (linux_read_auxv): New function.
643 (linux_target_ops): Initialize `read_auxv' member to that.
644
d7446758
JB
6452004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
646
647 Committed by Jim Blandy <jimb@redhat.com>.
648
649 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 650 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
651 instead of GPR_SIZE to distiguish s390 and s390x targets.
652
5544ad89
DJ
6532004-01-31 Daniel Jacobowitz <drow@mvista.com>
654
655 * linux-low.c: Update copyright year.
656 (check_removed_breakpoint): Clear pending_is_breakpoint.
657 (linux_set_resume_request, linux_queue_one_thread)
658 (resume_status_pending_p): New functions.
659 (linux_continue_one_thread): Use process->resume.
660 (linux_resume): Only resume threads if there are no pending events.
661 * linux-low.h (struct process_info): Add resume request
662 pointer.
663
2a68b70e
DJ
6642004-01-30 Daniel Jacobowitz <drow@mvista.com>
665
666 * regcache.c (new_register_cache): Clear the allocated register
667 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
668
64386c31
DJ
6692003-10-13 Daniel Jacobowitz <drow@mvista.com>
670
671 * linux-low.c (linux_resume): Take a struct thread_resume *
672 argument.
673 (linux_wait): Update call.
674 (resume_ptr): New static variable.
675 (linux_continue_one_thread): Renamed from
676 linux_continue_one_process. Use resume_ptr.
677 (linux_resume): Use linux_continue_one_thread.
678 * server.c (handle_v_cont, handle_v_requests): New functions.
679 (myresume): New function.
680 (main): Handle 'v' case.
681 * target.h (struct thread_resume): New type.
682 (struct target_ops): Change argument of "resume" to struct
683 thread_resume *.
684 (myresume): Delete macro.
685
c938e9b0
L
6862003-08-08 H.J. Lu <hongjiu.lu@intel.com>
687
688 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
689 (uninstall): Support DESTDIR.
690
7f313d07
BC
691Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
692
693 * configure.srv: Add xscale*linux copy of arm*linux entry.
694
3b2fc2ea
DJ
6952003-07-24 Daniel Jacobowitz <drow@mvista.com>
696
697 * linux-arm-low.c (arm_reinsert_addr): New function.
698 (the_low_target): Add arm_reinsert_addr.
699
1c0a559e
MK
7002003-07-08 Mark Kettenis <kettenis@gnu.org>
701
702 * mem-break.c: Remove whitespace at end of file.
703
43d5792c
DJ
7042003-06-28 Daniel Jacobowitz <drow@mvista.com>
705
706 * configure.in: Check whether we need to prototype strerror.
707 * server.h: Optionally prototype strerror.
708 * gdbreplay.c (perror_with_name): Use strerror.
709 * linux-low.c (linux_attach_lwp): Use strerror.
710 * utils.c (perror_with_name): Use strerror.
711 * config.in, configure: Regenerated.
712
c8a86edf
DJ
7132003-06-28 Daniel Jacobowitz <drow@mvista.com>
714
715 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
716 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
717
73d37363
DJ
7182003-06-20 Daniel Jacobowitz <drow@mvista.com>
719
720 * Makefile.in (SFILES): Update.
721 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
722 low-sun3.c: Remove files.
723
6ad8ae5c
DJ
7242003-06-17 Daniel Jacobowitz <drow@mvista.com>
725
726 * linux-low.c: Move comment to linux_thread_alive where it belonged.
727 (linux_detach_one_process, linux_detach): New functions.
728 (linux_target_ops): Add linux_detach.
729 * server.c (main): Handle 'D' packet.
730 * target.h (struct target_ops): Add "detach" member.
731 (detach_inferior): Define.
732
1581182a
MK
7332003-06-13 Mark Kettenis <kettenis@gnu.org>
734
735 From Kelley Cook <kelleycook@wideopenwest.com>:
736 * configure.srv: Accept i[34567]86 variants.
737
e5379b03
DJ
7382003-06-05 Daniel Jacobowitz <drow@mvista.com>
739
740 * linux-low.c (linux_wait_for_event): Correct comment typos.
741 (linux_resume_one_process): Call check_removed_breakpoint.
742 (linux_send_signal): New function.
743 (linux_target_ops): Add linux_send_signal.
744 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
745 of kill.
746 * target.h (struct target_ops): Add send_signal.
747
2ff29de4
JB
7482003-05-29 Jim Blandy <jimb@redhat.com>
749
750 * linux-low.c (usr_store_inferior_registers): Transfer buf in
751 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
752 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
753 away part of the register's value.
754
254787d4
DJ
7552003-03-26 Daniel Jacobowitz <drow@mvista.com>
756
757 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
758 (linux_wait_for_event, linux_init_signals): Likewise.
759
94e10508
DJ
7602003-03-17 Daniel Jacobowitz <drow@mvista.com>
761
762 * configure.in: Check for stdlib.h.
763 * configure: Regenerated.
764 * config.in: Regenerated.
765
4c0711e0
DJ
7662003-01-04 Andreas Schwab <schwab@suse.de>
767
768 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
769
ef66e766
AC
7702003-01-02 Andrew Cagney <ac131313@redhat.com>
771
772 * Makefile.in: Remove obsolete code.
773
a1358604
DJ
7742002-11-20 Daniel Jacobowitz <drow@mvista.com>
775
776 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
777 defined(PT_FPR0_HI).
778
23ce3b1c
DJ
7792002-11-17 Stuart Hughes <seh@zee2.com>
780
781 * linux-arm-low.c (arm_num_regs): Increase.
782 (arm_regmap): Include status register.
783
7842002-11-17 Daniel Jacobowitz <drow@mvista.com>
785
786 * linux-low.c (register_addr): Remove incorrect -1 check.
787
a9fa9f7d
DJ
7882002-08-29 Daniel Jacobowitz <drow@mvista.com>
789
790 * linux-low.c (linux_create_inferior): Call setpgid. Return
791 the new PID.
792 (unstopped_p, linux_signal_pid): Remove.
793 (linux_target_ops): Remove linux_signal_pid.
794 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
795 global instead of target method.
796 * target.h (struct target_ops): Remove signal_pid. Update comment
797 for create_inferior.
798 * server.c (signal_pid): New variable.
799 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 800 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
801 (attach_inferior): Set signal_pid.
802
17574093
DJ
8032002-08-23 Daniel Jacobowitz <drow@mvista.com>
804
805 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
806
8072002-08-20 Jim Blandy <jimb@redhat.com>
808
809 * Makefile.in (LDFLAGS): Allow the configure script to establish a
810 default for this.
811
8122002-08-01 Andrew Cagney <cagney@redhat.com>
813
814 * Makefile.in: Make chill references obsolete.
815
8162002-07-24 Kevin Buettner <kevinb@redhat.com>
817
818 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
819 * configure: Regenerate.
820 * config.in: Regenerate.
821
8222002-07-09 David O'Brien <obrien@FreeBSD.org>
823
824 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
825 (perror_with_name, remote_close, remote_open, expect, play): Static.
826
8272002-07-04 Michal Ludvig <mludvig@suse.cz>
828
4b8dad4a 829 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
830 byte offsets instead of an array of indexes.
831 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
832
8332002-06-13 Daniel Jacobowitz <drow@mvista.com>
834
835 * regcache.c: Add comment.
836
8372002-06-11 Daniel Jacobowitz <drow@mvista.com>
838
839 * thread-db.c: New file.
840 * proc-service.c: New file.
841 * acinclude.m4: New file.
842 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
843 proc-service.o, and thread-db.o.
844 (linux-low.o): Add USE_THREAD_DB.
845 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
846 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
847 * aclocal.m4: Regenerated.
848 * config.in: Regenerated.
849 * configure: Regenerated.
850 * configure.in: Check for proc_service.h, sys/procfs.h,
851 thread_db.h, and linux/elf.h headrs.
852 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
853 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
854 Check for -lthread_db and thread support.
855 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
856 PowerPC, and SuperH.
857 * i387-fp.c: Constify arguments.
858 * i387-fp.h: Likewise.
859 * inferiors.c: (struct thread_info): Renamed from
860 `struct inferior_info'. Remove PID member. Use generic inferior
861 list header. All uses updated.
862 (inferiors, signal_pid): Removed.
863 (all_threads): New variable.
864 (get_thread): Define.
865 (add_inferior_to_list): New function.
866 (for_each_inferior): New function.
867 (change_inferior_id): New function.
868 (add_inferior): Removed.
869 (remove_inferior): New function.
870 (add_thread): New function.
871 (free_one_thread): New function.
872 (remove_thread): New function.
873 (clear_inferiors): Use for_each_inferior and free_one_thread.
874 (find_inferior): New function.
875 (find_inferior_id): New function.
876 (inferior_target_data): Update argument type.
877 (set_inferior_target_data): Likewise.
878 (inferior_regcache_data): Likewise.
879 (set_inferior_regcache_data): Likewise.
880 * linux-low.c (linux_bp_reinsert): Remove.
881 (all_processes, stopping_threads, using_thrads)
882 (struct pending_signals, debug_threads, pid_of): New.
883 (inferior_pid): Replace with macro.
884 (struct inferior_linux_data): Remove.
885 (get_stop_pc, add_process): New functions.
886 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
887 Use add_process and add_thread.
888 (linux_attach_lwp): New function, based on old linux_attach. Use
889 add_process and add_thread. Set stop_expected for new threads.
890 (linux_attach): New function.
891 (linux_kill_one_process): New function.
892 (linux_kill): Kill all LWPs.
893 (linux_thread_alive): Use find_inferior_id.
894 (check_removed_breakpoints, status_pending_p): New functions.
895 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
896 Update. Use WNOHANG. Wait for cloned processes also. Update process
897 struct for the found process.
898 (linux_wait_for_event): New function.
899 (linux_wait): Use it. Support LWPs.
900 (send_sigstop, wait_for_sigstop, stop_all_processes)
901 (linux_resume_one_process, linux_continue_one_process): New functions.
902 (linux_resume): Support LWPs.
903 (REGISTER_RAW_SIZE): Remove.
904 (fetch_register): Use register_size instead. Call supply_register.
905 (usr_store_inferior_registers): Likewise. Call collect_register.
906 Fix recursive case.
907 (regsets_fetch_inferior_registers): Improve error message.
908 (regsets_store_inferior_registers): Add debugging.
909 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
910 (unstopped_p, linux_signal_pid): New functions.
911 (linux_target_ops): Add linux_signal_pid.
912 (linux_init_signals): New function.
913 (initialize_low): Call it. Initialize using_threads.
914 * regcache.c (inferior_regcache_data): Add valid
915 flag.
916 (get_regcache): Fetch registers lazily. Add fetch argument
917 and update all callers.
918 (regcache_invalidate_one, regcache_invalidate): New
919 functions.
920 (new_register_cache): Renamed from create_register_cache.
921 Return the new regcache.
922 (free_register_cache): Change argument to a void *.
923 (registers_to_string, registers_from_string): Call get_regcache
924 with fetch flag set.
925 (register_data): Make static. Pass fetch flag to get_regcache.
926 (supply_register): Call get_regcache with fetch flag clear.
927 (collect_register): Call get_regcache with fetch flag set.
928 (collect_register_as_string): New function.
929 * regcache.h: Update.
930 * remote-utils.c (putpkt): Flush after debug output and use
931 stderr.
932 Handle input interrupts while waiting for an ACK.
933 (input_interrupt): Use signal_pid method.
934 (getpkt): Flush after debug output and use stderr.
935 (outreg): Use collect_register_as_string.
936 (new_thread_notify, dead_thread_notify): New functions.
937 (prepare_resume_reply): Check using_threads. Set thread_from_wait
938 and general_thread.
939 (look_up_one_symbol): Flush after debug output.
940 * server.c (step_thread, server_waiting): New variables.
941 (start_inferior): Don't use signal_pid. Update call to mywait.
942 (attach_inferior): Update call to mywait.
943 (handle_query): Handle qfThreadInfo and qsThreadInfo.
944 (main): Don't fetch/store registers explicitly. Use
945 set_desired_inferior. Support proposed ``Hs'' packet. Update
946 calls to mywait.
947 * server.h: Update.
948 (struct inferior_list, struct_inferior_list_entry): New.
949 * target.c (set_desired_inferior): New.
950 (write_inferior_memory): Constify.
951 (mywait): New function.
952 * target.h: Update.
953 (struct target_ops): New signal_pid method.
954 (mywait): Removed macro, added prototype.
955
956 * linux-low.h (regset_func): Removed.
957 (regset_fill_func, regset_store_func): New.
958 (enum regset_type): New.
959 (struct regset_info): Add type field. Use new operation types.
960 (struct linux_target_ops): stop_pc renamed to get_pc.
961 Add decr_pc_after_break and breakpoint_at.
962 (get_process, get_thread_proess, get_process_thread)
963 (strut process_info, all_processes, linux_attach_lwp)
964 (thread_db_init): New.
965
966 * linux-arm-low.c (arm_get_pc, arm_set_pc,
967 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
968 (the_low_target): Add new members.
969 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
970 (i386_store_fpxregset): Constify.
971 (target_regsets): Add new kind identifier.
972 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
973 (i386_set_pc): Add debugging.
974 (i386_breakpoint_at): New function.
975 (the_low_target): Add new members.
976 * linux-mips-low.c (mips_get_pc, mips_set_pc)
977 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
978 (mips_breakpoint_at): New.
979 (the_low_target): Add new members.
980 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
981 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
982 (the_low_target): Add new members.
983 * linux-sh-low.c (sh_get_pc, sh_set_pc)
984 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
985 (the_low_target): Add new members.
986 * linux-x86-64-low.c (target_regsets): Add new kind
987 identifier.
988
9892002-05-15 Daniel Jacobowitz <drow@mvista.com>
990
991 From Martin Pool <mbp@samba.org>:
992 * server.c (gdbserver_usage): New function.
993 (main): Call it.
994
9952002-05-14 Daniel Jacobowitz <drow@mvista.com>
996
997 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
998 stop_at -> stop_pc.
999
10002002-05-04 Andrew Cagney <ac131313@redhat.com>
1001
1002 * Makefile.in: Remove obsolete code.
1003
10042002-04-24 Michal Ludvig <mludvig@suse.cz>
1005
1006 * linux-low.c (regsets_fetch_inferior_registers),
1007 (regsets_store_inferior_registers): Removed cast to int from
1008 ptrace() calls.
1009 * regcache.h: Added declaration of struct inferior_info.
1010
10112002-04-20 Daniel Jacobowitz <drow@mvista.com>
1012
1013 * inferiors.c (struct inferior_info): Add regcache_data.
1014 (add_inferior): Call create_register_cache.
1015 (clear_inferiors): Call free_register_cache.
1016 (inferior_regcache_data, set_inferior_regcache_data): New functions.
1017 * regcache.c (struct inferior_regcache_data): New.
1018 (registers): Remove.
1019 (get_regcache): New function.
1020 (create_register_cache, free_register_cache): New functions.
1021 (set_register_cache): Don't initialize the register cache here.
1022 (registers_to_string, registers_from_string, register_data): Call
1023 get_regcache.
1024 * regcache.h: Add prototypes.
1025 * server.h: Likewise.
1026
10272002-04-20 Daniel Jacobowitz <drow@mvista.com>
1028
1029 * mem-break.c: New file.
1030 * mem-break.h: New file.
1031 * Makefile.in: Add mem-break.o rule; update server.h
1032 dependencies.
1033 * inferiors.c (struct inferior_info): Add target_data
1034 member.
1035 (clear_inferiors): Free target_data member if set.
1036 (inferior_target_data, set_inferior_target_data): New functions.
1037 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
1038 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
1039 * linux-low.c (linux_bp_reinsert): New variable.
1040 (struct inferior_linux_data): New.
1041 (linux_create_inferior): Use set_inferior_target_data.
1042 (linux_attach): Likewise. Call add_inferior.
1043 (linux_wait_for_one_inferior): New function.
1044 (linux_wait): Call it.
1045 (linux_write_memory): Add const.
1046 (initialize_low): Call set_breakpoint_data.
1047 * linux-low.h (struct linux_target_ops): Add breakpoint
1048 handling members.
1049 * server.c (attach_inferior): Remove extra add_inferior
1050 call.
1051 * server.h: Include mem-break.h. Update inferior.c
1052 prototypes.
1053 * target.c (read_inferior_memory)
1054 (write_inferior_memory): New functions.
1055 * target.h (read_inferior_memory)
1056 (write_inferior_memory): Change macros to prototypes.
1057 (struct target_ops): Update comments. Add const to write_memory
1058 definition.
1059
10602002-04-11 Daniel Jacobowitz <drow@mvista.com>
1061
1062 * linux-low.c (usr_store_inferior_registers): Support
1063 registers which are allowed to fail to store.
1064 * linux-low.h (linux_target_ops): Likewise.
1065 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
1066 (ppc_cannot_store_register): FPSCR may not be storable.
1067
10682002-04-09 Daniel Jacobowitz <drow@mvista.com>
1069
1070 * server.h: Include <string.h> if HAVE_STRING_H.
1071 * ChangeLog: Correct paths in last ChangeLog entry.
1072
10732002-04-09 Daniel Jacobowitz <drow@mvista.com>
1074
1075 * linux-low.h: Remove obsolete prototypes.
1076 (struct linux_target_ops): New.
1077 (extern the_low_target): New.
1078 * linux-low.c (num_regs, regmap): Remove declarations.
1079 (register_addr): Use the_low_target explicitly.
1080 (fetch_register): Likewise.
1081 (usr_fetch_inferior_registers): Likewise.
1082 (usr_store_inferior_registers): Likewise.
1083 * linux-arm-low.c (num_regs): Remove.
1084 (arm_num_regs): Define.
1085 (arm_regmap): Renamed from regmap, made static.
1086 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
1087 made static.
1088 (arm_cannot_store_register): Renamed from cannot_store_register,
1089 made static.
1090 (the_low_target): New.
1091 * linux-i386-low.c (num_regs): Remove.
1092 (i386_num_regs): Define.
1093 (i386_regmap): Renamed from regmap, made static.
1094 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
1095 made static.
1096 (i386_cannot_store_register): Renamed from cannot_store_register,
1097 made static.
1098 (the_low_target): New.
1099 * linux-ia64-low.c (num_regs): Remove.
1100 (ia64_num_regs): Define.
1101 (ia64_regmap): Renamed from regmap, made static.
1102 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
1103 made static.
1104 (ia64_cannot_store_register): Renamed from cannot_store_register,
1105 made static.
1106 (the_low_target): New.
1107 * linux-m68k-low.c (num_regs): Remove.
1108 (m68k_num_regs): Define.
1109 (m68k_regmap): Renamed from regmap, made static.
1110 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
1111 made static.
1112 (m68k_cannot_store_register): Renamed from cannot_store_register,
1113 made static.
1114 (the_low_target): New.
1115 * linux-mips-low.c (num_regs): Remove.
1116 (mips_num_regs): Define.
1117 (mips_regmap): Renamed from regmap, made static.
1118 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
1119 made static.
1120 (mips_cannot_store_register): Renamed from cannot_store_register,
1121 made static.
1122 (the_low_target): New.
1123 * linux-ppc-low.c (num_regs): Remove.
1124 (ppc_num_regs): Define.
1125 (ppc_regmap): Renamed from regmap, made static.
1126 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
1127 made static.
1128 (ppc_cannot_store_register): Renamed from cannot_store_register,
1129 made static.
1130 (the_low_target): New.
1131 * linux-s390-low.c (num_regs): Remove.
1132 (s390_num_regs): Define.
1133 (s390_regmap): Renamed from regmap, made static.
1134 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
1135 made static.
1136 (s390_cannot_store_register): Renamed from cannot_store_register,
1137 made static.
1138 (the_low_target): New.
1139 * linux-sh-low.c (num_regs): Remove.
1140 (sh_num_regs): Define.
1141 (sh_regmap): Renamed from regmap, made static.
1142 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
1143 made static.
1144 (sh_cannot_store_register): Renamed from cannot_store_register,
1145 made static.
1146 (the_low_target): New.
1147 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
1148 (the_low_target): New.
1149
11502002-04-09 Daniel Jacobowitz <drow@mvista.com>
1151
1152 * Makefile.in: Add stamp-h target.
1153 * configure.in: Create stamp-h.
1154 * configure: Regenerated.
1155
11562002-04-09 Daniel Jacobowitz <drow@mvista.com>
1157
1158 * inferiors.c: New file.
1159 * target.c: New file.
1160 * target.h: New file.
1161 * Makefile.in: Add target.o and inferiors.o. Update
1162 dependencies.
1163 * linux-low.c (inferior_pid): New static variable,
1164 moved from server.c.
1165 (linux_create_inferior): Renamed from create_inferior.
1166 Call add_inferior. Return 0 on success instead of a PID.
1167 (linux_attach): Renamed from myattach.
1168 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
1169 (linux_thread_alive): Renamed from mythread_alive.
1170 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
1171 child dies.
1172 (linux_resume): Renamed from myresume. Add missing ``return 0''.
1173 (regsets_store_inferior_registers): Correct error message.
1174 Add missing ``return 0''.
1175 (linux_fetch_registers): Renamed from fetch_inferior_registers.
1176 (linux_store_registers): Renamed from store_inferior_registers.
1177 (linux_read_memory): Renamed from read_inferior_memory.
1178 (linux_write_memory): Renamed from write_inferior_memory.
1179 (linux_target_ops): New structure.
1180 (initialize_low): Call set_target_ops ().
1181 * remote-utils.c (unhexify): New function.
1182 (hexify): New function.
1183 (input_interrupt): Send signals to ``signal_pid''.
1184 * server.c (inferior_pid): Remove.
1185 (start_inferior): Update create_inferior call.
1186 (attach_inferior): Call add_inferior.
1187 (handle_query): New function.
1188 (main): Call handle_query for `q' packets.
1189 * server.h: Include "target.h". Remove obsolete prototypes.
1190 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
1191
11922002-04-09 Daniel Jacobowitz <drow@mvista.com>
1193
1194 * Makefile.in: Add WARN_CFLAGS. Update configury
1195 dependencies.
1196 * configure.in: Check for <string.h>
1197 * configure: Regenerate.
1198 * config.in: Regenerate.
1199 * gdbreplay.c: Include needed system headers.
1200 (remote_open): Remove strchr prototype.
1201 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
1202 * regcache.c (supply_register): Change buf argument to const void *.
1203 (supply_register_by_name): Likewise.
1204 (collect_register): Change buf argument to void *.
1205 (collect_register_by_name): Likewise.
1206 * regcache.h: Add missing prototypes.
1207 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
1208 * server.c (handle_query): New function.
1209 (attached): New static variable, moved out of main.
1210 (main): Quiet longjmp clobber warnings.
1211 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
1212 * utils.c (error): Remove NORETURN.
1213 (fatal): Likewise.