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