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