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