]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
* Makefile.in (linuw_low_h): Move higher.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
67cc2626
PA
12009-03-22 Pedro Alves <pedro@codesourcery.com>
2
3 * Makefile.in (linuw_low_h): Move higher.
4 (thread-db.o): Depend on $(linux_low_h).
5
54a0b537
PA
62009-03-17 Pedro Alves <pedro@codesourcery.com>
7
8 Rename "process" to "lwp" throughout.
9
10 * linux-low.c (all_processes): Rename to...
11 (all_lwps): ... this.
12 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13 (add_process): Rename to ...
14 (add_lwp): ... this. Adjust.
15 (linux_create_inferior): Adjust.
16 (linux_attach_lwp): Adjust.
17 (linux_attach): Adjust.
18 (linux_kill_one_process): Rename to ...
19 (linux_kill_one_lwp): ... this. Adjust.
20 (linux_kill): Adjust.
21 (linux_detach_one_process): Rename to ...
22 (linux_detach_one_lwp): ... this. Adjust.
23 (linux_detach): Adjust.
24 (check_removed_breakpoint): Adjust.
25 (status_pending_p): Adjust.
26 (linux_wait_for_process): Rename to ...
27 (linux_wait_for_lwp): ... this. Adjust.
28 (linux_wait_for_event): Adjust.
29 (send_sigstop): Adjust.
30 (wait_for_sigstop): Adjust.
31 (stop_all_processes): Rename to ...
32 (stop_all_lwps): ... this.
33 (linux_resume_one_process): Rename to ...
34 (linux_resume_one_lwp): ... this. Adjust.
35 (linux_set_resume_request, linux_continue_one_thread)
36 (linux_queue_one_thread, resume_status_pending_p)
37 (usr_store_inferior_registers, regsets_store_inferior_registers)
38 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
39 Adjust.
40 * linux-low.h (get_process): Rename to ...
41 (get_lwp): ... this. Adjust.
42 (get_thread_process): Rename to ...
43 (get_thread_lwp): ... this. Adjust.
44 (get_process_thread): Rename to ...
45 (get_lwp_thread): ... this. Adjust.
46 (struct process_info): Rename to ...
47 (struct lwp_info): ... this.
48 (all_processes): Rename to ...
49 (all_lwps): ... this.
50 * proc-service.c (ps_lgetregs): Adjust.
51 * thread-db.c (thread_db_create_event, find_one_thread)
52 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
53
0b16c5cf
PA
542009-03-14 Pedro Alves <pedro@codesourcery.com>
55
56 * server.c (handle_query): Handle "qAttached".
57
32de4b9d
NS
582009-03-13 Nathan Sidwell <nathan@codesourcery.com>
59
60 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
61 GPLv3, update license URL.
62
2aecd87f
DE
632009-03-01 Doug Evans <dje@google.com>
64
93efd302 65 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
66 (server_h): Add gdb_signals.h.
67 (signals.o): Update.
68 * server.h (target_signal_from_host,target_signal_to_host_p)
69 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
70
86b1f9c5
PM
712009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
72
73 * remote-utils.c (getpkt): Also generate remote-debug
74 information if noack_mode is set.
75
4aa995e1
PA
762009-02-06 Pedro Alves <pedro@codesourcery.com>
77
78 * server.c (handle_query): Report qXfer:siginfo:read and
79 qXfer:siginfo:write as supported and handle them.
80 * target.h (struct target_ops) <qxfer_siginfo>: New field.
81 * linux-low.c (linux_xfer_siginfo): New.
82 (linux_target_ops): Set it.
83
62709adf
PA
842009-01-26 Pedro Alves <pedro@codesourcery.com>
85
86 * server.c (gdbserver_usage): Mention --remote-debug.
87 (main): Accept '--remote-debug' switch.
88
aef93bd7
DE
892009-01-18 Doug Evans <dje@google.com>
90
91 * regcache.c (new_register_cache): No need to check result of xcalloc.
92 * server.c (handle_search_memory): Back out calls to xmalloc,
93 result is checked and error is returned to user upon failure.
94 (handle_query): Ditto. Add more checks for result of malloc.
95 (handle_v_cont): Check result of malloc, report error back to
96 user upon failure.
97 (handle_v_run): Ditto. Call freeargv.
98 * server.h (freeargv): Declare.
99 * utils.c (freeargv): New fn.
100
54363045
DE
1012009-01-15 Doug Evans <dje@google.com>
102
f626972c
DE
103 * gdbreplay.c (perror_with_name): Make arg const char *.
104 * server.h (target_signal_to_name): Make return type const char *.
0842e787 105 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 106 * utils.c (perror_with_name): Make arg const char *.
54363045 107
18aae699
PA
1082009-01-14 Pedro Alves <pedro@codesourcery.com>
109
110 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
111 when handling a EXIT_PROCESS_DEBUG_EVENT.
112
ff703abe
JB
1132009-01-06 Joel Brobecker <brobecker@adacore.com>
114
115 * gdbreplay.c (gdbreplay_version): Update copyright year.
116 * server.c (gdbserver_version): Likewise.
117
f21cc1a2 1182009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
119
120 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 121 (handle_extended_wait): Improve comment.
0e21c1ec 122
bca929d3
DE
1232008-12-13 Doug Evans <dje@google.com>
124
125 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
126 * server.h (ATTR_MALLOC): New macro.
127 (xmalloc,xcalloc,xstrdup): Declare.
128 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
129 * inferiors.c: Ditto.
130 * linux-low.c: Ditto.
131 * mem-break.c: Ditto.
132 * regcache.c: Ditto.
133 * remote-utils.c: Ditto.
134 * server.c: Ditto.
135 * target.c: Ditto.
136 * win32-low.c: Ditto.
137
97438e3f
DE
1382008-12-12 Doug Evans <dje@google.com>
139
896c7fbb
DE
140 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
141 in debugging printf.
142
97438e3f
DE
143 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
144
e3b886f8
DE
1452008-12-09 Doug Evans <dje@google.com>
146
147 * linux-low.h (struct process_info): Delete member tid, unused.
148 * thread-db.c (find_one_thread): Update.
149 (maybe_attach_thread): Update.
150
07e059b5
VP
1512008-12-02 Pedro Alves <pedro@codesourcery.com>
152
153 * target.h (struct target_ops): Add qxfer_osdata member.
154 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
155 and dirent.h.
156 (linux_qxfer_osdata): New functions.
157 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
158 callback.
159 * server.c (handle_query): Handle "qXfer:osdata:read:".
160 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
161 (buffer_xml_printf): New functions.
162 * server.h (struct buffer): New.
163 (buffer_grow_str, buffer_grow_str0): New macros.
164 (buffer_grow, buffer_free, buffer_init, buffer_finish)
165 (buffer_xml_printf): Declare.
166
4cab47ab
DE
1672008-11-24 Doug Evans <dje@google.com>
168
169 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
170
f142445f
DJ
1712008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
172
173 * server.c (handle_v_run): Always use the supplied argument list.
174
d0107bb6
BW
1752008-11-19 Bob Wilson <bob.wilson@acm.org>
176
177 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
178 (xtensa_regmap_table): Add entry for scompare1.
179
2c4ad781
TJB
1802008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
181
182 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
183 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
184 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
185 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
186 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
187 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
188 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
189 XML target descriptions.
190 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
191 when inferior is running on an ISA 2.05 or later processor. Add
192 special case to return offset for full 64-bit slot of FPSCR when
193 in 32-bits.
194
dfb64f85
DJ
1952008-11-14 Daniel Gutson <dgutson@codesourcery.com>
196
197 * Makefile.in (SFILES, clean): Added sparc64 files.
198 (reg-sparc64.o, reg-sparc64.c): New.
199 * configure.srv (sparc*-*-linux*): New configuration.
200 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
201 syscall arguments for SPARC.
202 (regsets_store_inferior_registers): Likewise.
203 * linux-sparc-low.c: New file.
204
66b6e1dd
DE
2052008-10-21 Doug Evans <dje@google.com>
206
207 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
208 (READLINE_DIR,READLINE_DEP): Delete.
209 (INTERNAL_CFLAGS): Update.
210 (LINTFLAGS): Update.
211
9b710a42
PA
2122008-10-10 Pedro Alves <pedro@codesourcery.com>
213
214 * server.c (handle_v_run): If GDB didn't specify an argv, use the
215 whole argv from the last run, not just argv[0].
216
5822d809
PA
2172008-09-08 Pedro Alves <pedro@codesourcery.com>
218
219 * regcache.c (new_register_cache): Return NULL if the register
220 cache size isn't known yet.
221 (free_register_cache): Avoid dereferencing a NULL regcache.
222
74aac56f
DJ
2232008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
224
225 * configure.srv: Merge MIPS and MIPS64.
226
400b20f5
MR
2272008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
228
229 * Makefile.in (uninstall): Apply $(EXEEXT) too.
230
677c5bb1
LM
2312008-08-18 Luis Machado <luisgpm@br.ibm.com>
232
233 * Makefile.in: Add required vsx dependencies.
234
235 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
236 Declare init_registers_powerpc_vsx32l.
237 Declare init_registers_powerpc_vsx64l.
238 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
239 (ppc_arch_setup): Check for VSX in hwcap.
240 (ppc_fill_vsxregset): New function.
241 (ppc_store_vsxregset): New function.
242 Add new VSX entry in regset_info target_regsets.
243
244 * configure.srv: Add new VSX dependencies.
245
a6f3e723
SL
2462008-08-12 Pedro Alves <pedro@codesourcery.com>
247
248 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
249 (remote_open): Set or clear transport_is_reliable.
250 (putpkt_binary): Don't expect acks in noack mode.
251 (getpkt): Don't send ack/nac in noack mode.
252 * server.c (handle_general_set): Handle QStartNoAckMode.
253 (handle_query): If connected by tcp pass QStartNoAckMode+ in
254 qSupported.
255 (main): Reset noack_mode on every connection.
256 * server.h (noack_mode): Declare.
257
a417dc56
RW
2582008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
259
260 * Makefile.in (GDBREPLAY_OBS): New variable.
261 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
262
3221518c
UW
2632008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
264 Daniel Jacobowitz <dan@codesourcery.com>
265
266 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
267 (usr_store_inferior_registers): Likewise.
268 (regsets_store_inferior_registers): Likewise.
269
ec56be1b
PA
2702008-07-31 Rolf Jansen <rj@surtec.com>
271 Pedro Alves <pedro@codesourcery.com>
272
273 * configure.ac: Check for memmem declaration.
274 * server.c [HAVE_MALLOC_H]: Include malloc.h.
275 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
276 (disable_packet_qfThreadInfo): Unconditionally compile.
277 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
278 * configure, config.in: Regenerate.
279
2fe5e3ff
DE
2802008-07-28 Doug Kwan <dougkwan@google.com>
281
282 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
283 (linux_write_memory): Remove declaration of errno.
284
836acd6d
UW
2852008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
286
287 * linux-low.c (handle_extended_wait): Do not use "status"
288 variable uninitialized.
289
aeba519e
PA
2902008-07-07 Pedro Alves <pedro@codesourcery.com>
291
292 * server.c (handle_v_attach): Inhibit reporting dll changes.
293
db42f210
PA
2942008-06-27 Pedro Alves <pedro@codesourcery.com>
295
296 * remote-utils.c (prepare_resume_reply): If requested, don't
297 output "thread:TID" in the T stop reply.
298
299 * server.c (disable_packet_vCont, disable_packet_Tthread)
300 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
301 (handle_query): If requested, disable support for qC, qfThreadInfo
302 and qsThreadInfo.
303 (handle_v_requests): If requested, disable support for vCont.
304 (gdbserver_show_disableable): New.
305 (main): Handle --disable-packet and --disable-packet=LIST.
306
307 * server.h (disable_packet_vCont, disable_packet_Tthread)
308 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
309
8e4c5421
CD
3102008-06-20 Carlos O'Donell <carlos@codesourcery.com>
311
312 * server.c (gdbserver_usage): Mention --version.
313
6e23a804
DJ
3142008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
315
316 * Makefile.in (gdbreplay.o): New rule.
317
90aa6a40
JM
3182008-06-06 Joseph Myers <joseph@codesourcery.com>
319
320 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
321 message, not gdbserver.
322
c16158bc
JM
3232008-06-05 Vladimir Prus <vladimir@codesourcery.com>
324 Nathan Sidwell <nathan@codesourcery.com>
325 Joseph Myers <joseph@codesourcery.com>
326
327 * acinclude.m4: Include ../../config/acx.m4.
328 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
329 * configure, config.in: Regenerate.
330 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
331 * server.c (gdbserver_version): Print PKGVERSION.
332 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
333 (main): Adjust gdbserver_usage calls.
334 * gdbreplay.c (version, host_name): Add declarations.
335 (gdbreplay_version, gdbreplay_usage): New.
336 (main): Accept --version and --help options.
337
aeb75bf5
DJ
3382008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
339
340 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
341 (arm_breakpoint_at): Handle Thumb.
342 (the_low_target): Add comment.
343
76b233dd
UW
3442008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
345
346 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
347
08388c79
DE
3482008-05-09 Doug Evans <dje@google.com>
349
a3c83fae
DE
350 * server.h (decode_search_memory_packet): Declare.
351 * remote-utils.c (decode_search_memory_packet): New fn.
352 * server.c (handle_search_memory_1): New fn.
08388c79
DE
353 (handle_search_memory): New fn.
354 (handle_query): Process qSearch:memory packets.
355
bb9c3d36
UW
3562008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
357
358 * regcache.c (registers_length): Remove.
359 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
360 full register packet.
361 * regcache.h (registers_length): Remove prototype.
362 * server.h (PBUFSIZ): Define to 16384.
363
7284e1be
UW
3642008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
365
366 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
367 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
368 powerpc-64l.o, and powerpc-altivec64l.o.
369 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
370 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
371 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
372 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
373 rs6000/power-linux.xml, and rs6000/power64-linux.xml
374 to srv_xmlfiles.
375
376 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
377 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
378 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
379 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
380 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
381 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
382 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
383 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
384 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
385 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
386 (clean): Update.
387
388 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
389 (init_registers_powerpc_32l): ... this new prototype.
390 (init_registers_powerpc_32): Remove, replace by ...
391 (init_registers_powerpc_altivec32l): ... this new prototype.
392 (init_registers_powerpc_e500): Remove, replace by ...
393 (init_registers_powerpc_e500l): ... this new prototype.
394 (init_registers_ppc64): Remove, replace by ...
395 (init_registers_powerpc_64l): ... this new prototype.
396 (init_registers_powerpc_64): Remove, replace by ...
397 (init_registers_powerpc_altivec64l): ... this new prototype.
398 (ppc_num_regs): Set to 73.
399 (PT_ORIG_R3, PT_TRAP): Define if necessary.
400 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
401 (ppc_cannot_store_register): Handle orig_r3 and trap.
402 (ppc_arch_setup): Update init_registers_... calls.
403 (ppc_fill_gregset): Handle orig_r3 and trap.
404
405 * inferiors.c (clear_inferiors): Reset current_inferior.
406
fdc59709
PB
4072008-04-23 Paolo Bonzini <bonzini@gnu.org>
408
409 * acinclude.m4: Add override.m4.
410 * configure: Regenerate.
411
c9b2f845
UW
4122008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
413
414 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
415 initial call to init_register_ppc64.
416
550512b8
UW
4172008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
418
419 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
420 powerpc*-*-linux* case.
421 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
422
b6430ec3
UW
4232008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
424
425 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
426 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
427 from reg_xmlfiles.
428 * linux-ppc-low.c: Include <elf.h>.
429 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
430 (ppc_hwcap): New global variable.
431 (ppc_regmap): Remove __SPE__ #ifdef sections.
432 (ppc_regmap_e500): New global variable.
433 (ppc_cannot_store_register): Update __SPE__ special case.
434 (ppc_get_hwcap): New function.
435 (ppc_arch_setup): Use it to determine whether inferior supports
436 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
437 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
438 Do not access registers if target does not support AltiVec.
439 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
440 Do not access registers if target does not support SPE.
441 (target_regsets): Unconditionally include AltiVec and SPE regsets.
442
52fa2412
UW
4432008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
444
445 * linux-low.c (disabled_regsets, num_regsets): New.
446 (use_regsets_p): Delete.
447 (linux_wait_for_process): Clear disabled_regsets.
448 (regsets_fetch_inferior_registers): Check and set it.
449 (regsets_store_inferior_registers): Likewise.
450 (linux_fetch_registers, linux_store_registers): Do not use
451 use_regsets_p.
452 (initialize_low): Allocate disabled_regsets.
453
e28b3332
DJ
4542008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
455
456 * Makefile.in (LIBOBJS): New.
457 (OBS): Use LIBOBJS.
458 (memmem.o): New rule.
459 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
460 * configure: Regenerated.
461
4536995d
UW
4622008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
463
464 * server.c (handle_query): Never return "unsupported" for
465 qXfer:features:read queries.
466
221c031f
UW
4672008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
468
469 * server.c (get_features_xml): Fix inverted condition.
470 (handle_query): Always support qXfer:feature:read.
471
ccd213ac
DJ
4722008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
473
474 * server.c (wrapper_argv): New.
475 (start_inferior): Handle wrapper_argv. If set, expect an extra
476 trap.
477 (gdbserver_usage): Document --wrapper.
478 (main): Parse --wrapper.
479
6fe305f7
UW
4802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
481
482 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
483 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
484 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
485 (ppc_set_pc): Likewise.
486 (ppc_arch_setup): New function.
487 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
488 of collect_register.
489 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
490
5b0a002e
UW
4912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
492
493 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
494 instead of linux-ppc64-low.o.
495 * linux-ppc64-low.c: Remove file.
496 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
497 (linux-ppc64-low.o): Remove rule.
498
499 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
500 (init_registers_powerpc_64): Likewise.
501 (ppc_regmap): Conditionally define depending on __powerpc64__.
502 (ppc_cannot_store_register): Do not special-case "fpscr" when
503 compiled on __powerpc64__.
504 (ppc_collect_ptrace_register): New function.
505 (ppc_supply_ptrace_register): New function.
506 (ppc_breakpoint): Change type to "unsigned int".
507 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
508 (the_low_target): Conditionally provide initializers for the
509 arch_setup member depending on __powerpc64__. Install
510 collect_ptrace_register and supply_ptrace_register members.
511
9b4b61c8
UW
5122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
513
514 * regcache.h (gdbserver_xmltarget): Add extern declaration.
515 * server.c (gdbserver_xmltarget): Define.
516 (get_features_xml): Use it to replace "target.xml" and arch_string.
517
518 * configure.srv: Remove srv_xmltarget. Add XML files that were
519 mentioned there to srv_xmlfiles instead. Remove conditional tests
520 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
521 srv_xmlfiles and srv_regobj to include all possible choices.
522 * configure.ac (srv_xmltarget): Remove.
523 (srv_xmlfiles): Do not add "target.xml".
524 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
525 checks for supplementary target information.
526 * configure: Regenerate.
527 * Makefile.in (XML_TARGET): Remove.
528 (target.xml): Remove rule.
529 (clean): Do not clean up target.xml.
530 (.PRECIOUS): Do not mention target.xml.
531
532 * target.h (struct target_ops): Remove arch_string member.
533 * linux-low.c (linux_arch_string): Remove.
534 (linux_target_ops): Remove arch_string initializer.
535 * linux-low.h (struct linux_target_ops): Remove arch_string member.
536 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
537 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
538 * spu-low.c (spu_arch_string): Remove.
539 (spu_target_ops): Remove arch_string initializer.
540 * win32-low.c (win32_arch_string): Remove.
541 (win32_target_ops): Remove arch_string initializer.
542 * win32-low.h (struct win32_target_ops): Remove arch_string member.
543 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
544 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
545
ee1a7ae4
UW
5462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
547
548 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
549 by collect_ptrace_register and supply_ptrace_register hooks.
550 * linux-low.c (fetch_register): Use supply_ptrace_register callback
551 instead of checking for the_low_target.left_pad_xfer.
552 (usr_store_inferior_registers): Use collect_ptrace_register callback
553 instead of checking for the_low_target.left_pad_xfer.
554
555 * linux-s390-low.c (s390_collect_ptrace_register): New function.
556 (s390_supply_ptrace_register): Likewise.
557 (s390_fill_gregset): Call s390_collect_ptrace_register.
558 (the_low_target): Update.
559
560 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
561 (ppc_supply_ptrace_register): Likewise.
562 (the_low_target): Update.
563
564 * linux-i386-low.c (the_low_target): Update.
565 * linux-x86-64-low.c (the_low_target): Update.
566
d61ddec4
UW
5672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
568
569 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
570 reg-s390.o and reg-s390x.o.
571
572 * linux-low.c (new_inferior): New global variable.
573 (linux_create_inferior, linux_attach): Set it.
574 (linux_wait_for_process): Call the_low_target.arch_setup after the
575 target has stopped for the first time.
576 (initialize_low): Do not call the_low_target.arch_setup.
577
578 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
579 (s390_set_pc): Likewise.
580 (s390_arch_setup): New function.
581 (the_low_target): Use s390_arch_setup as arch_setup routine.
582
583 * regcache.c (realloc_register_cache): New function.
584 (set_register_cache): Call it for each existing regcache.
585
d05b4ac3
UW
5862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
587
588 * server.h (init_registers): Remove prototype.
589
590 * linux-low.h (struct linux_target_ops): Add arch_setup field.
591 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
592 instead of init_registers ().
593 * linux-arm-low.c (init_registers_arm): Add prototype.
594 (init_registers_arm_with_iwmmxt): Likewise.
595 (the_low_target): Add initializer for arch_setup field.
596 * linux-cris-low.c (init_registers_cris): Add prototype.
597 (the_low_target): Add initializer for arch_setup field.
598 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
599 (the_low_target): Add initializer for arch_setup field.
600 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
601 (the_low_target): Add initializer for arch_setup field.
602 * linux-ia64-low.c (init_registers_ia64): Add prototype.
603 (the_low_target): Add initializer for arch_setup field.
604 * linux-m32r-low.c (init_registers_m32r): Add prototype.
605 (the_low_target): Add initializer for arch_setup field.
606 * linux-m68k-low.c (init_registers_m68k): Add prototype.
607 (the_low_target): Add initializer for arch_setup field.
608 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
609 (init_registers_mips64_linux): Likewise.
610 (the_low_target): Add initializer for arch_setup field.
611 * linux-ppc-low.c (init_registers_ppc): Add prototype.
612 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
613 (the_low_target): Add initializer for arch_setup field.
614 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
615 (init_registers_powerpc_64): Likewise.
616 (the_low_target): Add initializer for arch_setup field.
617 * linux-s390-low.c (init_registers_s390): Add prototype.
618 (init_registers_s390x): Likewise.
619 (the_low_target): Add initializer for arch_setup field.
620 * linux-sh-low.c (init_registers_sh): Add prototype.
621 (the_low_target): Add initializer for arch_setup field.
622 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
623 (the_low_target): Add initializer for arch_setup field.
624 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
625 (the_low_target): Add initializer for arch_setup field.
626
627 * win32-low.h (struct win32_target_ops): Add arch_setup field.
628 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
629 instead of init_registers ().
630 * win32-arm-low.c (init_registers_arm): Add prototype.
631 (the_low_target): Add initializer for arch_setup field.
632 * win32-i386-low.c (init_registers_i386): Add prototype.
633 (the_low_target): Add initializer for arch_setup field.
634
635 * spu-low.c (init_registers_spu): Add prototype.
636 (initialize_low): Call initialie_registers_spu () instead of
637 initialize_registers ().
638
fd96d250
PA
6392008-02-19 Pedro Alves <pedro@codesourcery.com>
640
641 * server.c (handle_v_requests): When handling the vRun and vAttach
642 packets, if already debugging a process, don't kill it. Return an
643 error instead.
644
d41b6bb4
DJ
6452008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
646
647 * server.c (handle_query): Correct length check.
648
5ac588cf
PA
6492008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
650
651 * win32-low.c (do_initial_child_stuff): Add process handle
652 parameter. Set current_process_handle and current_process_id from the
653 parameters. Clear globals.
654 (win32_create_inferior): Don't set current_process_handle and
655 current_process_id here. Instead pass them on the call to
656 do_initial_child_stuff.
657 (win32_attach): Likewise.
658 (win32_clear_inferiors): New.
659 (win32_kill): Don't close the current process handle or the
660 current thread handle here. Instead call win32_clear_inferiors.
661 (win32_detach): Don't open a new handle to the process. Call
662 win32_clear_inferiors.
663 (win32_join): Don't rely on current_process_handle; open a new
664 handle using the process id.
665 (win32_wait): Call win32_clear_inferiors when the inferior process
666 has exited.
667
ecd7ecbc
DJ
6682008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
669
670 * server.c (monitor_show_help): Add "exit".
671
1525d545
MG
6722008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
673
ecd7ecbc 674 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
675 (clean): Add reg-xtensa.c.
676 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
677 * configure.srv (xtensa*-*-linux*) New target.
678 * linux-xtensa-low.c: New.
679 * xtensa-xtregs.c: New.
1525d545 680
59a016f0
PA
6812008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
682
683 * hostio.c: Don't include errno.h.
684 (errno_to_fileio_errno): Move to hostio-errno.
685 * hostio.c: (hostio_error): Remove the error parameter. Defer the
686 error number outputting to the target->hostio_last_error callback.
687 (hostio_packet_error): Use FILEIO_EINVAL directly.
688 (handle_open, handle_pread, hostio_error, handle_unlink): Update
689 calls to hostio_error.
690 * hostio-errno.c: New.
691 * server.h (hostio_last_error_from_errno): Declare.
692 * target.h (target_ops): Add hostio_last_error member.
693 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
694 as hostio_last_error handler.
695 * spu-low.c (spu_target_ops): Likewise.
696 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
697 (wince_hostio_last_error): New functions.
698 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
699 as hostio_last_error handler.
700 (win32_target_ops) [!_WIN32_WCE]: Register
701 hostio_last_error_from_errno as hostio_last_error handler.
702 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
703 (hostio-errno.o): New rule.
704 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
705 * configure.srv (srv_hostio_err_objs): New variable. Default to
706 hostio-errno.o.
707 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
708 * configure: Regenerate.
709
2d717e4f
DJ
7102008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
711
712 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
713 (linux_kill, linux_detach): Clean up the process list.
714 * remote-utils.c (remote_open): Improve port number parsing.
715 (putpkt_binary, input_interrupt): Only send interrupts if the target
716 is running.
717 * server.c (extended_protocol): Make static.
718 (attached): Define earlier.
719 (exit_requested, response_needed, program_argv): New variables.
720 (target_running): New.
721 (start_inferior): Clear attached here.
722 (attach_inferior): Set attached here.
723 (require_running): Define.
724 (handle_query): Use require_running and target_running. Implement
725 "monitor exit".
726 (handle_v_attach, handle_v_run): New.
727 (handle_v_requests): Use require_running. Handle vAttach and vRun.
728 (gdbserver_usage): Update.
729 (main): Redo argument parsing. Handle --debug and --multi. Handle
730 --attach along with other options or after the port. Save
731 program_argv. Support no initial program. Resynchronize
732 communication with GDB after an error. Handle "monitor exit".
733 Use require_running and target_running. Always allow the extended
734 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
735 restart in extended mode.
736 * README: Refer to the GDB manual. Update --attach usage.
737
7407e2de
AS
7382007-12-20 Andreas Schwab <schwab@suse.de>
739
740 * linux-low.c (STACK_SIZE): Define.
741 (linux_tracefork_child): Use it. Use __clone2 on ia64.
742 (linux_test_for_tracefork): Likewise.
743
b65d95c5
DJ
7442007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
745
746 * linux-low.c (linux_wait_for_event): Update messages. Do not
747 reinsert auto-delete breakpoints.
748 * mem-break.c (struct breakpoint): Change return type of handler to
749 int.
750 (set_breakpoint_at): Update handler type.
751 (reinsert_breakpoint_handler): Return 1 instead of calling
752 delete_breakpoint.
753 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
754 setting a new one.
755 (check_breakpoints): Delete auto-delete breakpoints and return 2.
756 * mem-break.h (set_breakpoint_at): Update handler type.
757 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
758 * win32-low.c (auto_delete_breakpoint): New.
759 (get_child_debug_event): Use it.
760
4e799345
DJ
7612007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
762
763 * configure.ac: Check for pread and pwrite.
764 * hostio.c (handle_pread): Fall back to lseek and read.
765 (handle_pwrite): Fall back to lseek and write.
766 * config.in, configure: Regenerated.
767
27524b67
DJ
7682007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
769
770 * server.c (myresume): Add own_buf argument.
771 (main): Update calls.
772
a20d5e98
DJ
7732007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
774
775 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
776 * remote-utils.c (remote_open): Do not call disable_async_io.
777 (block_async_io): Delete.
778 (unblock_async_io): Make static.
779 (initialize_async_io): New.
780 * server.c (handle_v_cont): Handle async I/O here.
781 (myresume): Likewise. Move other common resume tasks here...
782 (main): ... from here. Call initialize_async_io. Disable async
783 I/O before the main loop.
784 * server.h (initialize_async_io): Declare.
785 (block_async_io, unblock_async_io): Delete prototypes.
786 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
787
b79d787e
DJ
7882007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
789
790 * remote-utils.c (readchar): Allow binary data in received messages.
791
d97903b2
PA
7922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
793
794 * win32-low.c (attaching): New global.
795 (win32_create_inferior): Clear the `attaching' global.
796 (win32_attach): Set the `attaching' global.
797 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
798 attaching. Only set a breakpoint at the entry point if not
799 attaching.
800
311de423
PA
8012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
802
803 * server.c (main): Don't report dll events on the initial
804 connection on attaches.
805
6c2d16d2
PA
8062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
807
808 * server.c (main): Relax numerical bases supported for the pid of
809 the --attach command line argument.
810
5ca906e6
PA
8112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
812
813 * win32-low.c (win32_attach): Call OpenProcess before
814 DebugActiveProcess, not after. Add last error output to error
815 call.
816
9c6c8194
PA
8172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
818
819 * win32-low.c (win32_get_thread_context)
820 (win32_set_thread_context): New functions.
821 (thread_rec): Use win32_get_thread_context.
822 (continue_one_thread, win32_resume): Use win32_set_thread_context.
823 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
824 field.
825
4d5d1aaa
PA
8262007-12-03 Leo Zayas
827 Pedro Alves <pedro_alves@portugalmail.pt>
828
829 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
830 global variables.
831 (child_add_thread): Minor cleanup.
832 (child_continue): Resume artificially suspended threads before
833 calling ContinueDebugEvent.
834 (suspend_one_thread): New.
835 (fake_breakpoint_event): New.
836 (get_child_debug_event): Change return type to int. Check here if
837 gdb sent an interrupt request. If a soft interrupt was requested,
838 fake a breakpoint event. Return 0 if there is no event to handle,
839 and 1 otherwise.
840 (win32_wait): Don't check here if gdb sent an interrupt request.
841 Ensure there is a valid event to handle.
842 (win32_request_interrupt): Add soft interruption method as last
843 resort.
844
c436e841
PA
8452007-12-03 Leo Zayas
846 Pedro Alves <pedro_alves@portugalmail.pt>
847
848 * win32-low.h (win32_thread_info): Add descriptions to the
849 structure members. Replace `suspend_count' counter by a
850 `suspended' flag.
851 * win32-low.c (thread_rec): Update condition of when to get the
852 context from the inferior. Rely on ContextFlags being set if it
853 has already been retrieved. Only suspend the inferior thread if
854 we haven't already. Warn if that fails.
855 (continue_one_thread): s/suspend_count/suspended/. Only call
856 ResumeThread once. Warn if that fails.
857
e7b5fa67
PA
8582007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
859
860 * win32-low.c (win32_wait): Don't read from the inferior when it
861 has already exited.
862
a385171d
PA
8632007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
864
865 * Makefile.in (win32_low_h): New variable.
866 (win32-low.o): Add dependency on $(win32_low_h).
867 (win32-arm-low.o, win32-i386-low.o): New rules.
868
f80c84b3
DJ
8692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
870
871 * hostio.c: Correct copyright year.
872
a6b151f1
DJ
8732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
874
875 * Makefile.in (OBS): Add hostio.o.
876 (hostio.o): New rule.
877 * server.h (handle_vFile): Declare.
878 * hostio.c: New file.
879 * server.c (handle_v_requests): Take packet_len and new_packet_len
880 for binary packets. Call handle_vFile.
881 (main): Update call to handle_v_requests.
882
f9387fc3
DJ
8832007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
884
885 * linux-low.c: Include <sched.h>.
886
51c2684e
DJ
8872007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
888
889 * linux-low.c (linux_tracefork_grandchild): New.
890 (linux_tracefork_child): Use clone.
891 (linux_test_for_tracefork): Use clone; allocate and free a stack.
892
75f83163
JB
8932007-10-31 Joel Brobecker <brobecker@adacore.com>
894
895 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
896
da5898ce
DJ
8972007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
898
899 * linux-low.c (handle_extended_wait): Handle unexpected signals.
900
24a09b5f
DJ
9012007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
902
903 * inferiors.c (change_inferior_id): Delete.
904 (add_pid_to_list, pull_pid_from_list): New.
905 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
906 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
907 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
908 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
909 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
910 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
911 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
912 (using_threads): Always set to 1.
913 (handle_extended_wait): New.
914 (add_process): Do not set TID.
915 (linux_create_inferior): Set must_set_ptrace_flags.
916 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
917 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
918 (linux_thread_alive): Rename TID argument to LWPID.
919 (linux_wait_for_process): Handle unknown processes. Do not use TID.
920 (linux_wait_for_event): Do not use TID or check using_threads. Update
921 call to dead_thread_notify. Call handle_extended_wait.
922 (linux_create_inferior): Use PTRACE_SETOPTIONS.
923 (send_sigstop): Delete sigstop_sent.
924 (wait_for_sigstop): Avoid TID.
925 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
926 (linux_test_for_tracefork): New.
927 (linux_lookup_signals): Use thread_db_active and
928 linux_supports_tracefork_flag.
929 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
930 * linux-low.h (get_process_thread): Avoid TID.
931 (struct process_ifo): Move thread_known and tid to the end. Remove
932 sigstop_sent.
933 (linux_attach_lwp, thread_db_init): Update prototypes.
934 * server.h (change_inferior_id): Delete prototype.
935 (add_pid_to_list, pull_pid_from_list): New prototypes.
936 * thread-db.c (thread_db_use_events): New.
937 (find_first_thread): Rename to...
938 (find_one_thread): ...this. Update callers and messages. Do not
939 call fatal. Check thread_db_use_events. Do not call
940 change_inferior_id or new_thread_notify.
941 (maybe_attach_thread): Update. Do not call new_thread_notify.
942 (thread_db_init): Set thread_db_use_events. Check use_events.
943 * utils.c (fatal, warning): Correct message prefix.
944
30ed0a8f
DJ
9452007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
946
947 * Makefile.in (clean): Remove new files.
948 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
949 (powerpc-64.o, powerpc-64.c): New rules.
950 * configure.srv: Use alternate register sets for powerpc64-*-linux*
951 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
952 with SPE.
953 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
954 SPE targets.
955 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
956 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
957 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
958 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
959 (target_regsets): Add AltiVec and SPE register sets.
960 * configure.ac: Check for AltiVec and SPE.
961 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
962 (ppc_fill_vrregset, ppc_store_vrregset): New.
963 (target_regsets): Add AltiVec register set.
964 * configure: Regenerated.
965
fd462a61
DJ
9662007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
967
968 * linux-low.c (O_LARGEFILE): Define.
969 (linux_read_memory): Use /proc/PID/mem.
970 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
971 * configure, config.in: Regenerated.
972
69f223ed
DJ
9732007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
974
975 * linux-low.c (linux_wait_for_event): Do not pass signals while
976 single-stepping.
977
aec18585
PA
9782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
979
980 * win32-low.c (create_process): New.
981 (win32_create_inferior): Use create_process instead of
982 CreateProcess. If create_process failed retry appending an ".exe"
983 suffix. Store the GetLastError result immediatelly after
984 create_process calls and use it on the call to error.
985
34d86ddd
PA
9862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
987
988 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
989
5a0e3bd0
JB
9902007-08-23 Joel Brobecker <brobecker@adacore.com>
991
992 * configure.ac: Switch license to GPLv3.
993
f88c79e6
MS
9942007-08-01 Michael Snyder <msnyder@access-company.com>
995
996 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
997
6b3d9b83
PA
9982007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
999
1000 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1001 typedef.
1002 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1003 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1004 CloseToolhelp32Snapshot.
1005 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1006 CloseToolhelp32Snapshot.
1007
c588c53c
MS
10082007-07-27 Michael Snyder <michael.snyder@access-company.com>
1009
1010 * server.c (main): Check for inferior exit before main loop.
1011
aa0403d9
PA
10122007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1013
1014 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1015 instead of on tmp_desc.
1016
255e7678
DJ
10172007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1018 Daniel Jacobowitz <dan@codesourcery.com>
1019
1020 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1021 (add_thread): Minor cleanups.
1022 (clear_inferiors): Move lower in the file. Clear the DLL
1023 list.
1024 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1025 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1026 (xml_escape_text): New.
1027 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1028 for qSupported.
1029 (handle_v_cont): Report errors.
1030 (gdbserver_version): Update.
1031 (main): Correct size of own_buf. Do not report initial DLL events.
1032 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1033 (unloaded_dll, xml_escape_text): New.
1034 * win32-low.c (enum target_waitkind): Update comments.
1035 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1036 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1037 (win32_EnumProcessModules, win32_GetModuleInformation)
1038 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1039 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1040 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1041 (win32_Module32First, win32_Module32Next, load_toolhelp)
1042 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1043 (get_child_debug_event): Handle DLL events.
1044 (win32_wait): Likewise.
1045
0d37add9
DJ
10462007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1047
1048 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1049 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1050
45e2715e
PA
10512007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1052
1053 * win32-low.c (handle_output_debug_string): Ignore event if not
1054 waiting.
1055
c5674cf1
PA
10562007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1057
1058 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1059
2bbe3cc1
DJ
10602007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1061
1062 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1063
ae13219e
DJ
10642007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1065
1066 * inferiors.c (change_inferior_id): Add comment.
1067 * linux-low.c (check_removed_breakpoint): Add an early
1068 prototype. Improve debug output.
1069 (linux_attach): Doc update.
1070 (linux_detach_one_process, linux_detach): Clean up before releasing
1071 each process.
1072 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1073 * linux-low.h (struct process_info): Doc improvement.
1074 * mem-break.c (delete_all_breakpoints): New.
1075 * mem-break.h (delete_all_breakpoints): New prototype.
1076 * thread-db.c (find_first_thread): New.
1077 (thread_db_create_event): Call it instead of
1078 thread_db_find_new_threads. Clean up unused variables.
1079 (maybe_attach_thread): Remove first thread handling.
1080 (thread_db_find_new_threads): Use find_first_thread.
1081 (thread_db_get_tls_address): Likewise.
1082
4105de34
DJ
10832007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1084
1085 * thread-db.c (thread_db_find_new_threads): Add prototype.
1086 (thread_db_create_event): Check for the main thread before adding
1087 a new thread.
1088 (maybe_attach_thread): Only enable event reporting if TID == 0.
1089 (thread_db_get_tls_address): Check for new threads.
1090
2b876972
DJ
10912007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1092
1093 * linux-low.c (linux_create_inferior): Try execv before execvp.
1094 * spu-low.c (spu_create_inferior): Likewise.
1095
7a245884
DJ
10962007-06-13 Mike Frysinger <vapier@gentoo.org>
1097
1098 * linux-low.c (linux_create_inferior): Change execv to execvp.
1099 * spu-low.c (spu_create_inferior): Likewies.
1100
117ce543
DJ
11012007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1102
1103 * Makefile.in (clean): Clean new files instead of deleted ones.
1104 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1105 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1106 rules.
1107 * configure.srv: Specify XML files and new regformats for MIPS and
1108 MIPS64 GNU/Linux.
1109 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1110 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1111 an entry for the restart register.
1112 (mips_cannot_fetch_register, mips_cannot_store_register)
1113 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1114 register names to match the XML descriptions.
1115 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1116 restart register instead of $0.
1117
0e7f50da
UW
11182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1119 Markus Deuling <deuling@de.ibm.com>
1120
1121 * remote-utils.c (decode_xfer_write): New function.
1122 * server.h (decode_xfer_write): Add prototype.
1123 * server.c (handle_query): Add PACKET_LEN argument. Support
1124 qXfer:spu:read and qXfer:spu:write packets.
1125 (main): Pass packet_len to handle_query.
1126 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1127 * target.h (target_ops): Add qxfer_spu.
1128
374c1d38
UW
11292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1130
1131 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1132 accessing non-seekable spufs files.
1133
bb63802a
UW
11342007-05-16 Markus Deuling <deuling@de.ibm.com>
1135
1136 * server.c (handle_query): Add reply for qC packet.
1137
7390519e
PA
11382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1139 Leo Zayas <lerele@champenstudios@com>
1140
1141 * server.h (check_remote_input_interrupt_request): New function.
1142 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1143 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1144 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1145 (check_remote_input_interrupt_request): New function.
1146 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 1147 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
1148 winapi_GenerateConsoleCtrlEvent): New typedefs.
1149 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1150 to 250 ms.
1151 (win32_wait): Check for remote interrupt request
1152 with check_remote_input_interrupt_request.
1153 (win32_request_interrupt): New function.
1154 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1155
34b34921
PA
11562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1157
1158 * win32-low.c (debug_registers_changed,
1159 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1160 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1161 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1162 (thread_rec): Get context using the low target.
1163 (child_add_thread): Call thread_added on the low target,
1164 which does the same thing.
1165 (regptr): Delete.
1166 (do_initial_child_stuff): Remove debug registers references.
1167 Set context using the low target. Resume threads after
1168 setting the contexts.
1169 (child_continue): Remove dead variable. Remove debug
1170 registers references.
1171 (child_fetch_inferior_registers): Go through the low target.
1172 (do_child_store_inferior_registers): Remove.
1173 (child_store_inferior_registers): Go through the low target.
1174 (win32_resume): Remove debug registers references.
1175 Set context using the low target.
1176 (handle_exception): Change return type to void. Don't record
1177 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1178 first chance exception.
1179 (get_child_debug_event): Change return type to void. Remove
1180 goto loop. Always return after waiting for debug event.
1181 (win32_wait): Convert to switch statement. Handle spurious
1182 events.
1183
1184 * win32-i386-low.c (debug_registers_changed,
1185 debug_registers_used): New.
1186 (initial_stuff): Rename to ...
1187 (i386_initial_stuff): ... this. Clear debug registers
1188 state variables.
1189 (store_debug_registers): Delete.
1190 (i386_get_thread_context): New.
1191 (load_debug_registers): Delete.
1192 (i386_set_thread_context): New.
1193 (i386_thread_added): New.
1194 (single_step): Rename to ...
1195 (i386_single_step): ... this.
1196 (do_fetch_inferior_registers): Rename to ...
1197 (i386_fetch_inferior_register): ... this.
1198 (i386_store_inferior_register): New.
1199 (the_low_target): Adapt to new interface.
1200
1201 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1202 (arm_get_thread_context): New.
1203 (arm_set_thread_context): New.
1204 (regptr): New.
1205 (do_fetch_inferior_registers): Rename to ...
1206 (arm_fetch_inferior_register): ... this.
1207 (arm_store_inferior_register): New.
1208 (arm_wince_breakpoint): Reimplement as unsigned long.
1209 (arm_wince_breakpoint_len): Define.
1210 (the_low_target): Adapt to new interface.
1211
1212 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1213 load_debug_registers. Add get_thread_context, set_thread_context,
1214 thread_added and store_inferior_register. Rename
1215 fetch_inferior_registers to fetch_inferior_register.
1216 (regptr): Remove declaration.
1217
dd6953e1
PA
12182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1219
1220 * linux-low.c (linux_detach): Change return type to int. Return 0.
1221 * spu-low.c (spu_detach): Likewise.
1222
444d6139
PA
12232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1224
1225 * target.h (target_ops): Change return type of detach to int.
1226 Add join.
1227 (join_inferior): New.
1228 * server.c (main): Don't skip detach support on mingw32.
1229 If the inferior doesn't support detaching return error.
1230 Call join_inferior instead of using waitpid.
1231 * linux-low.c (linux_join): New.
1232 (linux_target_op): Add linux_join.
1233 * spu-low.c (spu_join): New.
1234 (spu_target_ops): Add spu_join.
1235 * win32-low.c (win32_detach): Adapt to new interface.
1236 Reopen current_process_handle before detaching. Issue a child
1237 resume before detaching.
1238 (win32_join): New.
1239 (win32_target_op): Add win32_join.
1240
1d5315fe
PA
12412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1242
1243 * win32-low.c (win32-attach): Fix return value.
1244 * target.h (target_ops): Describe ATTACH return values.
1245
bf914831
PA
12462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1247
1248 * win32-low.c (GETPROCADDRESS): Define.
1249 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1250 (winapi_DebugSetProcessKillOnExit): Likewise.
1251 (win32_create_inferior): Force usage of ansi CreateProcessA.
1252 (win32_attach): Use GETPROCADDRESS.
1253 (win32_detach): Likewise.
1254
f72f3e60
PA
12552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1256
1257 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1258
ed50f18f
PA
12592007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1260
1261 * win32-low.c: Commit leftover changes from 2007-03-29.
1262
0c2ead7e
DJ
12632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1264
1265 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1266 fields short instead of int. Add explicit padding.
1267 (i387_cache_to_fsave): Remove unnecessary casts.
1268 (i387_fsave_to_cache): Doc fix.
1269 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1270
73725ff3
DJ
12712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1272
1273 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1274 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1275
d99f33d8
PA
12762007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1277
1278 * configure.srv (arm*-*-mingw32ce*): Move near the other
1279 arm targets.
1280
68070c10
PA
12812007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1282
2482afc6 1283 * configure.ac: Add errno checking.
68070c10
PA
1284 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1285 sys/file.h and malloc.h.
1286 (AC_CHECK_DECLS): Add perror.
1287 (srv_mingwce): Handle.
2482afc6 1288 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
1289 win32-i386-low.o to srv_tgtobj.
1290 (i[34567]86-*-mingw*): Likewise.
1291 (arm*-*-mingw32ce*): Add case.
1292 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1293 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1294 [__MINGW32CE__] (strerror): New function.
1295 [__MINGW32CE__] (errno): Define to GetLastError.
1296 [__MINGW32CE__] (COUNTOF): New macro.
1297 (remote_open): Remove extra close call.
1298 * mem-break.c (delete_breakpoint_at): New function.
1299 * mem-break.h (delete_breakpoint_at): Declare.
1300 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1301 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1302 [USE_WIN32API] (read, write): Add char* casts.
1303 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1304 * server.h: Include wincecompat.h on Windows CE.
1305 [HAVE_ERRNO_H]: Check.
1306 (perror): Declare if not declared.
1307 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1308 (perror_with_name): Remove errno declaration.
1309 * wincecompat.h: New.
1310 * wincecompat.c: New.
1311 * win32-low.h: New.
1312 * win32-arm-low.c: New.
1313 * win32-i386-low.c: New.
1314 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1315 (OUTMSG2): Make it safe.
1316 (_T): New macro.
1317 (COUNTOF): New macro.
1318 (NUM_REGS): Get it from the low target.
1319 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1320 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1321 (thread_rec): Let low target handle debug registers.
1322 (child_add_thread): Likewise.
1323 (child_init_thread_list): Likewise.
1324 (continue_one_thread): Likewise.
1325 (regptr): New.
1326 (do_child_fetch_inferior_registers): Move to ...
1327 * win32-i386-low.c: ... here, and rename to ...
1328 (do_fetch_inferior_registers): ... this.
1329 * win32-low.c (child_fetch_inferior_registers):
1330 Go through the low target.
1331 (do_child_store_inferior_registers): Use regptr.
1332 (strwinerror): New function.
1333 (win32_create_inferior): Handle Windows CE.
1334 Use strwinerror instead of strerror on Windows error
1335 codes. Add program to the error output.
1336 Don't close the main thread handle on Windows CE.
1337 (win32_attach): Use coredll.dll on Windows CE.
1338 (win32_kill): Close current process and current
1339 thread handles.
1340 (win32_detach): Use coredll.dll on Windows CE.
1341 (win32_resume): Let low target handle debug registers, and
1342 step request.
1343 (handle_exception): Add/Remove initial breakpoint. Avoid
1344 non-existant WSTOPSIG on Windows CE.
1345 (win32_read_inferior_memory): Cast to remove warning.
1346 (win32_arch_string): Go through the low target.
1347 (initialize_low): Call set_breakpoint_data with the low
1348 target's breakpoint.
1349 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1350 FOP_REGNUM, mappings): Move to ...
1351 * win32-i386-low.c: ... here.
1352 * win32-low.c (win32_thread_info): Move to ...
1353 * win32-low.h: ... here.
1354 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1355 win32-arm-low.c and wincecompat.c.
1356 (all:): Add $EXEEXT.
1357 (install-only:): Likewise.
1358 (gdbserver:): Likewise.
1359 (gdbreplay:): Likewise.
1360 * config.in: Regenerate.
1361 * configure: Regenerate.
1362
41093d81
PA
13632007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1364
1365 * win32-low.c: Rename typedef thread_info to
1366 win32_thread_info throughout.
1367
544afa54
PA
13682007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1369
1370 * win32-i386-low.c: Rename to ...
1371 * win32-low.c: ... this.
1372 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1373 * Makefile.in: Likewise.
1374
bce7165d
PA
13752007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1376
1377 * remote-utils.c (monitor_output): Constify msg parameter.
1378 * server.h (monitor_output): Likewise.
1379 * win32-i386-low.c (handle_output_debug_string): New.
1380 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1381 handle_output_debug_string.
1382 (get_child_debug_event): Likewise.
1383
506c7aa0
DJ
13842007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1385
1386 * server.c (main): Correct strtoul check.
1387
42c81e2a
DJ
13882007-03-27 Jon Ringle <jon@ringle.org>
1389
1390 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1391
9453113a
DJ
13922007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1393
1394 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1395
64a69107
DJ
13962007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1397
1398 * terminal.h: Check HAVE_SGTTY_H.
1399
14002007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
1401
1402 * remote-utils.c (remote_open): Print out the assigned port number.
1403
c74d0ad8
DJ
14042007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1405
1406 * remote-utils.c (monitor_output): New function.
1407 * server.c (debug_threads): Define here.
1408 (monitor_show_help): New function.
1409 (handle_query): Handle qRcmd.
1410 (main): Do not handle 'd' packet.
1411 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1412 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1413 of debug_threads.
1414
de7c3b4a
PA
14152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1416
1417 * Makefile.in (EXEEXT): New.
1418 (clean): Use $(EXEEXT).
1419
ef57601b
PA
14202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1421
1422 * target.h (target_ops): Rename send_signal to request_interrupt,
1423 and remove enum target_signal parameter.
1424 * linux-low.c (linux_request_interrupt): Rename from
1425 linux_send_signal, and always send SIGINT.
1426 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1427 and always send SIGINT.
1428 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1429 of send_signal.
1430 (input_interrupt): Likewise.
1431
820f2bda
PA
14322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1433
1434 * server.c (get_features_xml): Check if target implemented
1435 arch_string.
1436 * win32-i386-low.c (win32_arch_string): New.
1437 (win32_target_ops): Add win32_arch_string as arch_string member.
1438
ab39bf24
UW
14392007-02-22 Markus Deuling <deuling@de.ibm.com>
1440
1441 * spu-low.c (spu_arch_string): New.
1442 (spu_target_ops): Add spu_arch_string.
1443
61ff6e04
DJ
14442007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1445
1446 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1447 * configure.ac: Do not check for terminal.h.
1448 * configure, config.in: Regenerated.
1449
fb1e4ffc
DJ
14502007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1451
1452 * Makefile.in (OBS): Add $(XML_BUILTIN).
1453 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1454 (clean): Update.
1455 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1456 (arm-with-iwmmxt.c): New.
1457 * config.in, configure: Regenerate.
1458 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1459 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1460 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1461 (arm*-*-linux*): Add iWMMXt and regset support.
1462 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1463 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1464 (arm_store_wmmxregset, target_regsets): New.
1465 * server.c (get_features_xml): Take annex argument. Check builtin
1466 XML documents.
1467 (handle_query): Handle multiple annexes.
1468
0f48aa01
DJ
14692007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1470
1471 * remote-utils.c [USE_WIN32API] (read, write): Define.
1472 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1473 write.
1474
23181151
DJ
14752007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1476
1477 * linux-i386-low.c (the_low_target): Set arch_string.
1478 * linux-x86-64-low.c (the_low_target): Likewise.
1479 * linux-low.c (linux_arch_string): New.
1480 (linux_target_ops): Add it.
1481 * linux-low.h (struct linux_target_ops): Add arch_string.
1482 * server.c (write_qxfer_response): Use const void * for DATA.
1483 (get_features_xml): New.
1484 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1485 * target.h (struct target_ops): Add arch_string method.
1486
9d606399
DJ
14872007-01-03 Denis Pilat <denis.pilat@st.com>
1488 Daniel Jacobowitz <dan@codesourcery.com>
1489
1490 * linux-low.c (linux_kill): Handle being called with no threads.
1491 * win32-i386-low.c (win32_kill): Likewise.
1492 (get_child_debug_event): Clear current_process_handle.
1493
14942006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
1495 Daniel Jacobowitz <dan@codesourcery.com>
1496
1497 * remote-utils.c (remote_open): Check the type of specified
1498 serial port devices before opening them.
1499 * server.c (main): Kill the inferior if an error occurs during
1500 the first remote_open.
1501
a5e13d24
DJ
15022006-12-05 Markus Deuling <deuling@de.ibm.com>
1503
1504 * README: Update supported targets.
1505
186947f7
DJ
15062006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1507
1508 * Makefile.in (clean): Remove reg-mips64.c.
1509 (reg-mips64.c, reg-mips64.o): New rules.
1510 * configure.srv: Handle mips64. Include regset support for mips.
1511 * linux-mips-low.c (union mips_register): New.
1512 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1513 (mips_breakpoint, mips_breakpoint_at): Use int.
1514 (mips_collect_register, mips_supply_register)
1515 (mips_collect_register_32bit, mips_supply_register_32bit)
1516 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1517 (mips_store_fpregset, target_regsets): New.
1518 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1519
a13e2c95
UW
15202006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1521
1522 * configure.srv: Add target "spu*-*-*".
1523 * Makefile.in (clean): Remove reg-spu.c.
1524 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1525 * spu-low.c: New file.
1526
cb7283db
DJ
15272006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1528
1529 * configure.ac: Correct td_thr_tls_get_addr test.
1530 * configure: Regenerated.
1531
89be2091
DJ
15322006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1533
1534 * linux-low.c (linux_wait_for_event): Reformat. Use the
1535 pass_signals array.
1536 * remote-utils.c (decode_address_to_semicolon): New.
1537 * server.c (pass_signals, handle_general_set): New.
1538 (handle_query): Mention QPassSignals for qSupported.
1539 (main): Call handle_general_set.
1540 * server.h (pass_signals, decode_address_to_semicolon): New.
1541
000ef4f0
DJ
15422006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1543
1544 * server.c (handle_query): Correct error handling for read_auxv.
1545
b7149293
UW
15462005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1547
1548 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1549 and srv_linux_thread_db to yes.
1550 * linux-s390-low.c (s390_fill_gregset): New function.
1551 (target_regsets): Define data structure.
1552
dae5f5cf
DJ
15532006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1554
1555 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1556 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1557 * config.in, configure: Regenerated.
1558 * inferiors.c (gdb_id_to_thread): New function.
1559 (gdb_id_to_thread_id): Use it.
1560 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1561 * linux-low.h (struct process_info): Add th member.
1562 (thread_db_get_tls_address): New prototype.
1563 * remote-utils.c (decode_address): Make non-static.
1564 * server.c (handle_query): Handle qGetTLSAddr.
1565 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1566 * target.h (struct target_ops): Add get_tls_address.
1567 * thread-db.c (maybe_attach_thread): Save the thread handle.
1568 (thread_db_get_tls_address): New.
1569
32ca6d61
DJ
15702006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1571
1572 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1573 (linux_resume_one_process): Take a siginfo_t *. Update all
1574 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1575 (struct pending_signals): Add a siginfo_t.
1576 (linux_wait_for_process): Always set last_status.
1577 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1578 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1579 * linux-low.h (struct process_info): Add last_status.
1580
5ffff7c1
DJ
15812006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1582
1583 * remote-utils.c (try_rle): New function.
1584 (putpkt_binary): Use it.
1585
8695c747
DJ
15862006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1587
1588 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1589 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1590 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1591 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1592 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1593 point registers.
1594
290fadea
RS
15952006-08-08 Richard Sandiford <richard@codesourcery.com>
1596
1597 * server.c (terminal_fd): New variable.
1598 (old_foreground_pgrp): Likewise.
1599 (restore_old_foreground_pgrp): New function.
1600 (start_inferior): Record the terminal file descriptor in terminal_fd
1601 and its original foreground group in old_foreground_pgrp. Register
1602 restore_old_foreground_pgrp with atexit().
1603
9f2e1e63
DJ
16042006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1605
1606 * server.c (handle_query): Correct qPart to qXfer.
1607
b80864fb
DJ
16082006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1609
1610 * configure.ac: Check for more headers which are missing on
1611 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1612 * configure.srv: Add Cygwin and mingw32.
1613 * remote-utils.c: Don't include headers unconditionally which
1614 are missing on mingw32. Include <winsock.h> for mingw32.
1615 (remote_open): Adjust for mingw32 support. Flush
1616 standard error after writing to it.
1617 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1618 (unblock_async_io, enable_async_io, disable_async_io)
1619 (readchar, getpkt): Update for Winsock support.
1620 (prepare_resume_reply): Expect a protocol signal number.
1621 * server.c: Disable <sys/wait.h> on mingw32.
1622 (start_inferior): Adjust for mingw32 support. Flush
1623 standard error after writing to it.
1624 (attach_inferior): Likewise. Use protocol signal
1625 numbers.
1626 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1627 and names.
1628 * win32-i386-low.c: New file.
1629 * Makefile.in (XM_CLIBS): Set.
1630 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1631 (win32-i386-low.o): New dependency rule.
1632 * linux-low.c (linux_wait): Use target signal numbers.
1633 * target.h (struct target_ops): Doc fix.
1634 * server.h (target_signal_to_name): New prototype.
1635 * gdbreplay.c: Don't include headers unconditionally which
1636 are missing on mingw32. Include <winsock.h> for mingw32.
1637 (remote_close, remote_open): Adjust for Winsock support.
1638 * configure, config.in: Regenerated.
1639
0876f84a
DJ
16402006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1641
1642 * server.c (decode_xfer_read, write_qxfer_response): New.
1643 (handle_query): Take a packet length argument. Handle
1644 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1645 the qSupported response.
1646 (main): Update call to handle_query.
1647
01f9e8fa
DJ
16482006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1649
1650 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1651 (putpkt_binary): Renamed from putpkt and adjusted for binary
1652 data.
1653 (putpkt): New wrapper for putpkt_binary.
1654 (readchar): Don't mask off the high bit.
1655 (decode_X_packet): New function.
1656 * server.c (main): Call putpkt_binary if a handler sets the packet
1657 length. Save the length of the incoming packet. Handle 'X'.
1658 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1659
be2a5f71
DJ
16602006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1661
1662 * server.c (handle_query): Handle qSupported.
1663
ea025f5f
DJ
16642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1665
1666 * remote-utils.c (all_symbols_looked_up): New variable.
1667 (look_up_one_symbol): Check it.
1668 * server.h (look_up_one_symbol): New declaration.
1669 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1670
9308fc88
DJ
16712006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1672
1673 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 1674 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
1675 (PTRACE_GET_THREAD_AREA): Define.
1676 (ps_get_thread_area): New function.
1677
52fb6437
NS
16782006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1679
1680 * configure.srv (m68k*-*-uclinux*): New target.
1681 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1682 (linux_resume_one_process): Remove extraneous cast.
1683 (linux_read_offsets): New.
1684 (linux_target_op): Add linux_read_offsets on mmuless systems.
1685 * server.c (handle_query): Add qOffsets logic.
1686 * target.h (struct target_ops): Add read_offsets.
1687
21b0f40c
DJ
16882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1689
1690 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1691 (PTRACE_GET_THREAD_AREA): Define.
1692 (ps_get_thread_area): New function.
1693 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1694 (linux-x86-64-low.o): Update.
1695
0050a760
DJ
16962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1697
1698 * configure.ac: Remove checks for prfpregset_t.
1699 * gdb_proc_service.h: New file.
1700 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1701 new "gdb_proc_service.h".
1702 * proc-service.c: Likewise.
1703 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1704 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1705 * Makefile.in (gdb_proc_service_h): Updated.
1706 * configure, config.in: Regenerated.
1707
b92a518e
DJ
17082006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1709
1710 * remote-utils.c (prepare_resume_reply): Move declaration
1711 of gdb_id_from_wait to the top of the block.
1712
545587ee
DJ
17132006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1714
1715 * linux-low.c (regsets_store_inferior_registers): Read the regset
1716 from the target before filling it.
1717
9db87ebd
DJ
17182006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1719
1720 * server.c (attach_inferior): Return SIGTRAP for a successful
1721 attach.
1722
dd24457d
DJ
17232006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1724
1725 * Makefile.in (OBS): Add version.o.
1726 (STAGESTUFF): Delete.
1727 (version.o): Add dependencies.
1728 (version.c): Replace rule.
1729 (clean): Remove version.c.
1730 * server.c (gdbserver_version): New.
1731 (gdbserver_usage): Use printf.
1732 (main): Handle --version and --help.
1733 * server.h (version, host_name): Add declarations.
1734
6f0f660e
EZ
17352005-12-23 Eli Zaretskii <eliz@gnu.org>
1736
1737 * linux-arm-low.c:
1738 * linux-arm-low.c:
1739 * inferiors.c:
1740 * i387-fp.h:
1741 * i387-fp.c:
1742 * gdbreplay.c:
1743 * regcache.c:
1744 * proc-service.c:
1745 * mem-break.h:
1746 * mem-break.c:
1747 * linux-x86-64-low.c:
1748 * linux-sh-low.c:
1749 * linux-s390-low.c:
1750 * linux-ppc64-low.c:
1751 * linux-ppc-low.c:
1752 * linux-mips-low.c:
1753 * linux-m68k-low.c:
1754 * linux-m32r-low.c:
1755 * linux-low.h:
1756 * linux-low.c:
1757 * linux-ia64-low.c:
1758 * linux-i386-low.c:
1759 * linux-crisv32-low.c:
1760 * thread-db.c:
1761 * terminal.h:
1762 * target.h:
1763 * target.c:
1764 * server.h:
1765 * server.c:
1766 * remote-utils.c:
1767 * regcache.h:
1768 * utils.c:
1769 * Makefile.in:
1770 * configure.ac:
1771 * gdbserver.1: Add (C) after Copyright. Update the FSF
1772 address.
1773
9d1fb177
DJ
17742005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1775
1776 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1777 (arm_breakpoint_at): Recognize both breakpoints.
1778 (the_low_target): Use the correct breakpoint instruction.
1779
011a70c2
DJ
17802005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1781
1782 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1783 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1784 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1785 (the_low_target): Update.
1786
7fb85e41
AS
17872005-10-25 Andreas Schwab <schwab@suse.de>
1788
1789 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1790
1791 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1792 (ia64_num_regs): Reduce to 462.
1793
3db0444b
DJ
17942005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1795
1796 * acinclude.m4: Correct quoting.
1797 * aclocal.m4: Regenerated.
1798
1799 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1800 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1801 (thread_db_init): Call thread_db_err_str.
1802 * configure.ac: Check for TD_VERSION.
1803 * config.in, configure: Regenerated.
1804
bee0189a
DJ
18052005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1806
1807 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1808
e9d25b98
DJ
18092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1810
1811 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1812 is not available. Define HAVE_PTRACE_GETREGS if it is.
1813 * config.in, configure: Regenerated.
1814 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1815 * linux-i386-low.c, linux-m68k-low.c: Update to use
1816 HAVE_PTRACE_GETREGS.
1817 * linux-low.c (regsets_fetch_inferior_registers)
1818 (regsets_store_inferior_registers): Only return 0 if we processed
1819 GENERAL_REGS.
1820 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1821 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1822
a06660f7
DJ
18232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1824
1825 * inferiors.c (struct thread_info): Add gdb_id.
1826 (add_thread): Add gdb_id argument.
1827 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1828 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1829 calls to add_thread.
1830 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1831 * server.c (handle_query): Use thread_to_gdb_id.
1832 (handle_v_cont, main): Use gdb_id_to_thread_id.
1833 * server.h (add_thread): Update prototype.
1834 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1835 prototypes.
1836
5a1f5858
DJ
18372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1838
1839 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1840 left-padded registers.
1841 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1842 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1843
e122f1f5
SE
18442005-07-01 Steve Ellcey <sje@cup.hp.com>
1845
1846 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1847 * configure: Regenerate.
1848 * config.in: Regenerate.
1849 * server.h (NEED_DECLARATION_STRERROR):
1850 Replace with !HAVE_DECL_STRERROR.
1851
d592fa2f
DJ
18522005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1853
1854 * linux-low.c (linux_wait, linux_send_signal): Don't test
1855 an unsigned long variable for > 0 if it could be MAX_ULONG.
1856 * server.c (myresume): Likewise.
1857 * target.c (set_desired_inferior): Likewise.
1858
ccbd4912
MK
18592005-06-13 Mark Kettenis <kettenis@gnu.org>
1860
1861 * configure.ac: Simplify and improve check for socklen_t.
1862 * configure, config.in: Regenerate.
1863
f450004a
DJ
18642005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1865
1866 * acconfig.h: Remove.
1867 * configure.ac: Add a test for socklen_t. Use three-argument
1868 AC_DEFINE throughout.
1869 * config.in: Regenerated using autoheader 2.59.
1870 * configure: Regenerated.
1871
1872 * gdbreplay.c (socklen_t): Provide a default.
1873 (remote_open): Use socklen_t.
1874 * remote-utils.c (socklen_t): Provide a default.
1875 (remote_open): Use socklen_t.
1876 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1877 unsigned char.
1878
1879 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1880 char for buffers.
1881 * linux-low.c (linux_read_memory, linux_write_memory)
1882 (linux_read_auxv): Likewise.
1883 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1884 (check_mem_write): Likewise.
1885 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1886 Likewise.
1887 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1888 (registers_from_string, register_data): Likewise.
1889 * server.c (handle_query, main): Likewise.
1890 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1891 (decode_M_packet): Likewise.
1892 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1893 * target.h (struct target_ops): Update read_memory, write_memory,
1894 and read_auxv.
1895 (read_inferior_memory, write_inferior_memory): Update.
1896 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1897 to unsigned char *.
1898 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1899 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1900 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1901 linux-s390-low.c, linux-sh-low.c: Update for changes in
1902 read_inferior_memory and the_low_target->breakpoint.
1903
eee84df1
DJ
19042005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1905
1906 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1907 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1908 * configure.srv: Add powerpc64-*-linux*.
1909 * linux-ppc64-low.c: New file.
1910
45b134e5
OF
19112005-05-23 Orjan Friberg <orjanf@axis.com>
1912
1913 * linux-cris-low.c: New file with support for CRIS.
1914 * linux-crisv32-low.c: Ditto for CRISv32.
1915 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1916 (clean): Add reg-cris.c and reg-crisv32.c.
1917 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1918 reg-crisv32.o, and reg-crisv32.c to make rules.
1919 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1920 recognized targets.
1921
48d93c75
UW
19222005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1923
1924 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1925 of sizeof (PTRACE_XFER_TYPE).
1926 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1927
e013ee27
OF
19282005-05-12 Orjan Friberg <orjanf@axis.com>
1929
1930 * target.h (struct target_ops): Add insert_watchpoint,
1931 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1932 pointers for hardware watchpoint support.
1933 * linux-low.h (struct linux_target_ops): Ditto.
1934 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1935 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1936 to linux_target_ops.
1937 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1938 reply packet.
1939 * server.c (main): Recognize 'Z' and 'z' packets.
1940
b0ded00b
UW
19412005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1942
1943 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1944 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1945 (the_low_target): Add new members.
1946
8643e2ad
DJ
19472005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1948
1949 * proc-service.c (ps_lgetregs): Search all_processes instead of
1950 all_threads.
1951
fc620387
DJ
19522005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1953
1954 * server.c (start_inferior): Change return type to int.
1955 (attach_inferior): Change sigptr to int *.
1956 (handle_v_cont, handle_v_requests): Change signal to int *.
1957 (main): Change signal to int.
1958
19592005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
1960
1961 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1962 * configure.srv: Add m32r*-*-linux*.
1963 * linux-m32r-low.c: New file.
1964
e0e76420
DJ
19652005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1966
1967 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1968
a1928bad
DJ
19692005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1970
1971 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1972 Take unsigned long arguments for PIDs.
1973 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1974 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1975 (wait_for_sigstop, linux_resume_one_process)
1976 (regsets_fetch_inferior_registers, linux_send_signal)
1977 (linux_read_auxv): Likewise. Update the types of variables holding
1978 PIDs. Update format string specifiers.
1979 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1980 * remote-utils.c (prepare_resume_reply): Likewise.
1981 * server.c (cont_thread, general_thread, step_thread)
1982 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1983 unsigned long.
1984 (handle_query): Update format specifiers.
1985 (handle_v_cont, main): Use strtoul for thread IDs.
1986 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1987 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1988 (general_thread, step_thread, thread_from_wait)
1989 (old_thread_from_wait): Update.
1990 * target.h (struct thread_resume): Use unsigned long for THREAD.
1991 (struct target_ops): Use unsigned long for arguments to attach and
1992 thread_alive.
1993
dcdb98d2
DJ
19942005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1995
1996 * acinclude.m4: Include bfd/bfd.m4 directly.
1997 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1998 <agriffis@toolchain.org>.
1999 * aclocal.m4, configure: Regenerated.
2000
bec39cab
AC
20012005-01-07 Andrew Cagney <cagney@gnu.org>
2002
2003 * configure.ac: Rename configure.in, require autoconf 2.59.
2004 * configure: Re-generate.
2005
434c4c77
DJ
20062004-12-08 Daniel Jacobowitz <dan@debian.org>
2007
2008 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2009 LIBS when finished.
2010 * aclocal.m4: Regenerated.
2011 * configure: Regenerated.
2012
db1d3e1b
AS
20132004-11-21 Andreas Schwab <schwab@suse.de>
2014
2015 * linux-m68k-low.c (m68k_num_gregs): Define.
2016 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2017 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2018 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2019 (m68k_breakpoint_at): New. Add to the_low_target.
2020
2021 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2022 srv_linux_thread_db to yes.
2023
43360365
JB
20242004-10-20 Joel Brobecker <brobecker@gnat.com>
2025
2026 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2027 (ARCH_SET_FS): Likewise.
2028 (ARCH_GET_FS): Likewise.
2029 (ARCH_GET_GS): Likewise.
2030
fd500816
DJ
20312004-10-16 Daniel Jacobowitz <dan@debian.org>
2032
2033 * linux-i386-low.c (ps_get_thread_area): New.
2034 * linux-x86-64-low.c (ps_get_thread_area): New.
2035 * linux-low.c: Include <sys/syscall.h>.
2036 (linux_kill_one_process): Don't kill the first thread here.
2037 (linux_kill): Kill the first thread here.
2038 (kill_lwp): New function.
2039 (send_sigstop, linux_send_signal): Use it.
2040 * proc-service.c: Clean up #ifdefs.
2041 (fpregset_info): Delete.
2042 (ps_lgetregs): Update and enable implementation.
2043 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2044 implementations.
2045 * remote-utils.c (struct sym_cache, symbol_cache): New.
2046 (input_interrupt): Print a clearer message.
2047 (async_io_enabled): New variable.
2048 (enable_async_io, disable_async_io): Use it. Update comments.
2049 (look_up_one_symbol): Use the symbol cache.
2050 * thread-db.c (thread_db_look_up_symbols): New function.
2051 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2052
f6de3c42
DJ
20532004-10-16 Daniel Jacobowitz <dan@debian.org>
2054
2055 * configure.in: Test for -rdynamic.
2056 * configure: Regenerated.
2057 * Makefile (INTERNAL_LDFLAGS): New.
2058 (gdbserver, gdbreplay): Use it.
2059
2c0fc042
AC
20602004-09-02 Andrew Cagney <cagney@gnu.org>
2061
2062 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2063
075b3282
DJ
20642004-03-23 Daniel Jacobowitz <drow@mvista.com>
2065
2066 * linux-low.c (linux_wait): Clear all_processes list also.
2067
fa6a77dc
DJ
20682004-03-12 Daniel Jacobowitz <drow@mvista.com>
2069
2070 * linux-low.c: Include <errno.h>. Remove extern declaration of
2071 errno.
2072
6d782a97
DJ
20732004-03-12 Daniel Jacobowitz <drow@mvista.com>
2074
2075 * gdbreplay.c, server.h, utils.c: Update copyright years.
2076
3a7fb99b
DJ
20772004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2078
2079 * server.c (main): Print child status or termination signal from
2080 variable 'signal', not 'sig'.
2081
c3e735a6
DJ
20822004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2083
2084 * linux-low.c (linux_read_memory): Change return type to
2085 int. Check for and return error from ptrace().
2086 * target.c (read_inferior_memory): Change return type to int. Pass
2087 back return status from the_target->read_memory().
2088 * target.h (struct target_ops): Adapt *read_memory() prototype.
2089 Update comment.
2090 (read_inferior_memory): Adapt prototype.
2091 * server.c (main): Return an error packet if
2092 read_inferior_memory() returns an error.
2093
a59d1c82
DJ
20942004-03-04 Daniel Jacobowitz <drow@mvista.com>
2095
2096 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2097 Unify with other clean targets.
2098
dc3f8883
DJ
20992004-02-29 Daniel Jacobowitz <drow@mvista.com>
2100
2101 * server.c (handle_v_cont): Call set_desired_inferior.
2102
89a208da
DJ
21032004-02-29 Daniel Jacobowitz <drow@mvista.com>
2104
2105 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2106
62ea82f5
DJ
21072004-02-29 Daniel Jacobowitz <drow@mvista.com>
2108
2109 * linux-low.c (linux_wait): Unblock async I/O.
2110 (linux_resume): Block and enable async I/O.
2111 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2112 * server.h (block_async_io, unblock_async_io): Add prototypes.
2113
6910d122
DJ
21142004-02-29 Daniel Jacobowitz <drow@mvista.com>
2115
2116 * remote-utils.c (remote_open): Print a status notice after
2117 opening a TCP port.
2118 * server.c (attach_inferior): Print a status notice after
2119 attaching.
2120
21212004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
2122
2123 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2124
c89dc5d4
DJ
21252004-02-26 Daniel Jacobowitz <drow@mvista.com>
2126
2127 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2128 error packet.
2129 * server.c, target.h: Update copyright years.
2130
4b8dad4a
RM
21312004-02-25 Roland McGrath <roland@redhat.com>
2132
2133 * target.h (struct target_ops): New member `read_auxv'.
2134 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2135 * linux-low.c (linux_read_auxv): New function.
2136 (linux_target_ops): Initialize `read_auxv' member to that.
2137
d7446758
JB
21382004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2139
2140 Committed by Jim Blandy <jimb@redhat.com>.
2141
2142 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 2143 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
2144 instead of GPR_SIZE to distiguish s390 and s390x targets.
2145
5544ad89
DJ
21462004-01-31 Daniel Jacobowitz <drow@mvista.com>
2147
2148 * linux-low.c: Update copyright year.
2149 (check_removed_breakpoint): Clear pending_is_breakpoint.
2150 (linux_set_resume_request, linux_queue_one_thread)
2151 (resume_status_pending_p): New functions.
2152 (linux_continue_one_thread): Use process->resume.
2153 (linux_resume): Only resume threads if there are no pending events.
2154 * linux-low.h (struct process_info): Add resume request
2155 pointer.
2156
2a68b70e
DJ
21572004-01-30 Daniel Jacobowitz <drow@mvista.com>
2158
2159 * regcache.c (new_register_cache): Clear the allocated register
2160 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2161
64386c31
DJ
21622003-10-13 Daniel Jacobowitz <drow@mvista.com>
2163
2164 * linux-low.c (linux_resume): Take a struct thread_resume *
2165 argument.
2166 (linux_wait): Update call.
2167 (resume_ptr): New static variable.
2168 (linux_continue_one_thread): Renamed from
2169 linux_continue_one_process. Use resume_ptr.
2170 (linux_resume): Use linux_continue_one_thread.
2171 * server.c (handle_v_cont, handle_v_requests): New functions.
2172 (myresume): New function.
2173 (main): Handle 'v' case.
2174 * target.h (struct thread_resume): New type.
2175 (struct target_ops): Change argument of "resume" to struct
2176 thread_resume *.
2177 (myresume): Delete macro.
2178
c938e9b0
L
21792003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2180
2181 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2182 (uninstall): Support DESTDIR.
2183
7f313d07
BC
2184Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2185
2186 * configure.srv: Add xscale*linux copy of arm*linux entry.
2187
3b2fc2ea
DJ
21882003-07-24 Daniel Jacobowitz <drow@mvista.com>
2189
2190 * linux-arm-low.c (arm_reinsert_addr): New function.
2191 (the_low_target): Add arm_reinsert_addr.
2192
1c0a559e
MK
21932003-07-08 Mark Kettenis <kettenis@gnu.org>
2194
2195 * mem-break.c: Remove whitespace at end of file.
2196
43d5792c
DJ
21972003-06-28 Daniel Jacobowitz <drow@mvista.com>
2198
2199 * configure.in: Check whether we need to prototype strerror.
2200 * server.h: Optionally prototype strerror.
2201 * gdbreplay.c (perror_with_name): Use strerror.
2202 * linux-low.c (linux_attach_lwp): Use strerror.
2203 * utils.c (perror_with_name): Use strerror.
2204 * config.in, configure: Regenerated.
2205
c8a86edf
DJ
22062003-06-28 Daniel Jacobowitz <drow@mvista.com>
2207
2208 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2209 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2210
73d37363
DJ
22112003-06-20 Daniel Jacobowitz <drow@mvista.com>
2212
2213 * Makefile.in (SFILES): Update.
2214 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2215 low-sun3.c: Remove files.
2216
6ad8ae5c
DJ
22172003-06-17 Daniel Jacobowitz <drow@mvista.com>
2218
2219 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2220 (linux_detach_one_process, linux_detach): New functions.
2221 (linux_target_ops): Add linux_detach.
2222 * server.c (main): Handle 'D' packet.
2223 * target.h (struct target_ops): Add "detach" member.
2224 (detach_inferior): Define.
2225
1581182a
MK
22262003-06-13 Mark Kettenis <kettenis@gnu.org>
2227
2228 From Kelley Cook <kelleycook@wideopenwest.com>:
2229 * configure.srv: Accept i[34567]86 variants.
2230
e5379b03
DJ
22312003-06-05 Daniel Jacobowitz <drow@mvista.com>
2232
2233 * linux-low.c (linux_wait_for_event): Correct comment typos.
2234 (linux_resume_one_process): Call check_removed_breakpoint.
2235 (linux_send_signal): New function.
2236 (linux_target_ops): Add linux_send_signal.
2237 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2238 of kill.
2239 * target.h (struct target_ops): Add send_signal.
2240
2ff29de4
JB
22412003-05-29 Jim Blandy <jimb@redhat.com>
2242
2243 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2244 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2245 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2246 away part of the register's value.
2247
254787d4
DJ
22482003-03-26 Daniel Jacobowitz <drow@mvista.com>
2249
2250 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2251 (linux_wait_for_event, linux_init_signals): Likewise.
2252
94e10508
DJ
22532003-03-17 Daniel Jacobowitz <drow@mvista.com>
2254
2255 * configure.in: Check for stdlib.h.
2256 * configure: Regenerated.
2257 * config.in: Regenerated.
2258
4c0711e0
DJ
22592003-01-04 Andreas Schwab <schwab@suse.de>
2260
2261 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2262
ef66e766
AC
22632003-01-02 Andrew Cagney <ac131313@redhat.com>
2264
2265 * Makefile.in: Remove obsolete code.
2266
a1358604
DJ
22672002-11-20 Daniel Jacobowitz <drow@mvista.com>
2268
2269 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2270 defined(PT_FPR0_HI).
2271
23ce3b1c
DJ
22722002-11-17 Stuart Hughes <seh@zee2.com>
2273
2274 * linux-arm-low.c (arm_num_regs): Increase.
2275 (arm_regmap): Include status register.
2276
22772002-11-17 Daniel Jacobowitz <drow@mvista.com>
2278
2279 * linux-low.c (register_addr): Remove incorrect -1 check.
2280
a9fa9f7d
DJ
22812002-08-29 Daniel Jacobowitz <drow@mvista.com>
2282
2283 * linux-low.c (linux_create_inferior): Call setpgid. Return
2284 the new PID.
2285 (unstopped_p, linux_signal_pid): Remove.
2286 (linux_target_ops): Remove linux_signal_pid.
2287 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2288 global instead of target method.
2289 * target.h (struct target_ops): Remove signal_pid. Update comment
2290 for create_inferior.
2291 * server.c (signal_pid): New variable.
2292 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 2293 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
2294 (attach_inferior): Set signal_pid.
2295
17574093
DJ
22962002-08-23 Daniel Jacobowitz <drow@mvista.com>
2297
2298 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2299
23002002-08-20 Jim Blandy <jimb@redhat.com>
2301
2302 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2303 default for this.
2304
23052002-08-01 Andrew Cagney <cagney@redhat.com>
2306
2307 * Makefile.in: Make chill references obsolete.
2308
23092002-07-24 Kevin Buettner <kevinb@redhat.com>
2310
2311 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2312 * configure: Regenerate.
2313 * config.in: Regenerate.
2314
23152002-07-09 David O'Brien <obrien@FreeBSD.org>
2316
2317 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2318 (perror_with_name, remote_close, remote_open, expect, play): Static.
2319
23202002-07-04 Michal Ludvig <mludvig@suse.cz>
2321
4b8dad4a 2322 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
2323 byte offsets instead of an array of indexes.
2324 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2325
23262002-06-13 Daniel Jacobowitz <drow@mvista.com>
2327
2328 * regcache.c: Add comment.
2329
23302002-06-11 Daniel Jacobowitz <drow@mvista.com>
2331
2332 * thread-db.c: New file.
2333 * proc-service.c: New file.
2334 * acinclude.m4: New file.
2335 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2336 proc-service.o, and thread-db.o.
2337 (linux-low.o): Add USE_THREAD_DB.
2338 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2339 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2340 * aclocal.m4: Regenerated.
2341 * config.in: Regenerated.
2342 * configure: Regenerated.
2343 * configure.in: Check for proc_service.h, sys/procfs.h,
2344 thread_db.h, and linux/elf.h headrs.
2345 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2346 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2347 Check for -lthread_db and thread support.
2348 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2349 PowerPC, and SuperH.
2350 * i387-fp.c: Constify arguments.
2351 * i387-fp.h: Likewise.
2352 * inferiors.c: (struct thread_info): Renamed from
2353 `struct inferior_info'. Remove PID member. Use generic inferior
2354 list header. All uses updated.
2355 (inferiors, signal_pid): Removed.
2356 (all_threads): New variable.
2357 (get_thread): Define.
2358 (add_inferior_to_list): New function.
2359 (for_each_inferior): New function.
2360 (change_inferior_id): New function.
2361 (add_inferior): Removed.
2362 (remove_inferior): New function.
2363 (add_thread): New function.
2364 (free_one_thread): New function.
2365 (remove_thread): New function.
2366 (clear_inferiors): Use for_each_inferior and free_one_thread.
2367 (find_inferior): New function.
2368 (find_inferior_id): New function.
2369 (inferior_target_data): Update argument type.
2370 (set_inferior_target_data): Likewise.
2371 (inferior_regcache_data): Likewise.
2372 (set_inferior_regcache_data): Likewise.
2373 * linux-low.c (linux_bp_reinsert): Remove.
2374 (all_processes, stopping_threads, using_thrads)
2375 (struct pending_signals, debug_threads, pid_of): New.
2376 (inferior_pid): Replace with macro.
2377 (struct inferior_linux_data): Remove.
2378 (get_stop_pc, add_process): New functions.
2379 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2380 Use add_process and add_thread.
2381 (linux_attach_lwp): New function, based on old linux_attach. Use
2382 add_process and add_thread. Set stop_expected for new threads.
2383 (linux_attach): New function.
2384 (linux_kill_one_process): New function.
2385 (linux_kill): Kill all LWPs.
2386 (linux_thread_alive): Use find_inferior_id.
2387 (check_removed_breakpoints, status_pending_p): New functions.
2388 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2389 Update. Use WNOHANG. Wait for cloned processes also. Update process
2390 struct for the found process.
2391 (linux_wait_for_event): New function.
2392 (linux_wait): Use it. Support LWPs.
2393 (send_sigstop, wait_for_sigstop, stop_all_processes)
2394 (linux_resume_one_process, linux_continue_one_process): New functions.
2395 (linux_resume): Support LWPs.
2396 (REGISTER_RAW_SIZE): Remove.
2397 (fetch_register): Use register_size instead. Call supply_register.
2398 (usr_store_inferior_registers): Likewise. Call collect_register.
2399 Fix recursive case.
2400 (regsets_fetch_inferior_registers): Improve error message.
2401 (regsets_store_inferior_registers): Add debugging.
2402 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2403 (unstopped_p, linux_signal_pid): New functions.
2404 (linux_target_ops): Add linux_signal_pid.
2405 (linux_init_signals): New function.
2406 (initialize_low): Call it. Initialize using_threads.
2407 * regcache.c (inferior_regcache_data): Add valid
2408 flag.
2409 (get_regcache): Fetch registers lazily. Add fetch argument
2410 and update all callers.
2411 (regcache_invalidate_one, regcache_invalidate): New
2412 functions.
2413 (new_register_cache): Renamed from create_register_cache.
2414 Return the new regcache.
2415 (free_register_cache): Change argument to a void *.
2416 (registers_to_string, registers_from_string): Call get_regcache
2417 with fetch flag set.
2418 (register_data): Make static. Pass fetch flag to get_regcache.
2419 (supply_register): Call get_regcache with fetch flag clear.
2420 (collect_register): Call get_regcache with fetch flag set.
2421 (collect_register_as_string): New function.
2422 * regcache.h: Update.
2423 * remote-utils.c (putpkt): Flush after debug output and use
2424 stderr.
2425 Handle input interrupts while waiting for an ACK.
2426 (input_interrupt): Use signal_pid method.
2427 (getpkt): Flush after debug output and use stderr.
2428 (outreg): Use collect_register_as_string.
2429 (new_thread_notify, dead_thread_notify): New functions.
2430 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2431 and general_thread.
2432 (look_up_one_symbol): Flush after debug output.
2433 * server.c (step_thread, server_waiting): New variables.
2434 (start_inferior): Don't use signal_pid. Update call to mywait.
2435 (attach_inferior): Update call to mywait.
2436 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2437 (main): Don't fetch/store registers explicitly. Use
2438 set_desired_inferior. Support proposed ``Hs'' packet. Update
2439 calls to mywait.
2440 * server.h: Update.
2441 (struct inferior_list, struct_inferior_list_entry): New.
2442 * target.c (set_desired_inferior): New.
2443 (write_inferior_memory): Constify.
2444 (mywait): New function.
2445 * target.h: Update.
2446 (struct target_ops): New signal_pid method.
2447 (mywait): Removed macro, added prototype.
2448
2449 * linux-low.h (regset_func): Removed.
2450 (regset_fill_func, regset_store_func): New.
2451 (enum regset_type): New.
2452 (struct regset_info): Add type field. Use new operation types.
2453 (struct linux_target_ops): stop_pc renamed to get_pc.
2454 Add decr_pc_after_break and breakpoint_at.
2455 (get_process, get_thread_proess, get_process_thread)
2456 (strut process_info, all_processes, linux_attach_lwp)
2457 (thread_db_init): New.
2458
2459 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2460 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2461 (the_low_target): Add new members.
2462 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2463 (i386_store_fpxregset): Constify.
2464 (target_regsets): Add new kind identifier.
2465 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2466 (i386_set_pc): Add debugging.
2467 (i386_breakpoint_at): New function.
2468 (the_low_target): Add new members.
2469 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2470 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2471 (mips_breakpoint_at): New.
2472 (the_low_target): Add new members.
2473 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2474 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2475 (the_low_target): Add new members.
2476 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2477 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2478 (the_low_target): Add new members.
2479 * linux-x86-64-low.c (target_regsets): Add new kind
2480 identifier.
2481
24822002-05-15 Daniel Jacobowitz <drow@mvista.com>
2483
2484 From Martin Pool <mbp@samba.org>:
2485 * server.c (gdbserver_usage): New function.
2486 (main): Call it.
2487
24882002-05-14 Daniel Jacobowitz <drow@mvista.com>
2489
2490 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2491 stop_at -> stop_pc.
2492
24932002-05-04 Andrew Cagney <ac131313@redhat.com>
2494
2495 * Makefile.in: Remove obsolete code.
2496
24972002-04-24 Michal Ludvig <mludvig@suse.cz>
2498
2499 * linux-low.c (regsets_fetch_inferior_registers),
2500 (regsets_store_inferior_registers): Removed cast to int from
2501 ptrace() calls.
2502 * regcache.h: Added declaration of struct inferior_info.
2503
25042002-04-20 Daniel Jacobowitz <drow@mvista.com>
2505
2506 * inferiors.c (struct inferior_info): Add regcache_data.
2507 (add_inferior): Call create_register_cache.
2508 (clear_inferiors): Call free_register_cache.
2509 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2510 * regcache.c (struct inferior_regcache_data): New.
2511 (registers): Remove.
2512 (get_regcache): New function.
2513 (create_register_cache, free_register_cache): New functions.
2514 (set_register_cache): Don't initialize the register cache here.
2515 (registers_to_string, registers_from_string, register_data): Call
2516 get_regcache.
2517 * regcache.h: Add prototypes.
2518 * server.h: Likewise.
2519
25202002-04-20 Daniel Jacobowitz <drow@mvista.com>
2521
2522 * mem-break.c: New file.
2523 * mem-break.h: New file.
2524 * Makefile.in: Add mem-break.o rule; update server.h
2525 dependencies.
2526 * inferiors.c (struct inferior_info): Add target_data
2527 member.
2528 (clear_inferiors): Free target_data member if set.
2529 (inferior_target_data, set_inferior_target_data): New functions.
2530 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2531 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2532 * linux-low.c (linux_bp_reinsert): New variable.
2533 (struct inferior_linux_data): New.
2534 (linux_create_inferior): Use set_inferior_target_data.
2535 (linux_attach): Likewise. Call add_inferior.
2536 (linux_wait_for_one_inferior): New function.
2537 (linux_wait): Call it.
2538 (linux_write_memory): Add const.
2539 (initialize_low): Call set_breakpoint_data.
2540 * linux-low.h (struct linux_target_ops): Add breakpoint
2541 handling members.
2542 * server.c (attach_inferior): Remove extra add_inferior
2543 call.
2544 * server.h: Include mem-break.h. Update inferior.c
2545 prototypes.
2546 * target.c (read_inferior_memory)
2547 (write_inferior_memory): New functions.
2548 * target.h (read_inferior_memory)
2549 (write_inferior_memory): Change macros to prototypes.
2550 (struct target_ops): Update comments. Add const to write_memory
2551 definition.
2552
25532002-04-11 Daniel Jacobowitz <drow@mvista.com>
2554
2555 * linux-low.c (usr_store_inferior_registers): Support
2556 registers which are allowed to fail to store.
2557 * linux-low.h (linux_target_ops): Likewise.
2558 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2559 (ppc_cannot_store_register): FPSCR may not be storable.
2560
25612002-04-09 Daniel Jacobowitz <drow@mvista.com>
2562
2563 * server.h: Include <string.h> if HAVE_STRING_H.
2564 * ChangeLog: Correct paths in last ChangeLog entry.
2565
25662002-04-09 Daniel Jacobowitz <drow@mvista.com>
2567
2568 * linux-low.h: Remove obsolete prototypes.
2569 (struct linux_target_ops): New.
2570 (extern the_low_target): New.
2571 * linux-low.c (num_regs, regmap): Remove declarations.
2572 (register_addr): Use the_low_target explicitly.
2573 (fetch_register): Likewise.
2574 (usr_fetch_inferior_registers): Likewise.
2575 (usr_store_inferior_registers): Likewise.
2576 * linux-arm-low.c (num_regs): Remove.
2577 (arm_num_regs): Define.
2578 (arm_regmap): Renamed from regmap, made static.
2579 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2580 made static.
2581 (arm_cannot_store_register): Renamed from cannot_store_register,
2582 made static.
2583 (the_low_target): New.
2584 * linux-i386-low.c (num_regs): Remove.
2585 (i386_num_regs): Define.
2586 (i386_regmap): Renamed from regmap, made static.
2587 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2588 made static.
2589 (i386_cannot_store_register): Renamed from cannot_store_register,
2590 made static.
2591 (the_low_target): New.
2592 * linux-ia64-low.c (num_regs): Remove.
2593 (ia64_num_regs): Define.
2594 (ia64_regmap): Renamed from regmap, made static.
2595 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2596 made static.
2597 (ia64_cannot_store_register): Renamed from cannot_store_register,
2598 made static.
2599 (the_low_target): New.
2600 * linux-m68k-low.c (num_regs): Remove.
2601 (m68k_num_regs): Define.
2602 (m68k_regmap): Renamed from regmap, made static.
2603 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2604 made static.
2605 (m68k_cannot_store_register): Renamed from cannot_store_register,
2606 made static.
2607 (the_low_target): New.
2608 * linux-mips-low.c (num_regs): Remove.
2609 (mips_num_regs): Define.
2610 (mips_regmap): Renamed from regmap, made static.
2611 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2612 made static.
2613 (mips_cannot_store_register): Renamed from cannot_store_register,
2614 made static.
2615 (the_low_target): New.
2616 * linux-ppc-low.c (num_regs): Remove.
2617 (ppc_num_regs): Define.
2618 (ppc_regmap): Renamed from regmap, made static.
2619 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2620 made static.
2621 (ppc_cannot_store_register): Renamed from cannot_store_register,
2622 made static.
2623 (the_low_target): New.
2624 * linux-s390-low.c (num_regs): Remove.
2625 (s390_num_regs): Define.
2626 (s390_regmap): Renamed from regmap, made static.
2627 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2628 made static.
2629 (s390_cannot_store_register): Renamed from cannot_store_register,
2630 made static.
2631 (the_low_target): New.
2632 * linux-sh-low.c (num_regs): Remove.
2633 (sh_num_regs): Define.
2634 (sh_regmap): Renamed from regmap, made static.
2635 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2636 made static.
2637 (sh_cannot_store_register): Renamed from cannot_store_register,
2638 made static.
2639 (the_low_target): New.
2640 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2641 (the_low_target): New.
2642
26432002-04-09 Daniel Jacobowitz <drow@mvista.com>
2644
2645 * Makefile.in: Add stamp-h target.
2646 * configure.in: Create stamp-h.
2647 * configure: Regenerated.
2648
26492002-04-09 Daniel Jacobowitz <drow@mvista.com>
2650
2651 * inferiors.c: New file.
2652 * target.c: New file.
2653 * target.h: New file.
2654 * Makefile.in: Add target.o and inferiors.o. Update
2655 dependencies.
2656 * linux-low.c (inferior_pid): New static variable,
2657 moved from server.c.
2658 (linux_create_inferior): Renamed from create_inferior.
2659 Call add_inferior. Return 0 on success instead of a PID.
2660 (linux_attach): Renamed from myattach.
2661 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2662 (linux_thread_alive): Renamed from mythread_alive.
2663 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2664 child dies.
2665 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2666 (regsets_store_inferior_registers): Correct error message.
2667 Add missing ``return 0''.
2668 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2669 (linux_store_registers): Renamed from store_inferior_registers.
2670 (linux_read_memory): Renamed from read_inferior_memory.
2671 (linux_write_memory): Renamed from write_inferior_memory.
2672 (linux_target_ops): New structure.
2673 (initialize_low): Call set_target_ops ().
2674 * remote-utils.c (unhexify): New function.
2675 (hexify): New function.
2676 (input_interrupt): Send signals to ``signal_pid''.
2677 * server.c (inferior_pid): Remove.
2678 (start_inferior): Update create_inferior call.
2679 (attach_inferior): Call add_inferior.
2680 (handle_query): New function.
2681 (main): Call handle_query for `q' packets.
2682 * server.h: Include "target.h". Remove obsolete prototypes.
2683 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2684
26852002-04-09 Daniel Jacobowitz <drow@mvista.com>
2686
2687 * Makefile.in: Add WARN_CFLAGS. Update configury
2688 dependencies.
2689 * configure.in: Check for <string.h>
2690 * configure: Regenerate.
2691 * config.in: Regenerate.
2692 * gdbreplay.c: Include needed system headers.
2693 (remote_open): Remove strchr prototype.
2694 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2695 * regcache.c (supply_register): Change buf argument to const void *.
2696 (supply_register_by_name): Likewise.
2697 (collect_register): Change buf argument to void *.
2698 (collect_register_by_name): Likewise.
2699 * regcache.h: Add missing prototypes.
2700 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2701 * server.c (handle_query): New function.
2702 (attached): New static variable, moved out of main.
2703 (main): Quiet longjmp clobber warnings.
2704 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2705 * utils.c (error): Remove NORETURN.
2706 (fatal): Likewise.