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