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