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