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