]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/testsuite/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b00ad6ff
NF
12011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2
3 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4 casting pointers.
5 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7 (i386_emit_void_call_2): Likewise.
8
af96c192
YQ
92011-04-26 Yao Qi <yao@codesourcery.com>
10
11 * linux-low.c: Move common macros to linux-ptrace.h.
12 Include linux-ptrace.h.
13 * Makefile.in (linux_ptrace_h): New.
14 (linux-low.o): Depends on linux-ptrace.h.
15
03f2bd59
JK
162011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
17
18 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
19 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
20 (remote_prepare): New function with most of the TCP code from ...
21 (remote_open): ... here. Detect PORT here unconditionally. Move also
22 setting transport_is_reliable.
23 * server.c (run_once): New variable.
24 (gdbserver_usage): Document it.
25 (main): Set run_once for `--once'. Call remote_prepare. Exit after
26 the first run if RUN_ONCE.
27 * server.h (run_once, remote_prepare): New declarations.
28
7a9dd1b2
TT
292011-04-19 Tom Tromey <tromey@redhat.com>
30
31 * win32-low.c (handle_load_dll): Remove duplicate "the".
32
81239425
PM
332011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
34
35 Remove support for old Cygwin 1.5 versions.
36 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
37 function to avoid warning.
38 (win32_add_one_solib): Use cygwin_conv_path function to avoid
39 warning.
40
9e0627f1
PM
412011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
42
43 * gdbserver/server.h (Macro _): Define it if not available.
44
588eebee
MS
452011-03-14 Michael Snyder <msnyder@vmware.com>
46
348af9f7 47 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 48
43f70d4c
JB
492011-03-10 Joel Brobecker <brobecker@adacore.com>
50
51 * Makefile.in (maintainer-clean realclean distclean): Remove
52 "make ... subdir_do" command.
53
348af9f7
MS
542011-03-10 Michael Snyder <msnyder@vmware.com>
55
56 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
57
58 * server.c (handle_v_run): Free alloced buffer on early return.
59
e637a4f5
YQ
602011-03-09 Yao Qi <yao@codesourcery.com>
61
62 Revert:
63 2011-03-04 Yao Qi <yao@codesourcery.com>
64
65 * Makefile.in: Remove GNU make feature --directory.
66
67 2011-03-05 Yao Qi <yao@codesourcery.com>
68
69 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
70 (subdir_do): New make target. Copied from gdb/Makefile.
71 (maintainer-clean, realclean, distclean, clean): Call corresponding
72 make targets in common/Makefile.
73
74 2011-02-11 Yao Qi <yao@codesourcery.com>
75
76 * configure.ac: Call AC_PROG_RANLIB.
77 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
78 * configure: Regenerate.
79
e6edda56
JK
802011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
81
82 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
83
e5141119
JB
842011-03-06 Yao Qi <yao@codesourcery.com>
85
86 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
87
64794aa4
JB
882011-03-05 Yao Qi <yao@codesourcery.com>
89
90 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
91 (subdir_do): New make target. Copied from gdb/Makefile.
92 (maintainer-clean, realclean, distclean, clean): Call corresponding
93 make targets in common/Makefile.
94
7a762829
YQ
952011-03-04 Yao Qi <yao@codesourcery.com>
96
97 * Makefile.in: Remove GNU make feature --directory.
98
348af9f7
MS
992011-03-04 Michael Snyder <msnyder@vmware.com>
100
101 * server.c (queue_stop_reply): Call xmalloc not malloc.
102
1032011-03-02 Michael Snyder <msnyder@vmware.com>
104
105 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
106
9f72fee2
MS
1072011-02-28 Michael Snyder <msnyder@vmware.com>
108
588eebee
MS
109 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
110 (cmd_qtframe): Ditto.
111 (cmd_qtbuffer): Ditto.
112 (cmd_bigqtbuffer): Ditto.
113
9f72fee2
MS
114 * utils.c (decimal2str): Initialize 'width' to nine, then
115 don't mess with it.
116
8040bd49
UW
1172011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
118
119 * hostio.c (require_data): Free *data, not data.
120
7e52cbd0
JK
1212011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
122
123 * hostio.c (require_data): Use free, not xfree.
124
9130f83e
MS
1252011-02-27 Michael Snyder <msnyder@vmware.com>
126
4b812f4e
MS
127 * server.c (handle_query): Discard unused value.
128
9130f83e
MS
129 * hostio.c (require_data): Free malloc memory before returning
130 error.
131
69d37113
MS
1322011-02-26 Michael Snyder <msnyder@vmware.com>
133
134 * linux-low.c (list_threads): Call closedir for dirent.
135
35f5825a
MS
1362011-02-27 Michael Snyder <msnyder@vmware.com>
137
2a589cef
MS
138 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
139 a case statement falls through.
140
0adea5f7
MS
141 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
142
35f5825a
MS
143 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
144 in comparison.
145
238f1c74
MS
1462011-02-26 Michael Snyder <msnyder@vmware.com>
147
148 * utils.c (decimal2str): Eliminate dead code and dead param.
149 (pulongest): Drop dead param from call to decimal2str.
150 (plongest): Ditto.
151
633ff500
JB
1522011-02-24 Joel Brobecker <brobecker@adacore.com>
153
154 Revert the following patch (not approved yet):
155 2011-02-21 Hui Zhu <teawater@gmail.com>
156 * tracepoint.c (tp_printf): New function.
157 (eval_agent_expr): Handle gdb_agent_op_printf.
158
f9c6ff72
HZ
1592011-02-21 Hui Zhu <teawater@gmail.com>
160
161 * tracepoint.c (tp_printf): New function.
162 (eval_agent_expr): Handle gdb_agent_op_printf.
163
94d5e490
TT
1642011-02-18 Tom Tromey <tromey@redhat.com>
165
166 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
167 (tracepoint.o): Likewise.
168 * tracepoint.c (enum gdb_agent_op): Use ax.def.
169 (gdb_agent_op_names): Likewise.
170
c7f96d2b
TT
1712011-02-18 Tom Tromey <tromey@redhat.com>
172
173 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
174 gdb_agent_op_rot>: New constants.
175 (gdb_agent_op_names): Add pick and roll.
176 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
177 cases.
178
0feedb2c
JK
1792011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
180
181 * aclocal.m4: Regenerated with aclocal-1.11.1.
182
b3b9301e
PA
1832011-02-14 Pedro Alves <pedro@codesourcery.com>
184
185 * server.c (handle_qxfer_traceframe_info): New.
186 (qxfer_packets): Register "traceframe-info".
187 (handle_query): Report support for qXfer:traceframe-info:read+.
188 * tracepoint.c (match_blocktype): New.
189 (traceframe_find_block_type): Rename to ...
190 (traceframe_walk_blocks): ... this. Add callback filter argument,
191 and use it.
192 (traceframe_find_block_type): New, reimplemented on top of
193 traceframe_walk_blocks.
194 (build_traceframe_info_xml): New.
195 (traceframe_read_info): New.
196 * server.h (traceframe_read_info): Declare.
197
4f3e6fb7
YQ
1982011-02-11 Yao Qi <yao@codesourcery.com>
199
200 * configure.ac: Call AC_PROG_RANLIB.
201 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
202 * configure: Regenerate.
203
764880b7
PA
2042011-02-07 Pedro Alves <pedro@codesourcery.com>
205
206 * server.c (gdb_read_memory): Change return semantics to allow
207 partial transfers.
208 (handle_search_memory_1): Adjust.
209 (process_serial_event) <'m' packet>: Handle partial transfers.
210 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
211
1c79eb8a
PA
2122011-01-28 Pedro Alves <pedro@codesourcery.com>
213
214 * regcache.c (init_register_cache): Initialize
215 regcache->register_status.
216 (free_register_cache): Release regcache->register_status.
217 (regcache_cpy): Copy register_status.
218 (registers_to_string): Print 'x's for unavailable registers.
219 (supply_register): Mark the register's status valid or
220 unavailable, depending on whether a buffer was passed in or not.
221 (supply_register_zeroed): New.
222 (supply_regblock): Mark the registers' status valid or
223 unavailable, depending on whether a buffer was passed in or not.
224 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
225 (struct regcache): New `register_status' field.
226 (supply_register_zeroed): Declare.
227 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
228 supply_register_zeroed, rather than passing a NULL buffer to
229 supply_register.
230 * tracepoint.c (fetch_traceframe_registers): Update comment.
231
85724a0e
PA
2322011-01-28 Pedro Alves <pedro@codesourcery.com>
233
234 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
235 buffer explicit.
236
d08aafef
PA
2372011-01-25 Pedro Alves <pedro@codesourcery.com>
238
239 * server.h (decode_xfer_write): Change prototype.
240 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
241 and don't extract the annex here.
242 * server.c (decode_xfer_read): Remove `annex' parameter,
243 and don't extract the annex here.
244 (decode_xfer): New.
245 (struct qxfer): New.
246 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
247 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
248 (handle_qxfer_statictrace): New functions, abstracted out from
249 handle_query, and made to use the struct qxfer interface.
250 (handle_threads_qxfer_proper): Rename to ...
251 (handle_qxfer_threads_proper): ... this.
252 (handle_threads_qxfer): Rename to ...
253 (handle_qxfer_threads): ... this. Adjust.
254 (qxfer_packets): New array.
255 (handle_qxfer): New function.
256 (handle_query): Use handle_qxfer.
257
493e2a69
MS
2582011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
259
260 * gdbreplay.c: Shorten lines of >= 80 columns.
261 * linux-low.c: Ditto.
262 * linux-ppc-low.c: Ditto.
263 * linux-s390-low.c: Ditto.
264 * linux-sparc-low.c: Ditto.
265 * linux-x86-low.c: Ditto.
266 * linux-xtensa-low.c: Ditto.
267 * mem-break.c: Ditto.
268 * nto-low.c: Ditto.
269 * regcache.h: Ditto.
270 * remote-utils.c: Ditto.
271 * server.c: Ditto.
272 * server.h: Ditto.
273 * thread-db.c: Ditto.
274 * tracepoint.c: Ditto.
275 * utils.c: Ditto.
276 * win32-low.h: Ditto.
277
44944448
JB
2782011-01-05 Joel Brobecker <brobecker@adacore.com>
279
280 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
281 update.
282
71ce852c
JB
2832011-01-01 Joel Brobecker <brobecker@adacore.com>
284
285 * server.c (gdbserver_version): Update copyright year in version
286 output.
287 * gdbreplay.c (gdbreplay_version): Ditto.
288
eb826dc6
MF
2892010-12-29 Jie Zhang <jie.zhang@analog.com>
290
291 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
292 * linux-bfin-low.c: New file.
293 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
294 PT_DATA_ADDR for BFIN targets.
295 * Makefile.in (SFILES): Add linux-bfin-low.c.
296 (clean): Remove reg-bfin.c.
297 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
298 * README: Mention supported Blackfin targets.
299
39ab222a
MF
3002010-12-23 Mike Frysinger <vapier@gentoo.org>
301
302 * .gitignore: New file.
303
a1f2ce7d
MF
3042010-11-16 Mike Frysinger <vapier@gentoo.org>
305
306 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
307
f474844c
JZ
3082010-10-22 Jie Zhang <jie@codesourcery.com>
309
310 * Makefile.in: Add FLAGS_TO_PASS variable.
311 (install): Remove dependency of install-only and recursively
312 invoke make for install-only.
313
f1048712
DE
3142010-10-04 Doug Evans <dje@google.com>
315
316 * Makefile.in (uninstall): Use $(DESTDIR).
317
b53a1623
PA
3182010-09-24 Pedro Alves <pedro@codesourcery.com>
319
e6ee044d
PA
320 PR gdb/11842
321
b53a1623
PA
322 * linux-x86-low.c (compat_siginfo_from_siginfo)
323 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
324 si_code is < 0. Check for si_code == SI_TIMER before checking for
325 si_code < 0.
326
fa1bd1e4
JB
3272010-09-13 Joel Brobecker <brobecker@adacore.com>
328
329 * lynx-i386-low.c: New file.
330 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
331
47fac8f8
JB
3322010-09-13 Joel Brobecker <brobecker@adacore.com>
333
334 * lynx-low.c (ptrace_request_to_str): Remove handling for
335 request values that have been removed in LynxOS 5.x.
336
1adfc54d
JB
3372010-09-13 Joel Brobecker <brobecker@adacore.com>
338
339 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
340 <ptrace.h>
341
c2a66c29
NS
3422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
343
344 * configure.ac: Add --enable-inprocess-agent option.
345 * configure: Rebuilt.
346
32fcada3
YQ
3472010-09-06 Yao Qi <yao@codesourcery.com>
348
349 * linux-low.c (linux_kill): Remove unused variable.
350 (linux_stabilize_threads): Likewise.
351 * server.c (start_inferior): Likewise.
352 (queue_stop_reply_callback): Likewise.
353 * tracepoint.c (do_action_at_tracepoint): Likewise.
354
0cccb683
YQ
3552010-09-06 Yao Qi <yao@codesourcery.com>
356
357 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
358 on return.
359
423ec54c
JK
3602010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
361
362 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
363
12ac6819
PA
3642010-09-06 Pedro Alves <pedro@codesourcery.com>
365
366 * Makefile.in (install-only): Replace $IPA_DEPFILES with
367 "$(IPA_DEPFILES)".
368
8ed54b31
JB
3692010-09-01 Joel Brobecker <brobecker@adacore.com>
370
371 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
372 gdbserver/lynx-ppc-low.c: New files.
373 * Makefile.in (lynx_low_h): New variable.
374 (lynx-low.o, lynx-ppc-low.o): New rules.
375 * configure.ac: On LynxOS, link with -lnetinet.
376 * configure.srv: Add handling of powerpc-*-lynxos* targets.
377 * configure: regenerate.
378
bb0116a4
JB
3792010-09-01 Joel Brobecker <brobecker@adacore.com>
380
381 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
382 * configure.ac: Add check for vasprintf and vsnprintf.
383 * configure, config.in: Regenerate.
384 * server.h (vasprintf, vsnprintf): Add conditional declarations.
385
a778ab81 3862010-09-01 Joel Brobecker <brobecker@adacore.com>
387
388 * gdbreplay.c: Move include of alloca.h up, next to include of
389 malloc.h.
390 * server.h: Add include of malloc.h.
391 * mem-break.c: Remove include of malloc.h.
392 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
393
8b034a19 3942010-09-01 Joel Brobecker <brobecker@adacore.com>
395
396 * Makefile.in (memmem.o): Build with -Wno-error.
397
3982010-09-01 Joel Brobecker <brobecker@adacore.com>
399
400 * utils.c (xsnprintf): Make non-static.
401 * server.h: Add xsnprintf declaration.
402 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
403 replace calls to snprintf by calls to xsnprintf throughout.
404
4052010-09-01 Joel Brobecker <brobecker@adacore.com>
406
407 * configure.ac: Add configure check for alloca.
408 * configure, config.in: Regenerate.
409 * server.h: Include alloca.h if it exists.
410 * gdbreplay.c: Include alloca.h if it exists.
411
1a981360
PA
4122010-08-28 Pedro Alves <pedro@codesourcery.com>
413
414 * linux-low.c (__SIGRTMIN): Define if not already defined.
415 (linux_create_inferior): Check for __ANDROID__ rather than
416 __SIGRTMIN.
417 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
418 are already deferred.
419 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
420 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
421 stopped and already has a pending signal to report.
422 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
423 a pending signal to report or is moving out of a jump pad.
424 (linux_init_signals): Check for __ANDROID__ rather than
425 __SIGRTMIN.
426
b4d51a55
PA
4272010-08-28 Pedro Alves <pedro@codesourcery.com>
428
429 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
430 debug_threads check. Avoid a linear search when not doing debug
431 output.
432
ec48365d
PA
4332010-08-27 Pedro Alves <pedro@codesourcery.com>
434
435 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
436 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
437 (struct file_handler) <fd>: Change type to gdb_fildes_t.
438 (process_event): Change local fd's type to gdb_fildes_t.
439 (create_file_handler): Adjust prototype.
440 (delete_file_handler): Adjust prototype.
441 (handle_file_event): Adjust prototype. Use pfildes.
442 (create_file_event): Adjsut prototype.
443 * remote-utils.c (remote_desc, listen_desc): Change type to
444 gdb_fildes_t.
445 * server.h: New gdb_fildes_t typedef.
446 [USE_WIN32API]: Include winsock2.h.
447 (delete_file_handler, add_file_handler): Adjust prototypes.
448 (pfildes): Declare.
449 * utils.c (pfildes): New.
450
854d88f0
PA
4512010-08-27 Pedro Alves <pedro@codesourcery.com>
452
453 * configure.ac (build_warnings): Add -Wno-char-subscripts.
454 * configure: Regenerate.
455
0146f85b
PA
4562010-08-27 Pedro Alves <pedro@codesourcery.com>
457
458 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
459 (linux_done_accessing_memory): ... this.
460 (linux_target_ops): Adjust.
461 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
462 * nto-low.c (nto_target_ops): Adjust comment.
463 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
464 * spu-low.c (spu_target_ops): Adjust comment.
465 * target.h (target_ops): Rename unprepare_to_access_memory field
466 to done_accessing_memory.
467 (unprepare_to_access_memory): Rename to ...
468 (done_accessing_memory): ... this.
469
90d74c30
PA
4702010-08-26 Pedro Alves <pedro@codesourcery.com>
471
472 * linux-low.c (linux_prepare_to_access_memory): New.
473 (linux_unprepare_to_access_memory): New.
474 (linux_target_ops): Install them.
475 * server.c (read_memory): Rename to ...
476 (gdb_read_memory): ... this. Use
477 prepare_to_access_memory/prepare_to_access_memory.
478 (write_memory): Rename to ...
479 (gdb_write_memory): ... this. Use
480 prepare_to_access_memory/prepare_to_access_memory.
481 (handle_search_memory_1): Adjust.
482 (process_serial_event): Adjust.
483 * target.h (struct target_ops): New fields
484 prepare_to_access_memory and unprepare_to_access_memory.
485 (prepare_to_access_memory, unprepare_to_access_memory): New.
486 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
487 prepare_to_access_memory/prepare_to_access_memory.
488 * nto-low.c (nto_target_ops): Adjust.
489 * spu-low.c (spu_target_ops): Adjust.
490 * win32-low.c (win32_target_ops): Adjust.
491
fd467969
PA
4922010-08-26 Pedro Alves <pedro@codesourcery.com>
493
494 * Makefile.in (WARN_CFLAGS): Get it from configure.
495 (WERROR_CFLAGS): New.
496 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
497 * configure.ac: Introduce --enable-werror, which adds -Werror to
498 the compiler command line. Enabled by default. Disable with
499 --disable-werror. Add -Wdeclaration-after-statement
500 Wpointer-arith and -Wformat-nonliteral to warning flags.
501 * configure: Regenerate.
502
331e2f5f
PA
5032010-08-26 Pedro Alves <pedro@codesourcery.com>
504
505 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
506
e581f2b4
PA
5072010-08-26 Pedro Alves <pedro@codesourcery.com>
508
509 * gdbreplay.c (remote_error): New.
510 (gdbchar): New.
511 (expect): Use gdbchar. Check for error reading from GDB.
512 Clarify sync error output.
513 (play): Check for errors writing to GDB.
514 * linux-low.c (sigchld_handler): Really ignore `write' errors.
515 * remote-utils.c (getpkt): Check for errors writing to the remote
516 descriptor.
517
3c11dd79
PA
5182010-08-25 Pedro Alves <pedro@codesourcery.com>
519
520 * linux-low.c (linux_wait_1): Move non-debugging code out of
521 `debug_threads' control.
522
d20a8ad9
PA
5232010-08-25 Pedro Alves <pedro@codesourcery.com>
524
525 * linux-low.c (linux_wait_1): Don't set last_status here.
526 * server.c (push_event, queue_stop_reply_callback): Assert we're
527 not pushing a TARGET_WAITKIND_IGNORE event.
528 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
529 (myresume, handle_target_event): Set the thread's last_resume_kind
530 and last_status from the target returned status.
531
964e4306
PA
5322010-08-25 Pedro Alves <pedro@codesourcery.com>
533
534 PR threads/10729
535
536 * linux-x86-low.c (update_debug_registers_callback): New.
537 (i386_dr_low_set_addr): Use it.
538 (i386_dr_low_get_addr): New.
539 (i386_dr_low_set_control): Use update_debug_registers_callback.
540 (i386_dr_low_get_control): New.
541 (i386_dr_low_get_status): Adjust.
542 * linux-low.c (linux_stop_lwp): New.
543 * linux-low.h (linux_stop_lwp): Declare.
544
545 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
546 argument instead of a i386_debug_reg_state.
547 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
548 a i386_debug_reg_state.
549 (i386_insert_aligned_watchpoint): Adjust.
550 (i386_remove_aligned_watchpoint): Adjust.
551 (i386_low_stopped_data_address): Read the debug registers from the
552 inferior instead of from the mirrors.
553 * i386-low.h (struct i386_debug_reg_state): Extend comment.
554 (i386_dr_low_get_addr): Declare.
555 (i386_dr_low_get_control): Declare.
556 (i386_dr_low_get_status): Change prototype.
557
558 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
559 (i386_dr_low_get_addr): New.
560 (i386_dr_low_get_control): New.
561 (i386_dr_low_get_status): Adjust prototype. Return
562 dr_status_mirror.
563 (i386_initial_stuff): Clear dr_status_mirror and
564 dr_control_mirror.
565 (i386_get_thread_context): Adjust.
566 (i386_set_thread_context): Adjust.
567 (i386_thread_added): Adjust.
568
5f21a75b
PA
5692010-08-24 Pedro Alves <pedro@codesourcery.com>
570
571 * linux-low.h (linux_thread_area): Delete declaration.
572
3e4c1235
TS
5732010-08-11 Thomas Schwinge <thomas@codesourcery.com>
574
575 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
576 after its termination.
577
1971b033
PA
5782010-08-09 Pedro Alves <pedro@codesourcery.com>
579
580 * linux-low.c (gdb_wants_lwp_stopped): Delete.
581 (gdb_wants_all_stopped): Delete.
582 (linux_wait_1): Don't call them.
583 * server.c (handle_v_cont): Tag all threads as want-stopped.
584 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
585 stopped as "client-wants-stopped".
586
310444ac
PA
5872010-07-31 Pedro Alves <pedro@codesourcery.com>
588
589 * Makefile.in (signals_h): New.
590 (server_h): Depend on it.
591 (server.o): Don't depend on $(signals_def).
592 (signals.o): Depend on $(signals_def).
593
a19cae16
JK
5942010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
595
596 * Makefile.in (signals_def): New.
597 (server_h): Append include/gdb/signals.h and signals_def.
598 (server.o): Append signals_def.
599
30d50328
JK
6002010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
601
602 * server.c (handle_target_event): Use target_signal_to_host for
603 resume_info.sig initialization.
604 * target.h (struct thread_resume) <sig>: New comment.
605
5c3216e2
OS
6062010-07-20 Ozkan Sezer <sezeroz@gmail.com>
607
c6f46ca0
OS
608 * server.c (handle_query): strcpy() the returned string from paddress()
609 instead of sprintf().
5c3216e2
OS
610 * utils.c (paddress): Return phex_nz().
611
6bd31874
JB
6122010-07-07 Joel Brobecker <brobecker@adacore.com>
613
614 * server.c (handle_v_cont): Call mourn_inferior if process
615 just exited.
616 (myresume): Likewise.
617
0fb4aa4b
PA
6182010-07-01 Pedro Alves <pedro@codesourcery.com>
619
620 Static tracepoints, and integration with UST.
621
622 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
623 * mem-break.c (uninsert_all_breakpoints)
624 (reinsert_all_breakpoints): New.
625 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
626 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
627 (gdb_agent_ust_loaded, helper_thread_id)
628 (gdb_agent_helper_thread_id): New macros.
629 (struct ipa_sym_addresses): Add addr_ust_loaded,
630 addr_helper_thread_id, addr_cmd_buf.
631 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
632 (in_process_agent_loaded_ust): New.
633 (write_e_ust_not_loaded): New.
634 (maybe_write_ipa_ust_not_loaded): New.
635 (struct collect_static_trace_data_action): New.
636 (enum tracepoint_type) <static_tracepoint>: New.
637 (struct tracepoint) <handle>: Mention static tracepoints.
638 (struct static_tracepoint_ctx): New.
639 (CMD_BUF_SIZE): New.
640 (add_tracepoint_action): Handle static tracepoint actions.
641 (unprobe_marker_at): New.
642 (clear_installed_tracepoints): Handle static tracepoints.
643 (cmd_qtdp): Handle static tracepoints.
644 (probe_marker_at): New.
645 (cmd_qtstart): Handle static tracepoints.
646 (response_tracepoint): Handle static tracepoints.
647 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
648 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
649 (get_context_regcache): Handle static tracepoints.
650 (do_action_at_tracepoint): Handle static tracepoint actions.
651 (traceframe_find_block_type): Handle static trace data blocks.
652 (traceframe_read_sdata): New.
653 (download_tracepoints): Download static tracepoint actions.
654 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
655 (GDB_PROBE_NAME): New.
656 (ust_ops): New.
657 (GET_UST_SYM): New.
658 (USTF): New.
659 (dlsym_ust): New.
660 (ust_marker_to_static_tracepoint): New.
661 (gdb_probe): New.
662 (collect_ust_data_at_tracepoint): New.
663 (gdb_ust_probe): New.
664 (UNIX_PATH_MAX, SOCK_DIR): New.
665 (gdb_ust_connect_sync_socket): New.
666 (resume_thread, stop_thread): New.
667 (run_inferior_command): New.
668 (init_named_socket): New.
669 (gdb_ust_socket_init): New.
670 (cstr_to_hexstr): New.
671 (next_st): New.
672 (first_marker, next_marker): New.
673 (response_ust_marker): New.
674 (cmd_qtfstm, cmd_qtsstm): New.
675 (unprobe_marker_at, probe_marker_at): New.
676 (cmd_qtstmat, gdb_ust_thread): New.
677 (gdb_ust_init): New.
678 (initialize_tracepoint_ftlib): Call gdb_ust_init.
679 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
680 (ST_REGENTRY): New.
681 (x86_64_st_collect_regmap): New.
682 (X86_64_NUM_ST_COLLECT_GREGS): New.
683 (AMD64_RIP_REGNUM): New.
684 (supply_static_tracepoint_registers): New.
685 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
686 (ST_REGENTRY): New.
687 (i386_st_collect_regmap): New.
688 (i386_NUM_ST_COLLECT_GREGS): New.
689 (supply_static_tracepoint_registers): New.
690 * server.c (handle_query): Handle qXfer:statictrace:read.
691 <qSupported>: Report support for StaticTracepoints, and
692 qXfer:statictrace:read features.
693 * server.h (traceframe_read_sdata)
694 (supply_static_tracepoint_registers): Declare.
695 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
696 (unpack_varlen_hex): Include in IPA build.
697 * Makefile.in (ustlibs, ustinc): New.
698 (IPA_OBJS): Add remote-utils-ipa.o.
699 ($(IPA_LIB)): Link -ldl and -lpthread.
700 (UST_CFLAGS): New.
701 (IPAGENT_CFLAGS): Add UST_CFLAGS.
702 * config.in, configure: Regenerate.
703
9e4344e5
PA
7042010-06-20 Ian Lance Taylor <iant@google.com>
705 Pedro Alves <pedro@codesourcery.com>
706
707 * linux-x86-low.c (always_true): Delete.
708 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
709 trying to fool the compiler with always_true.
710
c6beb2cb
PA
7112010-06-20 Pedro Alves <pedro@codesourcery.com>
712
713 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
714 conditions in gdbserver.
715
d2ed6730
UW
7162010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
717
718 * spu-low.c (spu_read_memory): Wrap around local store limit.
719 (spu_write_memory): Likewise.
720
4e29fb54
PA
7212010-06-15 Pedro Alves <pedro@codesourcery.com>
722
723 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
724 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
725 LONGEST uses.
726 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
727 uses.
728 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
729 uses with LONGEST uses.
730
6a271cae
PA
7312010-06-14 Stan Shebs <stan@codesourcery.com>
732 Pedro Alves <pedro@codesourcery.com>
733
734 Bytecode compiler.
735
736 * linux-x86-low.c: Include limits.h.
737 (add_insns): New.
738 (always_true): New.
739 (EMIT_ASM): New.
740 (EMIT_ASM32): New.
741 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
742 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
743 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
744 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
745 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
746 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
747 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
748 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
749 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
750 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
751 (amd64_emit_void_call_2): New.
752 (amd64_emit_ops): New.
753 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
754 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
755 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
756 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
757 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
758 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
759 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
760 (i386_emit_call, i386_emit_reg, i386_emit_pop)
761 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
762 (i386_emit_stack_adjust, i386_emit_int_call_1)
763 (i386_emit_void_call_2): New.
764 (i386_emit_ops): New.
765 (x86_emit_ops): New.
766 (the_low_target): Install x86_emit_ops.
767 * server.h (struct emit_ops): New.
768 (get_raw_reg_func_addr): Declare.
769 (current_insn_ptr, emit_error): Declare.
770 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
771 (set_trace_state_variable_value): New defines.
772 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
773 addr_get_trace_state_variable_value and
774 addr_set_trace_state_variable_value.
775 (symbol_list): New fields for get_raw_reg,
776 get_trace_state_variable_value and set_trace_state_variable_value.
777 (condfn): New typedef.
778 (struct tracepoint): New field `compiled_cond'.
779 (do_action_at_tracepoint): Clear compiled_cond.
780 (get_trace_state_variable_value, set_trace_state_variable_value):
781 Export in the IPA.
782 (condition_true_at_tracepoint): If there's a compiled condition,
783 run that.
784 (current_insn_ptr, emit_error): New globals.
785 (struct bytecode_address): New.
786 (get_raw_reg_func_addr): New.
787 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
788 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
789 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
790 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
791 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
792 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
793 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
794 (compile_tracepoint_condition, compile_bytecodes): New.
795 * target.h (emit_ops): Forward declare.
796 (struct target_ops): New field emit_ops.
797 (target_emit_ops): New.
798 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
800 * linux-low.c (linux_emit_ops): New.
801 (linux_target_ops): Install it.
802 * linux-low.h (struct linux_target_ops): New field emit_ops.
803
92b72907
UW
8042010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
805
806 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
807 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
808
fa593d66
PA
8092010-06-01 Pedro Alves <pedro@codesourcery.com>
810 Stan Shebs <stan@codesourcery.com>
811
812 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
813 (all): Depend on $(extra_libraries).
814 (install-only): Install the IPA.
815 (IPA_OBJS, IPA_LIB): New.
816 (clean): Remove the IPA lib.
817 (IPAGENT_CFLAGS): New.
818 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
819 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
820 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
821 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
822 * configure.ac: Check for atomic builtins support in the compiler.
823 (IPA_DEPFILES, extra_libraries): Define.
824 * configure.srv (ipa_obj): Add description.
825 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
826 (i[34567]86-*-linux*): Set ipa_obj.
827 (x86_64-*-linux*): Set ipa_obj.
828 * linux-low.c (stabilizing_threads): New.
829 (supports_fast_tracepoints): New.
830 (linux_detach): Stabilize threads before detaching.
831 (handle_tracepoints): Handle internal tracing breakpoints. Assert
832 the lwp is either not stabilizing, or is moving out of a jump pad.
833 (linux_fast_tracepoint_collecting): New.
834 (maybe_move_out_of_jump_pad): New.
835 (enqueue_one_deferred_signal): New.
836 (dequeue_one_deferred_signal): New.
837 (linux_wait_for_event_1): If moving out of a jump pad, defer
838 pending signals to later.
839 (linux_stabilize_threads): New.
840 (linux_wait_1): Check if threads need moving out of jump pads, and
841 do it if so.
842 (stuck_in_jump_pad_callback): New.
843 (move_out_of_jump_pad_callback): New.
844 (lwp_running): New.
845 (linux_resume_one_lwp): Handle moving out of jump pads.
846 (linux_set_resume_request): Dequeue deferred signals.
847 (need_step_over_p): Also step over fast tracepoint jumps.
848 (start_step_over): Also uninsert fast tracepoint jumps.
849 (finish_step_over): Also reinsert fast tracepoint jumps.
850 (linux_install_fast_tracepoint_jump): New.
851 (linux_target_ops): Install linux_stabilize_threads and
852 linux_install_fast_tracepoint_jump_pad.
853 * linux-low.h (linux_target_ops) <get_thread_area,
854 install_fast_tracepoint_jump_pad>: New fields.
855 (struct lwp_info) <collecting_fast_tracepoint,
856 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
857 (linux_get_thread_area): Declare.
858 * linux-x86-low.c (jump_insn): New.
859 (x86_get_thread_area): New.
860 (append_insns): New.
861 (push_opcode): New.
862 (amd64_install_fast_tracepoint_jump_pad): New.
863 (i386_install_fast_tracepoint_jump_pad): New.
864 (x86_install_fast_tracepoint_jump_pad): New.
865 (the_low_target): Install x86_get_thread_area and
866 x86_install_fast_tracepoint_jump_pad.
867 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
868 (struct fast_tracepoint_jump): New.
869 (fast_tracepoint_jump_insn): New.
870 (fast_tracepoint_jump_shadow): New.
871 (find_fast_tracepoint_jump_at): New.
872 (fast_tracepoint_jump_here): New.
873 (delete_fast_tracepoint_jump): New.
874 (set_fast_tracepoint_jump): New.
875 (uninsert_fast_tracepoint_jumps_at): New.
876 (reinsert_fast_tracepoint_jumps_at): New.
877 (set_breakpoint_at): Use write_inferior_memory.
878 (uninsert_raw_breakpoint): Use write_inferior_memory.
879 (check_mem_read): Mask out fast tracepoint jumps.
880 (check_mem_write): Mask out fast tracepoint jumps.
881 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
882 (set_fast_tracepoint_jump): Declare.
883 (delete_fast_tracepoint_jump)
884 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
885 (reinsert_fast_tracepoint_jumps_at): Declare.
886 * regcache.c: Don't compile many functions when building the
887 in-process agent library.
888 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
889 the register buffer in the heap.
890 (free_register_cache): If the register buffer isn't owned by the
891 regcache, don't free it.
892 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
893 pre-existing register caches.
894 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
895 type.
896 (convert_ascii_to_int): : Constify `from' parameter type.
897 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
898 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
899 the needed buffer in-place.
900 (relocate_instruction): New.
901 * server.c (handle_query) <qSymbols>: If the target supports
902 tracepoints, give it a chance of looking up symbols. Report
903 support for fast tracepoints.
904 (handle_status): Stabilize threads.
905 (process_serial_event): Adjust.
906 * server.h (struct fast_tracepoint_jump): Forward declare.
907 (struct process_info) <fast_tracepoint_jumps>: New field.
908 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
909 (decode_X_packet, decode_M_packet): Adjust.
910 (relocate_instruction): Declare.
911 (in_process_agent_loaded): Declare.
912 (tracepoint_look_up_symbols): Declare.
913 (struct fast_tpoint_collect_status): Declare.
914 (fast_tracepoint_collecting): Declare.
915 (force_unlock_trace_buffer): Declare.
916 (handle_tracepoint_bkpts): Declare.
917 (initialize_low_tracepoint)
918 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
919 * target.h (struct target_ops) <stabilize_threads,
920 install_fast_tracepoint_jump_pad>: New fields.
921 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
922 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
923 [HAVE_STDINT_H]: Include stdint.h.
924 (trace_debug_1): Rename to ...
925 (trace_vdebug): ... this.
926 (trace_debug): Rename to ...
927 (trace_debug_1): ... this. Add `level' parameter.
928 (trace_debug): New.
929 (ATTR_USED, ATTR_NOINLINE): New.
930 (IP_AGENT_EXPORT): New.
931 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
932 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
933 (about_to_request_buffer_space, trace_buffer_is_full)
934 (stopping_tracepoint, expr_eval_result, error_tracepoint)
935 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
936 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
937 (traceframe_write_count, traceframes_created)
938 (trace_state_variables)
939 New renaming defines.
940 (struct ipa_sym_addresses): New.
941 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
942 (symbol_list): New.
943 (ipa_sym_addrs): New.
944 (all_tracepoint_symbols_looked_up): New.
945 (in_process_agent_loaded): New.
946 (write_e_ipa_not_loaded): New.
947 (maybe_write_ipa_not_loaded): New.
948 (tracepoint_look_up_symbols): New.
949 (debug_threads) [IN_PROCESS_AGENT]: New.
950 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
951 (UNKNOWN_SIDE_EFFECTS): New.
952 (stop_tracing): New.
953 (flush_trace_buffer): New.
954 (stop_tracing_bkpt): New.
955 (flush_trace_buffer_bkpt): New.
956 (read_inferior_integer): New.
957 (read_inferior_uinteger): New.
958 (read_inferior_data_pointer): New.
959 (write_inferior_data_pointer): New.
960 (write_inferior_integer): New.
961 (write_inferior_uinteger): New.
962 (struct collect_static_trace_data_action): Delete.
963 (enum tracepoint_type): New.
964 (struct tracepoint) <type>: New field `type'.
965 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
966 <orig_size, obj_addr_on_target, adjusted_insn_addr>
967 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
968 (tracepoints): Use IP_AGENT_EXPORT.
969 (last_tracepoint): Don't include in the IPA.
970 (stopping_tracepoint): Use IP_AGENT_EXPORT.
971 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
972 (alloced_trace_state_variables): New.
973 (trace_state_variables): Use IP_AGENT_EXPORT.
974 (traceframe_t): Delete unused variable.
975 (circular_trace_buffer): Don't include in the IPA.
976 (trace_buffer_start): Delete.
977 (struct trace_buffer_control): New.
978 (trace_buffer_free): Delete.
979 (struct ipa_trace_buffer_control): New.
980 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
981 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
982 New.
983 (trace_buffer_ctrl): New.
984 (TRACE_BUFFER_CTRL_CURR): New.
985 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
986 Reimplement as macros.
987 (trace_buffer_wrap): Delete.
988 (traceframe_write_count, traceframe_read_count)
989 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
990 (struct tracepoint_hit_ctx) <type>: New field.
991 (struct fast_tracepoint_ctx): New.
992 (memory_barrier): New.
993 (cmpxchg): New.
994 (record_tracepoint_error): Update atomically in the IPA.
995 (clear_inferior_trace_buffer): New.
996 (about_to_request_buffer_space): New.
997 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
998 updating the same buffer.
999 (add_tracepoint): Default the tracepoint's type to trap
1000 tracepoint, and orig_size to -1.
1001 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1002 internal variables.
1003 (create_trace_state_variable): New parameter `gdb'. Handle it.
1004 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1005 (cmd_qtdp): Handle fast tracepoints.
1006 (cmd_qtdv): Adjust.
1007 (max_jump_pad_size): New.
1008 (gdb_jump_pad_head): New.
1009 (get_jump_space_head): New.
1010 (claim_jump_space): New.
1011 (sort_tracepoints): New.
1012 (MAX_JUMP_SIZE): New.
1013 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1014 IPA.
1015 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1016 support. Upload fast traceframes, and delete internal IPA
1017 breakpoints.
1018 (stop_tracing_handler): New.
1019 (flush_trace_buffer_handler): New.
1020 (cmd_qtstop): Upload fast tracepoints.
1021 (response_tracepoint): Handle fast tracepoints.
1022 (tracepoint_finished_step): Upload fast traceframes. Set the
1023 tracepoint hit context's tracepoint type.
1024 (handle_tracepoint_bkpts): New.
1025 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1026 type. Add comment about fast tracepoints.
1027 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1028 non-existing action_str field.
1029 (get_context_regcache): Handle fast tracepoints.
1030 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1031 to the regcache.
1032 (fast_tracepoint_from_jump_pad_address): New.
1033 (fast_tracepoint_from_ipa_tpoint_address): New.
1034 (collecting_t): New.
1035 (force_unlock_trace_buffer): New.
1036 (fast_tracepoint_collecting): New.
1037 (collecting): New.
1038 (gdb_collect): New.
1039 (write_inferior_data_ptr): New.
1040 (target_tp_heap): New.
1041 (target_malloc): New.
1042 (download_agent_expr): New.
1043 (UALIGN): New.
1044 (download_tracepoints): New.
1045 (download_trace_state_variables): New.
1046 (upload_fast_traceframes): New.
1047 (IPA_FIRST_TRACEFRAME): New.
1048 (IPA_NEXT_TRACEFRAME_1): New.
1049 (IPA_NEXT_TRACEFRAME): New.
1050 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1051 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1052 (gdb_jump_pad_buffer_end): New.
1053 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1054 (initialize_tracepoint): Adjust.
1055 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1056 buffer. Initialize the low module.
1057 * utils.c (PREFIX, TOOLNAME): New.
1058 (malloc_failure): Use PREFIX.
1059 (error): In the IPA, an error causes an exit.
1060 (fatal, warning): Use PREFIX.
1061 (internal_error): Use TOOLNAME.
1062 (NUMCELLS): Increase to 10.
1063 * configure, config.in: Regenerate.
1064
d149dd1d
PA
10652010-06-01 Pedro Alves <pedro@codesourcery.com>
1066
1067 * server.c (handle_query) <qSupported>: Do two passes over the
1068 qSupported string to avoid nesting strtok.
1069
f6528abd
JK
10702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1071
1072 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1073 (CDEPS): New.
1074 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1075 -Wl,--dynamic-list.
1076 * configure: Regenerate.
1077 * proc-service.list: New.
1078
ca2a87a0
JK
10792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1080
1081 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1082 New comment.
1083
363a6e9f
OS
10842010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1085
1086 * gdbreplay.c (remote_open): Check error return from socket() call by
1087 its equality to -1 not by it being negative.
1088 * remote-utils.c (remote_open): Likewise.
1089
d23b6cb1
PA
10902010-05-23 Pedro Alves <pedro@codesourcery.com>
1091
1092 * config.h: Regenerate.
1093
28d3cf85
MK
10942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1095
1096 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1097 doesn't provide PTRACE_GET_THREAD_AREA.
1098
fea36a59
MK
10992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1100
1101 * linux-m68k-low.c: Include <asm/ptrace.h>
1102 (ps_get_thread_area): Implement.
1103
24b066ba
DE
11042010-05-03 Doug Evans <dje@google.com>
1105
1106 * event-loop.c (struct callback_event): New struct.
1107 (callback_list): New global.
1108 (append_callback_event, delete_callback_event): New functions.
1109 (process_callback): New function.
1110 (start_event_loop): Call it.
1111 * remote-utils.c (NOT_SCHEDULED): Define.
1112 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1113 moved out of readchar.
1114 (readchar): Rewrite. Call reschedule before returning.
1115 (reset_readchar): New function.
1116 (remote_close): Call it.
1117 (process_remaining, reschedule): New functions.
1118 * server.h (callback_handler_func): New typedef.
1119 (append_callback_event, delete_callback_event): Declare.
1120
9836d6ea
PA
11212010-05-03 Pedro Alves <pedro@codesourcery.com>
1122
1123 * proc-service.c (ps_pglobal_lookup): Use
1124 thread_db_look_up_one_symbol.
1125 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1126 parameter. Use it instead of all_symbols_looked_up.
1127 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1128 field.
1129 (all_symbols_looked_up): Don't declare.
1130 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1131 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1132 field.
1133 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1134 Set all_symbols_looked_up here.
1135 (thread_db_look_up_one_symbol): New.
1136 (thread_db_get_tls_address): Adjust.
1137 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1138 thread_db object on the heap, and tentatively set it in the
1139 process structure.
1140 (thread_db_init): Don't set all_symbols_looked_up here.
1141 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1142
7984d532
PA
11432010-05-03 Pedro Alves <pedro@codesourcery.com>
1144
1145 * linux-low.c (linux_kill, linux_detach): Adjust.
1146 (status_pending_p_callback): Remove redundant statement. Check
1147 for !TARGET_WAITIKIND_IGNORE, instead of
1148 TARGET_WAITKIND_STOPPED.
1149 (handle_tracepoints): Make sure LWP is locked. Adjust.
1150 (linux_wait_for_event_1): Adjust.
1151 (linux_cancel_breakpoints): New.
1152 (unsuspend_one_lwp): New.
1153 (unsuspend_all_lwps): New.
1154 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1155 (send_sigstop_callback): Change return type to int, add new
1156 `except' parameter and handle it.
1157 (suspend_and_send_sigstop_callback): New.
1158 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1159 pass them down. If SUSPEND, also increment the lwp's suspend
1160 count.
1161 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1162 (need_step_over_p): Don't consider suspended LWPs.
1163 (start_step_over): Adjust.
1164 (proceed_one_lwp): Change return type to int, add new `except'
1165 parameter and handle it.
1166 (unsuspend_and_proceed_one_lwp): New.
1167 (proceed_all_lwps): Use find_inferior instead of
1168 for_each_inferior.
1169 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1170 also decrement the suspend count of LWPs. Pass `except' down,
1171 instead of hacking its suspend count.
1172 (linux_pause_all): Add `freeze' parameter. Adjust.
1173 (linux_unpause_all): New.
1174 (linux_target_ops): Install linux_unpause_all.
1175 * server.c (handle_status): Adjust.
1176 * target.h (struct target_ops): New fields `unpause_all' and
1177 `cancel_breakpoints'. Add new parameter to `pause_all'.
1178 (pause_all): Add new `freeze' parameter.
1179 (unpause_all): New.
1180 (cancel_breakpoints): New.
1181 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1182 cancel breakpoints.
1183 (cmd_qtstart): Pause threads.
1184 (stop_tracing): Pause threads, and cancel breakpoints.
1185 * win32-low.c (win32_target_ops): Adjust.
1186
e471f25b
PA
11872010-05-03 Pedro Alves <pedro@codesourcery.com>
1188
1189 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1190 the inferior right away from here...
1191 (linux_wait_1): ... to here, and adjust to check the thread's
1192 last_resume_kind instead of the lwp's step or stop_expected flags.
1193
1915ef4f
PA
11942010-05-02 Pedro Alves <pedro@codesourcery.com>
1195
1196 * README: Use consistent `GDB' and `GDBserver' spellings.
1197
f9e39928
PA
11982010-05-02 Pedro Alves <pedro@codesourcery.com>
1199
1200 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1201 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1202 (linux_detach_one_lwp): Assume the lwp is stopped.
1203 (any_thread_of): Delete.
1204 (linux_detach): Stop all lwps here. Don't blindly delete all
1205 breakpoints.
1206 (delete_lwp_callback): New.
1207 (linux_mourn): Delete all lwps of the process that is gone.
1208 (linux_wait_1): Don't delete the last lwp of the process here.
1209 * mem-break.h (mark_breakpoints_out): Declare.
1210 * mem-break.c (mark_breakpoints_out): New.
1211 (free_all_breakpoints): Use it.
1212 * server.c (handle_target_event): If the process is gone, mark
1213 breakpoints out.
1214 * thread-db.c (struct thread_db) <create_bp>: New field.
1215 (thread_db_enable_reporting): Fix prototype. Store a thread event
1216 breakpoint reference in the thread_db struct.
1217 (thread_db_load_search): Clear the thread_db object.
1218 (try_thread_db_load_1): Ditto.
1219 (switch_to_process): New.
1220 (disable_thread_event_reporting): Use it.
1221 (remove_thread_event_breakpoints): New.
1222 (thread_db_detach, thread_db_mourn): Use it.
1223
1e7fc18c
PA
12242010-05-01 Pedro Alves <pedro@codesourcery.com>
1225
1226 * linux-low.c (linux_enable_event_reporting): New.
1227 (linux_wait_for_event_1, handle_extended_wait): Use it.
1228
02fc4de7
PA
12292010-04-30 Pedro Alves <pedro@codesourcery.com>
1230
1231 * linux-low.c (linux_kill_one_lwp, linux_kill)
1232 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1233 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1234 SIGSTOP even if the LWP is stopped.
1235 (send_sigstop_callback): New.
1236 (stop_all_lwps): Use send_sigstop_callback instead.
1237 (linux_resume_one_thread): Adjust.
1238 (proceed_one_lwp): Still proceed an LWP that the client has
1239 requested to stop, if we haven't reported it as stopped yet. Make
1240 sure that LWPs the client want stopped, have a pending SIGSTOP.
1241
bc3b5632
DE
12422010-04-26 Doug Evans <dje@google.com>
1243
ae1ada35
DE
1244 * server.c (handle_general_set): Make static.
1245
bc3b5632
DE
1246 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1247 Print received char after testing for error/eof instead of before.
1248 (input_interrupt): Tweak comment.
1249
65730243
DE
12502010-04-23 Doug Evans <dje@google.com>
1251
1252 * server.c (start_inferior): Print inferior argv if --debug.
1253
a8ae7dc0
AR
12542010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1255
1256 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1257 * nto-x86-low.c: Include server.h
1258
1c07cc19
PM
12592010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1260
1261 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1262 be consistent with other sources of this directory.
1263 (init_registers_amd64): Correct name of source file of this function
1264 in the comment.
1265
e0a61e09
PM
12662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1267
1268 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1269 64-bit executables.
1270
54709339
PM
12712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1272
1273 * win32-i386-low.c: Add 64-bit support.
1274 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1275 (init_registers_amd64): Declare.
1276 (mappings): Add 64-bit version of array.
1277 (init_windows_x86): New function.
1278 (the_low_target): Change init_arch field to init_windows_x86.
1279
e8f0053d
PM
12802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1281
1282 * win32-low.c: Adapt to support also 64-bit architecture.
1283 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1284 (get_image_name): Use SIZE_T type for local variable `done'.
1285 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1286 (toolhelp_get_dll_name): Idem.
1287 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1288 Use uintptr_t typecast to avoid warning.
1289 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1290 (handle_exception): Use phex_nz to avoid warning.
1291 (win32_wait): Remove unused local variable `process'.
1292
c481e77e
PM
12932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1294
1295 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1296 `amd64-avx.o'.
1297
12ea4b69
PM
12982010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1299
1300 * configure.ac: Use `ws2_32' library for srv_mingw.
1301 * configure: Regenerate.
1302 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1303 * remote-utils.c: Likewise.
1304
f6d1620c
L
13052010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1308 if __x86_64__ is defined.
1309
8e642873
PM
13102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1311
1312 * configure: Regenerate.
1313
711e434b
PM
13142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1315
1316 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1317 * target.h (target_ops): New get_tib_address field.
1318 * win32-low.h (win32_thread_info): Add thread_local_base field.
1319 * win32-low.c (child_add_thread): Add tlb argument.
1320 Set thread_local_base field to TLB.
1321 (get_child_debug_event): Adapt to child_add_thread change.
1322 (win32_get_tib_address): New function.
1323 (win32_target_ops): Set get_tib_address field to
1324 win32_get_tib_address.
1325 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1326
505106cd
PA
13272010-04-12 Pedro Alves <pedro@codesourcery.com>
1328
505106cd
PA
1329 * linux-low.c (linux_mourn): Also remove the process.
1330 * server.c (handle_target_event): Don't remove the process here.
1331 * nto-low.c (nto_mourn): New.
1332 (nto_target_ops): Install it.
1333 * spu-low.c (spu_mourn): New.
1334 (spu_target_ops): Install it.
1335 * win32-low.c (win32_mourn): New.
1336 (win32_target_ops): Install it.
1337
e8470a06
PA
13382010-04-12 Pedro Alves <pedro@codesourcery.com>
1339
1340 * server.h (buffer_xml_printf): Remove redundant `;'.
1341
45ba0d02
PA
13422010-04-12 Pedro Alves <pedro@codesourcery.com>
1343
1344 * regcache.c (set_register_cache): Invalidate regcaches before
1345 changing the register cache layout.
1346 (regcache_invalidate_one): Allow a NULL regcache.
1347 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1348 regcaches before changing the register cache layout or the target
1349 regsets.
1350
59e04013
L
13512010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1352
1353 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1354 variable warning on Linux/x86-64.
1355
8336d594
PA
13562010-04-11 Pedro Alves <pedro@codesourcery.com>
1357
1358 GDBserver disconnected tracing support.
1359
1360 * linux-low.c (linux_remove_process): Delete.
1361 (add_lwp): Don't set last_resume_kind here.
1362 (linux_kill): Use `mourn'.
1363 (linux_detach): Use `thread_db_detach', and `mourn'.
1364 (linux_mourn): New.
1365 (linux_attach_lwp_1): Adjust comment.
1366 (linux_attach): last_resume_kind moved the thread_info; adjust.
1367 (status_pending_p_callback): Adjust.
1368 (linux_wait_for_event_1): Adjust.
1369 (count_events_callback, select_singlestep_lwp_callback)
1370 (select_event_lwp_callback, cancel_breakpoints_callback)
1371 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1372 (proceed_one_lwp): Adjust.
1373 (linux_async): Add debug output.
1374 (linux_thread_stopped): New.
1375 (linux_pause_all): New.
1376 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1377 linux_pause_all.
1378 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1379 (thread_db_free): Delete declaration.
1380 (thread_db_detach, thread_db_mourn): Declare.
1381 * thread-db.c (thread_db_init): Use thread_db_mourn.
1382 (thread_db_free): Delete, split in two.
1383 (disable_thread_event_reporting): New.
1384 (thread_db_detach): New.
1385 (thread_db_mourn): New.
1386
1387 * server.h (struct thread_info) <last_resume_kind>: New field.
1388 <attached>: Add comment.
1389 <gdb_detached>: New field.
1390 (handler_func): Change return type to int.
1391 (handle_serial_event, handle_target_event): Ditto.
1392 (gdb_connected): Declare.
1393 (tracing): Delete.
1394 (disconnected_tracing): Declare.
1395 (stop_tracing): Declare.
1396
1397 * server.c (handle_query) <qSupported>: Report support for
1398 disconnected tracing.
1399 (queue_stop_reply_callback): Account for running threads.
1400 (gdb_wants_thread_stopped): New.
1401 (gdb_wants_all_threads_stopped): New.
1402 (gdb_reattached_process): New.
1403 (handle_status): Clear the `gdb_detached' flag of all processes.
1404 In all-stop, stop all threads.
1405 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1406 (process_serial_event): If the remote connection breaks, or if an
1407 exit was forced with "monitor exit", force an event loop exit.
1408 Handle disconnected tracing on detach.
1409 (handle_serial_event): Adjust.
1410 (handle_target_event): If GDB isn't connected, forward events back
1411 to the inferior, unless the last process exited, in which case,
1412 exit gdbserver. Adjust interface.
1413
1414 * remote-utils.c (remote_open): Don't block in accept. Instead
1415 register an event loop source on the listen socket file
1416 descriptor. Refactor bits into ...
1417 (listen_desc): ... this new global.
1418 (gdb_connected): ... this new function.
1419 (enable_async_notification): ... this new function.
1420 (handle_accept_event): ... this new function.
1421 (remote_close): Clear remote_desc.
1422
1423 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1424
1425 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1426 New fields.
1427 (mourn_inferior): Define.
1428 (target_process_qsupported): Avoid the dangling else problem.
1429 (thread_stopped): Define.
1430 (pause_all): Define.
1431 (target_waitstatus_to_string): Declare.
1432 * target.c (target_waitstatus_to_string): New.
1433
1434 * tracepoint.c (tracing): Make extern.
1435 (disconnected_tracing): New.
1436 (stop_tracing): Make extern. Handle tracing stops due to GDB
1437 disconnecting.
1438 (cmd_qtdisconnected): New.
1439 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1440 (handle_tracepoint_general_set): Handle QTDisconnected.
1441
1442 * event-loop.c (event_handler_func): Change return type to int.
1443 (process_event): Bail out if the event handler wants the event
1444 loop to stop.
1445 (handle_file_event): Ditto.
1446 (start_event_loop): Bail out if the event handler wants the event
1447 loop to stop.
1448
1449 * nto-low.c (nto_target_ops): Adjust.
1450 * spu-low.c (spu_wait): Don't remove the process here.
1451 (spu_target_ops): Adjust.
1452 * win32-low.c (win32_wait): Don't remove the process here.
1453 (win32_target_ops): Adjust.
1454
5d267c4c
PA
14552010-04-11 Pedro Alves <pedro@codesourcery.com>
1456
1457 * regcache.c (realloc_register_cache): Invalidate inferior's
1458 regcache before recreating it.
1459
623ccd72
PA
14602010-04-09 Pedro Alves <pedro@codesourcery.com>
1461
1462 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1463
219f2f23
PA
14642010-04-09 Stan Shebs <stan@codesourcery.com>
1465 Pedro Alves <pedro@codesourcery.com>
1466
1467 * server.h (LONGEST): New.
1468 (struct thread_info) <while_stepping>: New field.
1469 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1470 Declare.
1471 (initialize_tracepoint, handle_tracepoint_general_set)
1472 (handle_tracepoint_query, tracepoint_finished_step)
1473 (tracepoint_was_hit, release_while_stepping_state_list):
1474 (current_traceframe): Declare.
1475 * server.c (handle_general_set): Handle tracepoint packets.
1476 (read_memory): New.
1477 (write_memory): New.
1478 (handle_search_memory_1): Use read_memory.
1479 (handle_query): Report support for conditional tracepoints, trace
1480 state variables, and tracepoint sources. Handle tracepoint
1481 queries.
1482 (main): Initialize the tracepoints module.
1483 (process_serial_event): Handle traceframe reads/writes.
1484
1485 * linux-low.c (handle_tracepoints): New.
1486 (linux_wait_1): Call it.
1487 (linux_resume_one_lwp): Handle while-stepping.
1488 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1489 (linux_target_ops): Install them.
1490 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1491 New field.
1492 * linux-x86-low.c (x86_supports_tracepoints): New.
1493 (the_low_target). Install it.
1494
1495 * mem-break.h (delete_breakpoint): Declare.
1496 * mem-break.c (delete_breakpoint): Make external.
1497
1498 * target.h (struct target_ops): Add `supports_tracepoints',
1499 `read_pc', and `write_pc' fields.
1500 (target_supports_tracepoints): Define.
1501 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1502 (phex_nz): New.
1503
1504 * regcache.h (struct regcache) <registers_owned>: New field.
1505 (init_register_cache, regcache_cpy): Declare.
1506 (regcache_read_pc, regcache_write_pc): Declare.
1507 (register_cache_size): Declare.
1508 (supply_regblock): Declare.
1509 * regcache.c (init_register_cache): New.
1510 (new_register_cache): Use it.
1511 (regcache_cpy): New.
1512 (register_cache_size): New.
1513 (supply_regblock): New.
1514 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 1515
219f2f23
PA
1516 * tracepoint.c: New.
1517
1518 * Makefile.in (OBS): Add tracepoint.o.
1519 (tracepoint.o): New rule.
1520
3a13a53b
L
15212010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1522
1523 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1524 (i386-mmx.o): New.
1525 (i386-mmx.c): Likewise.
1526 (i386-mmx-linux.o): Likewise.
1527 (i386-mmx-linux.c): Likewise.
1528
1529 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1530 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1531 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1532 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1533
1534 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1535 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1536 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1537
1570b33e
L
15382010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1539
1540 * Makefile.in (clean): Updated.
1541 (i386-avx.o): New.
1542 (i386-avx.c): Likewise.
1543 (i386-avx-linux.o): Likewise.
1544 (i386-avx-linux.c): Likewise.
1545 (amd64-avx.o): Likewise.
1546 (amd64-avx.c): Likewise.
1547 (amd64-avx-linux.o): Likewise.
1548 (amd64-avx-linux.c): Likewise.
1549
1550 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1551 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1552 (srv_amd64_regobj): Add amd64-avx.o.
1553 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1554 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1555 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1556 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1557 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1558 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1559 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1560
1561 * i387-fp.c: Include "i386-xstate.h".
1562 (i387_xsave): New.
1563 (i387_cache_to_xsave): Likewise.
1564 (i387_xsave_to_cache): Likewise.
1565 (x86_xcr0): Likewise.
1566
1567 * i387-fp.h (i387_cache_to_xsave): Likewise.
1568 (i387_xsave_to_cache): Likewise.
1569 (x86_xcr0): Likewise.
1570
1571 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1572 * linux-crisv32-low.c (target_regsets): Likewise.
1573 * linux-m68k-low.c (target_regsets): Likewise.
1574 * linux-mips-low.c (target_regsets): Likewise.
1575 * linux-ppc-low.c (target_regsets): Likewise.
1576 * linux-s390-low.c (target_regsets): Likewise.
1577 * linux-sh-low.c (target_regsets): Likewise.
1578 * linux-sparc-low.c (target_regsets): Likewise.
1579 * linux-xtensa-low.c (target_regsets): Likewise.
1580
1581 * linux-low.c: Include <sys/uio.h>.
1582 (regsets_fetch_inferior_registers): Support nt_type.
1583 (regsets_store_inferior_registers): Likewise.
1584 (linux_process_qsupported): New.
1585 (linux_target_ops): Add linux_process_qsupported.
1586
1587 * linux-low.h (regset_info): Add nt_type.
1588 (linux_target_ops): Add process_qsupported.
1589
1590 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1591 and <sys/uio.h>.
1592 (init_registers_i386_avx_linux): New.
1593 (init_registers_amd64_avx_linux): Likewise.
1594 (xmltarget_i386_linux_no_xml): Likewise.
1595 (xmltarget_amd64_linux_no_xml): Likewise.
1596 (PTRACE_GETREGSET): Likewise.
1597 (PTRACE_SETREGSET): Likewise.
1598 (x86_fill_xstateregset): Likewise.
1599 (x86_store_xstateregset): Likewise.
1600 (use_xml): Likewise.
1601 (x86_linux_update_xmltarget): Likewise.
1602 (x86_linux_process_qsupported): Likewise.
1603 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1604 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1605 init_registers_i386_linux here. Call
1606 x86_linux_update_xmltarget.
1607 (the_low_target): Add x86_linux_process_qsupported.
1608
1609 * server.c (handle_query): Call target_process_qsupported.
1610
1611 * target.h (target_ops): Add process_qsupported.
1612 (target_process_qsupported): New.
1613
fc7238bb
PA
16142010-04-03 Pedro Alves <pedro@codesourcery.com>
1615
1616 * inferiors.c (add_thread): Set last_status kind to
1617 TARGET_WAITKIND_IGNORE.
1618 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1619 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1620 (linux_wait_1): Move `thread' local definition to block that uses
1621 it. Don't NULL initialize `event_child'.
1622 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1623 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1624 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1625
bdabb078
PA
16262010-04-01 Pedro Alves <pedro@codesourcery.com>
1627
1628 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1629 an extended waitstatus, or by a watchpoint.
1630 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1631 thread was stepping or has been stopped by a watchpoint.
1632
d3bbe7a0
PA
16332010-04-01 Pedro Alves <pedro@codesourcery.com>
1634
1635 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1636 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1637 of another, then delete the previous, and validate all
1638 breakpoints.
1639 (validate_inserted_breakpoint): New.
1640 (delete_disabled_breakpoints): New.
1641 (validate_breakpoints): New.
1642 (check_mem_read): Validate breakpoints before trusting their
1643 shadow. Delete disabled breakpoints.
1644 (check_mem_write): Validate breakpoints before trusting they
1645 should be inserted. Delete disabled breakpoints.
1646 * mem-break.h (validate_breakpoints):
1647 * server.c (handle_query): Validate breakpoints when we see a
1648 qSymbol query.
1649
8b07ae33
PA
16502010-04-01 Pedro Alves <pedro@codesourcery.com>
1651
1652 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1653 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1654 if we could tell there's a GDB breakpoint at stop_pc.
1655 (need_step_over_p): Don't do a step over if we find a GDB
1656 breakpoint at the resume PC.
1657
1658 * mem-break.c (struct raw_breakpoint): New.
1659 (enum bkpt_type): New type `gdb_breakpoint'.
1660 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1661 fields. New field `raw'.
1662 (find_raw_breakpoint_at): New.
1663 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1664 breakpoint instead.
1665 (set_breakpoint_at): Adjust.
1666 (delete_raw_breakpoint): New.
1667 (release_breakpoint): New.
1668 (delete_breakpoint): Rename to...
1669 (delete_breakpoint_1): ... this. Add proc parameter. Use
1670 release_breakpoint. Return ENOENT.
1671 (delete_breakpoint): Reimplement.
1672 (find_breakpoint_at): Delete.
1673 (find_gdb_breakpoint_at): New.
1674 (delete_breakpoint_at): Delete.
1675 (set_gdb_breakpoint_at): New.
1676 (delete_gdb_breakpoint_at): New.
1677 (gdb_breakpoint_here): New.
1678 (set_reinsert_breakpoint): Use release_breakpoint.
1679 (uninsert_breakpoint): Rename to ...
1680 (uninsert_raw_breakpoint): ... this.
1681 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1682 (reinsert_raw_breakpoint): Change parameter type to
1683 raw_breakpoint.
1684 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1685 instead.
1686 (check_breakpoints): Adjust. Use release_breakpoint.
1687 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1688 (breakpoint_inserted_here): Ditto.
1689 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1690 Don't trust the breakpoint's shadow if it is not inserted.
1691 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1692 (delete_all_breakpoints): Adjust.
1693 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1694 use delete_breakpoint_1.
1695
1696 * mem-break.h (breakpoints_supported): Delete declaration.
1697 (set_gdb_breakpoint_at): Declare.
1698 (gdb_breakpoint_here): Declare.
1699 (delete_breakpoint_at): Delete.
1700 (delete_gdb_breakpoint_at): Declare.
1701
1702 * server.h (struct raw_breakpoint): Forward declare.
1703 (struct process_info): New field `raw_breakpoints'.
1704
1705 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1706 breakpoints.
1707
6bf5e0ba
PA
17082010-03-24 Pedro Alves <pedro@codesourcery.com>
1709
1710 * linux-low.c (status_pending_p_callback): Fix comment.
1711 (linux_wait_for_event_1): Move most of the internal breakpoint
1712 handling from here...
1713 (linux_wait_1): ... to here.
1714 (count_events_callback): New.
1715 (select_singlestep_lwp_callback): New.
1716 (select_event_lwp_callback): New.
1717 (cancel_breakpoints_callback): New.
1718 (select_event_lwp): New.
1719 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1720 priority to all LWPs that have had events that should be reported
1721 to the client. Cancel breakpoints when about to reporting the
1722 event to the client, not while stopping lwps. No longer cancel
1723 finished single-steps here.
1724 (cancel_finished_single_step): Delete.
1725 (cancel_finished_single_steps): Delete.
1726
414a389f
PA
17272010-03-24 Pedro Alves <pedro@codesourcery.com>
1728
1729 * mem-break.c (enum bkpt_type): New.
1730 (struct breakpoint): New field `type'.
1731 (set_breakpoint_at): Change return type to struct breakpoint
1732 pointer. Set type to `other_breakpoint' by default.
1733 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1734 in the breakpoint list.
1735 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1736 (reinsert_breakpoint): Rename to ...
1737 (reinsert_raw_breakpoint): ... this.
1738 (reinsert_breakpoints_at): Adjust.
1739 * mem-break.h (struct breakpoint): Declare.
1740 (set_breakpoint_at): Change return type to struct breakpoint
1741 pointer.
1742
2280c721
PA
17432010-03-24 Pedro Alves <pedro@codesourcery.com>
1744
1745 * server.c (handle_query): Assign, not compare.
1746
d50171e4
PA
17472010-03-24 Pedro Alves <pedro@codesourcery.com>
1748
1749 Teach linux gdbserver to step-over-breakpoints.
1750
1751 * linux-low.c (can_hardware_single_step): New.
1752 (supports_breakpoints): New.
1753 (handle_extended_wait): If stopping threads, read the stop pc of
1754 the new cloned LWP.
1755 (get_pc): New.
1756 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1757 low target doesn't support retrieving the PC.
1758 (add_lwp): Set last_resume_kind to resume_continue.
1759 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1760 (linux_attach): Don't clear stop_expected. Set the lwp's
1761 last_resume_kind to resume_stop.
1762 (linux_detach_one_lwp): Don't check for removed breakpoints.
1763 (check_removed_breakpoint): Delete.
1764 (status_pending_p): Rename to ...
1765 (status_pending_p_callback): ... this. Don't check for removed
1766 breakpoints. Don't consider threads that are stopped from GDB's
1767 perspective.
1768 (linux_wait_for_lwp): Always read the stop_pc here.
1769 (cancel_breakpoint): New.
1770 (step_over_bkpt): New global.
1771 (linux_wait_for_event_1): Implement stepping over breakpoints.
1772 (gdb_wants_lwp_stopped): New.
1773 (gdb_wants_all_stopped): New.
1774 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1775 single-step traps here. Store the thread's last reported target
1776 wait status.
1777 (send_sigstop): Don't clear stop_expected. Always set it,
1778 instead.
1779 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1780 (cancel_finished_single_step): New.
1781 (cancel_finished_single_steps): New.
1782 (wait_for_sigstop): Don't cancel finished single-step traps here.
1783 (linux_resume_one_lwp): Don't check for removed breakpoints.
1784 Don't set `step' on non-hardware step archs.
1785 (linux_set_resume_request): Ignore resume_stop requests if already
1786 stopping or stopped. Set the lwp's last_resume_kind.
1787 (resume_status_pending_p): Don't check for removed breakpoints.
1788 (need_step_over_p): New.
1789 (start_step_over): New.
1790 (finish_step_over): New.
1791 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1792 requests. Clear the thread's last reported target waitstatus.
1793 Don't use the `suspended' flag. Don't consider pending breakpoints.
1794 (linux_resume): Start a step-over if necessary.
1795 (proceed_one_lwp): New.
1796 (proceed_all_lwps): New.
1797 (unstop_all_lwps): New.
1798 * linux-low.h (struct lwp_info): Rewrite comment for the
1799 `suspended' flag. Add the `stop_pc' field. Delete the
1800 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1801 Add `'last_resume_kind' and `need_step_over' fields.
1802 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1803 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1804 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1805 (set_raw_breakpoint_at): New.
1806 (set_breakpoint_at): Rewrite to use it.
1807 (reinsert_breakpoint_handler): Delete.
1808 (set_reinsert_breakpoint): New.
1809 (reinsert_breakpoint_by_bp): Delete.
1810 (delete_reinsert_breakpoints): New.
1811 (uninsert_breakpoint): Rewrite.
1812 (uninsert_breakpoints_at): New.
1813 (reinsert_breakpoint): Rewrite.
1814 (reinsert_breakpoints_at): New.
1815 (check_breakpoints): Rewrite.
1816 (breakpoint_here): New.
1817 (breakpoint_inserted_here): New.
1818 (check_mem_read): Adjust.
1819 * mem-break.h (breakpoints_supported, breakpoint_here)
1820 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1821 (reinsert_breakpoint_by_bp): Delete declaration.
1822 (delete_reinsert_breakpoints): Declare.
1823 (reinsert_breakpoint): Delete declaration.
1824 (reinsert_breakpoints_at): Declare.
1825 (uninsert_breakpoint): Delete declaration.
1826 (uninsert_breakpoints_at): Declare.
1827 (check_breakpoints): Adjust prototype.
1828 * server.h: Adjust include order.
1829 (struct thread_info): Declare here. Add a `last_status' field.
1830
30ba68cb
MS
18312010-03-23 Michael Snyder <msnyder@vmware.com>
1832
1833 * server.c (crc32): New function.
1834 (handle_query): Add handling for 'qCRC:' request.
1835
b9a881c2
PA
18362010-03-23 Pedro Alves <pedro@codesourcery.com>
1837
1838 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1839 lwp had been stopped by a watchpoint.
1840
e92d13d5
PA
18412010-03-16 Pedro Alves <pedro@codesourcery.com>
1842
1843 * server.h (internal_error): Declare.
1844 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1845 * utils.c (internal_error): New function.
1846
64daa791
AS
18472010-03-15 Andreas Schwab <schwab@redhat.com>
1848
1849 * configure.srv: Fix typo setting srv_regobj.
1850
f52cd8cd
PA
18512010-03-15 Pedro Alves <pedro@codesourcery.com>
1852
1853 * linux-low.c (fetch_register): Avoid passing a non string literal
1854 format to `error'.
1855 (usr_store_inferior_registers): Ditto.
1856
93ae6fdc
PA
18572010-03-14 Pedro Alves <pedro@codesourcery.com>
1858
1859 * linux-low.c (linux_write_memory): Bail out early if peeking
1860 memory failed.
1861
c3adc08c
PA
18622010-03-14 Pedro Alves <pedro@codesourcery.com>
1863
1864 * linux-low.h (struct lwp_info): New fields
1865 `stopped_by_watchpoint' and `stopped_data_address'.
1866 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1867 here, and cache them in the lwp object.
1868 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1869 directly.
1870 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1871 field.
1872 (linux_stopped_by_watchpoint): Rewrite.
1873 (linux_stopped_data_address): Rewrite.
1874
bce522a2
PA
18752010-03-06 Simo Melenius <simo.melenius@iki.fi>
1876
1877 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1878 switching the current inferior, not before.
1879
90884b2b
L
18802010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1881
1882 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1883 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1884 i386-linux.c and amd64-linux.c.
1885 (reg-i386.o): Removed.
1886 (reg-i386.c): Likewise.
1887 (reg-i386-linux.o): Likewise.
1888 (reg-i386-linux.c): Likewise.
1889 (reg-x86-64.o): Likewise.
1890 (reg-x86-64.c): Likewise.
1891 (reg-x86-64-linux.o): Likewise.
1892 (reg-x86-64-linux.c): Likewise.
1893 (i386.o): New.
1894 (i386.c): Likewise.
1895 (i386-linux.o): Likewise.
1896 (i386-linux.c): Likewise.
1897 (amd64.o): Likewise.
1898 (amd64.c): Likewise.
1899 (amd64-linux.o): Likewise.
1900 (amd64-linux.c): Likewise.
1901
1902 * configure.srv (srv_i386_regobj): New.
1903 (srv_i386_linux_regobj): Likewise.
1904 (srv_amd64_regobj): Likewise.
1905 (srv_amd64_linux_regobj): Likewise.
1906 (srv_i386_32bit_xmlfiles): Likewise.
1907 (srv_i386_64bit_xmlfiles): Likewise.
1908 (srv_i386_xmlfiles): Likewise.
1909 (srv_amd64_xmlfiles): Likewise.
1910 (srv_i386_linux_xmlfiles): Likewise.
1911 (srv_amd64_linux_xmlfiles): Likewise.
1912 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1913 srv_xmlfiles to $srv_i386_xmlfiles.
1914 (i[34567]86-*-mingw32ce*): Likewise.
1915 (i[34567]86-*-mingw*): Likewise.
1916 (i[34567]86-*-nto*): Likewise.
1917 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1918 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1919 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1920 (x86_64-*-linux*): Likewise.
1921
1922 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1923 (init_registers_amd64_linux): New.
1924 (x86_arch_setup): Replace init_registers_x86_64_linux with
1925 init_registers_amd64_linux.
1926
193f13e6
MK
19272010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1928
1929 * configure.ac: Check for libdl. If it is not available link against
1930 static libthread_db.
1931 * configure: Regenerate.
1932
85d721b8
PA
19332010-02-22 Pedro Alves <pedro@codesourcery.com>
1934
1935 PR9605
1936
1937 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1938 handing a read watchpoint.
1939 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1940
6076632b
DE
19412010-02-12 Doug Evans <dje@google.com>
1942
1943 * linux-low.c (linux_supports_tracefork_flag): Document.
1944 (linux_look_up_symbols): Add comment.
1945
3327ccf7
L
19462010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 * regcache.c (supply_register): Clear regcache if buf is NULL.
1949
0718675c 19502010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 1951 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
1952
1953 * inferiors.c (find_inferior): Add function documentation.
1954 (unloaded_dll): Handle the case where the unloaded dll has not
1955 been previously registered in the dll list.
1956
177321bd
DJ
19572010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1958
1959 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1960 (thumb2_breakpoint): New.
1961 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1962
2b009048
DJ
19632010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1964
1965 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1966 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1967 breakpoints.
1968
3be029c7
PA
19692010-01-21 Pedro Alves <pedro@codesourcery.com>
1970
1971 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1972
18f5de3b
JK
19732010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1974
1975 * linux-s390-low.c (s390_collect_ptrace_register)
1976 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1977
3743bb4f
DE
19782010-01-21 Doug Evans <dje@google.com>
1979
14ce3065
DE
1980 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1981 (PTRACE_ARG4_TYPE): New macro.
1982 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1983 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1984 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1985 (usr_store_inferior_registers): Ditto.
1986 (linux_read_memory, linux_write_memory): Ditto.
1987 (linux_test_for_tracefork): Ditto.
1988
3743bb4f
DE
1989 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1990 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1991
8b315be5
PA
19922010-01-21 Pedro Alves <pedro@codesourcery.com>
1993
1994 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1995 target.
1996
85492558
PA
19972010-01-21 Pedro Alves <pedro@codesourcery.com>
1998
1999 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2000 prototype to take a regcache. Adjust.
2001
442ea881
PA
20022010-01-20 Pedro Alves <pedro@codesourcery.com>
2003
2004 * regcache.h (struct thread_info): Forward declare.
2005 (struct regcache): New.
2006 (new_register_cache): Adjust prototype.
2007 (get_thread_regcache): Declare.
2008 (free_register_cache): Adjust prototype.
2009 (registers_to_string, registers_from_string): Ditto.
2010 (supply_register, supply_register_by_name, collect_register)
2011 (collect_register_as_string, collect_register_by_name): Ditto.
2012 * regcache.c (struct inferior_regcache_data): Delete.
2013 (get_regcache): Rename to ...
2014 (get_thread_regcache): ... this. Adjust. Switch inferior before
2015 fetching registers.
2016 (regcache_invalidate_one): Adjust.
2017 (regcache_invalidate): Fix prototype.
2018 (new_register_cache): Return the new register cache.
2019 (free_register_cache): Change prototype.
2020 (realloc_register_cache): Adjust.
2021 (registers_to_string): Change prototype to take a regcache. Adjust.
2022 (registers_from_string): Ditto.
2023 (register_data): Ditto.
2024 (supply_register): Ditto.
2025 (supply_register_by_name): Ditto.
2026 (collect_register): Ditto.
2027 (collect_register_as_string): Ditto.
2028 (collect_register_by_name): Ditto.
2029 * server.c (process_serial_event): Adjust.
2030 * linux-low.h (regset_fill_func, regset_store_func): Change
2031 prototype.
2032 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2033 Change prototype.
2034 * linux-low.c (get_stop_pc): Adjust.
2035 (check_removed_breakpoint): Adjust.
2036 (linux_wait_for_event): Adjust.
2037 (linux_resume_one_lwp): Adjust.
2038 (fetch_register): Add regcache parameter. Adjust.
2039 (usr_store_inferior_registers): Ditto.
2040 (regsets_fetch_inferior_registers): Ditto.
2041 (regsets_store_inferior_registers): Ditto.
2042 (linux_fetch_registers, linux_store_registers): Ditto.
2043 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2044 regcache. Adjust.
2045 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2046 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2047 prototype to take a regcache.
2048 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2049 * remote-utils.c (convert_ascii_to_int, outreg)
2050 (prepare_resume_reply): Change prototype to take a regcache.
2051 Adjust.
2052 * target.h (struct target_ops) <fetch_registers, store_registers>:
2053 Change prototype to take a regcache.
2054 (fetch_inferior_registers, store_inferior_registers): Change
2055 prototype to take a regcache. Adjust.
2056 * proc-service.c (ps_lgetregs): Adjust.
2057 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2058 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2059 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2060 take a regcache. Adjust.
2061 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2062 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2063 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2064 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2065 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2066 (cris_cannot_fetch_register):
2067 (cris_breakpoint_at): Change prototype to take a regcache.
2068 Adjust.
2069 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2070 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2071 to take a regcache. Adjust.
2072 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2073 Adjust.
2074 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2075 take a regcache. Adjust.
2076 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2077 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2078 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2079 * linux-mips-low.c (mips_get_pc):
2080 (mips_set_pc): Change prototype to take a regcache. Adjust.
2081 (mips_reinsert_addr): Adjust.
2082 (mips_collect_register): Change prototype to take a regcache.
2083 Adjust.
2084 (mips_supply_register):
2085 (mips_collect_register_32bit, mips_supply_register_32bit)
2086 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2087 (mips_store_fpregset): Ditto.
2088 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2089 Ditto.
2090 (parse_spufs_run): Adjust.
2091 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2092 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2093 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2094 take a regcache. Adjust.
2095 * linux-s390-low.c (s390_collect_ptrace_register)
2096 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2097 (s390_set_pc): Change prototype to take a regcache. Adjust.
2098 (s390_arch_setup): Adjust.
2099 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2100 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2101 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2102 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2103 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2104 regcache. Adjust.
2105 (sparc_breakpoint_at): Adjust.
2106 * linux-xtensa-low.c (xtensa_fill_gregset):
2107 (xtensa_store_gregset):
2108 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2109 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2110 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2111 prototype to take a regcache. Adjust.
2112 * win32-arm-low.c (arm_fetch_inferior_register)
2113 (arm_store_inferior_register): Change prototype to take a
2114 regcache. Adjust.
2115 * win32-i386-low.c (i386_fetch_inferior_register)
2116 (i386_store_inferior_register): Change prototype to take a
2117 regcache. Adjust.
2118 * win32-low.c (child_fetch_inferior_registers)
2119 (child_store_inferior_registers): Change prototype to take a
2120 regcache. Adjust.
2121 (win32_wait): Adjust.
2122 (win32_fetch_inferior_registers): Change prototype to take a
2123 regcache. Adjust.
2124 (win32_store_inferior_registers): Adjust.
2125 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2126 store_inferior_register>: Change prototype to take a regcache.
2127
60c3d7b0
DE
21282010-01-20 Doug Evans <dje@google.com>
2129
2130 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2131 #ifdef.
2132 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 2133 (W_STOPCODE): Provide definition if missing.
60c3d7b0 2134
dc146f7c
VP
21352010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2136
2137 * linux-low.c (linux_core_of_thread): New.
2138 (compare_ints, show_process, list_threads): New.
2139 (linux_qxfer_osdata): Report threads and cores.
2140 (linux_target_op): Register linux_core_of_thread.
2141 * remote-utils.c (prepare_resume_reply): Report the core.
2142 (buffer_xml_printf): Support %d specifier.
2143 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2144 New.
2145 (handle_query): Handle qXfer:threads. Announce availability
2146 thereof.
2147 * target.h (struct target_ops): New field core_of_thread.
2148
7803799a
UW
21492010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2150
2151 * Makefile.in (clean): Remove new generated files.
2152 (reg-s390.o, reg-s390.c): Remove rules.
2153 (reg-s390x.o, reg-s390x.c): Likewise.
2154 (s390-linux32.o, s390-linux32.c): Add rules.
2155 (s390-linux64.o, s390-linux64.c): Likewise.
2156 (s390x-linux64.o, s390x-linux64.c): Likewise.
2157 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2158 * linux-s390-low.c: Include <elf.h>.
2159 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2160 (init_registers_s390): Remove prototype.
2161 (init_registers_s390x): Likewise.
2162 (init_registers_s390_linux32): Add prototype.
2163 (init_registers_s390_linux64): Likewise.
2164 (init_registers_s390x_linux64): Likewise.
2165 (s390_num_regs_3264): New define.
2166 (s390_regmap_3264): New global variable.
2167 (s390_cannot_fetch_register): Remove obsolete check.
2168 (s390_cannot_store_register): Likewise.
2169 (s390_collect_ptrace_register): Handle upper/lower register halves.
2170 (s390_supply_ptrace_register): Likewise.
2171 (s390_fill_gregset): Update to register number changes.
2172 (s390_get_hwcap): New routine.
2173 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2174 Install appropriate regmap and register set.
2175
6e7ffa39
JB
21762010-01-01 Joel Brobecker <brobecker@adacore.com>
2177
2178 * server.c (gdbserver_version): Update copyright year to 2010.
2179 * gdbreplay.c (gdbreplay_version): Likewise.
2180
957f3f49
DE
21812009-12-28 Doug Evans <dje@google.com>
2182
2183 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2184 elf/external.h. Include <elf.h> instead but only if necessary.
2185
ca5c370d
PA
21862009-12-28 Pedro Alves <pedro@codesourcery.com>
2187
2188 * linux-low.c (linux_remove_process): Remove `detaching'
2189 parameter. Don't release/detach from thread_db here.
2190 (linux_kill): Release/detach from thread_db here, ...
2191 (linux_detach): ... and here, before actually detaching.
2192 (linux_wait_1): ... and here, when a process exits.
2193 * thread-db.c (any_thread_of): New.
2194 (thread_db_free): Switch the current inferior to a thread of the
2195 passed in process.
2196
4ee62156
DE
21972009-12-21 Doug Evans <dje@google.com>
2198
d90e6a88
DE
2199 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2200
c5f62d5f
DE
2201 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2202 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2203 warning ifndef __NR_tkill. Move setting of errno there too.
2204 Delete unnecessary resetting of errno after syscall.
2205 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2206
10e86dd7
DE
2207 * configure.ac: Check for dladdr.
2208 * config.in: Regenerate.
2209 * configure: Regenerate.
2210 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2211 (try_thread_db_load): Update.
2212
4ee62156
DE
2213 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2214
00f515da
DE
22152009-12-18 Doug Evans <dje@google.com>
2216
e9464885
DE
2217 * event-loop.c: Include unistd.h if it exists.
2218
07d4f67e
DE
2219 * linux-low.c (my_waitpid): Move definition away from being in
2220 between linux_tracefork_child/linux_test_for_tracefork.
2221
00f515da
DE
2222 * gdb_proc_service.h (psaddr_t): Fix type.
2223 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2224 signature to match glibc.
2225
1de1badb
DE
22262009-12-16 Doug Evans <dje@google.com>
2227
2228 * linux-low.c (linux_read_memory): Fix argument to read.
2229
aeeb81d1
PA
22302009-11-26 Pedro Alves <pedro@codesourcery.com>
2231
2232 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2233 events, don't leave current_inferior pointing at null.
2234
10357975
PA
22352009-11-26 Pedro Alves <pedro@codesourcery.com>
2236
2237 * win32-low.c (LOG): Delete.
2238 (OUTMSG): Output to stderr.
2239 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2240 on compile time LOG macro.
2241 (win32_wait): Fix debug output.
2242
cf6e3471
PA
22432009-11-26 Pedro Alves <pedro@codesourcery.com>
2244
2245 * win32-low.c (win32_add_one_solib): If the dll name is
2246 "ntdll.dll", prepend the system directory to the dll path.
2247
0c85e18e
MK
22482009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2249
2250 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2251
9ac544ce 22522009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 2253 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
2254
2255 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2256 * configure.ac: Check for __mcoldfire__ and set
2257 gdb_cv_m68k_is_coldfire.
2258 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2259 reg-cf.o and reg-m68k.o.
2260 * configure: Regenerated.
2261
fd7dd3e6
PA
22622009-11-16 Pedro Alves <pedro@codesourcery.com>
2263
2264 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2265 Pass it to thread_db_free.
2266 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2267 proper `detaching' argument to linux_remove_process.
2268 * linux-low.h (thread_db_free): Add `detaching' parameter.
2269 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2270 to thread_db_free.
2271 (thread_db_free): Add `detaching' parameter. Only
2272 call td_ta_clear_event if detaching from process.
2273
75aa492e
MK
22742009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2275
2276 * thread-db.c (thread_db_free): Fix typo.
2277
21e1bee4
PP
22782009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2279
2280 PR gdb/10838
2281 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2282
8838b45e
NS
22832009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2284
2285 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2286 with an i686 compiler.
2287 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2288 needed.
2289 * configure: Rebuilt.
2290
8a35fb51
SL
22912009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2292
2293 PR gdb/10783
2294
2295 * server.c (handle_search_memory_1): Correct read_addr initialization
2296 in loop for searching subsequent chunks.
2297
96f15937
PP
22982009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2299
2300 * configure.ac: New --with-libthread-db option.
2301 * thread-db.c: Allow direct dependence on libthread_db.
2302 (thread_db_free): Adjust.
2303 * config.in: Regenerate.
2304 * configure: Likewise.
889bf7c5 2305
5f7d1694
PP
23062009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2307
2308 PR gdb/10757
2309 * thread-db.c (attach_thread): New function.
2310 (maybe_attach_thread): Return success/failure.
2311 (find_new_threads_callback): Adjust.
889bf7c5
PA
2312 (thread_db_find_new_threads): Loop until no new threads.
2313
88e3b899
PA
23142009-10-13 Pedro Alves <pedro@codesourcery.com>
2315
2316 * proc-service.c (ps_lgetregs): Formatting.
2317
cdbfd419
PP
23182009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2319
2320 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2321 * configure.ac: Adjust.
2322 * linux-low.h (struct process_info_private): Move members to struct
2323 thread_db.
2324 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2325 * linux-low.c (linux_remove_process): Adjust.
2326 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2327 * server.c (handle_query): Move code ...
2328 (handle_monitor_command): ... here. New function.
2329 * target.h (struct target_ops): New member.
2330 * thread-db.c (struct thread_db): New.
2331 (libthread_db_search_path): New variable.
2332 (thread_db_create_event, thread_db_enable_reporting)
2333 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2334 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2335 (try_thread_db_load_1, dladdr_to_soname): New functions.
2336 (try_thread_db_load, thread_db_load_search): New functions.
2337 (thread_db_init): Search for libthread_db.
2338 (thread_db_free): New function.
2339 (thread_db_handle_monitor_command): Likewise.
2340 * config.in: Regenerate.
2341 * configure: Regenerate.
889bf7c5 2342
4168d2d6
UW
23432009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2344
2345 * spu-low.c (spu_kill): Wait for inferior to terminate.
2346 Call clear_inferiors.
2347 (spu_detach): Call clear_inferiors.
2348
81ecdfbb
RW
23492009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2350
2351 * aclocal.m4: Regenerate.
2352 * config.in: Likewise.
2353 * configure: Likewise.
2354
0b9ff2c0
UW
23552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2356
2357 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2358 (parse_spufs_run): New function.
2359 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2360 (ppc_breakpoint_at): Handle SPU breakpoints.
2361
efcbbd14
UW
23622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2363
2364 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2365 (SPUFS_MAGIC): Define.
2366 (spu_enumerate_spu_ids): New function.
2367 (linux_qxfer_spu): New function.
2368 (linux_target_ops): Install linux_qxfer_spu.
2369
f4d9bade
UW
23702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2371
2372 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2373 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2374 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2375 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2376 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2377 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2378 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2379 (init_registers_powerpc_cell32l): Add prototype.
2380 (init_registers_powerpc_cell64l): Likewise.
2381 (ppc_arch_setup): Detect Cell/B.E. architecture.
2382
96e946ca
RW
23832009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2384
2385 * Makefile.in (datarootdir): New variable.
2386
58d6951d
DJ
23872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2388
2389 * linux-low.c (linux_write_memory): Update debugging output.
2390 * Makefile.in (clean): Add new descriptions.
2391 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2392 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2393 * configure.srv: Add new files for arm*-*-linux*.
2394 * linux-arm-low.c: Add new declarations.
2395 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2396 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2397 (HWCAP_VFPv3D16): New.
2398 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2399 instead of __IWMMXT__.
2400 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2401 (arm_arch_setup): New.
2402 (target_regsets): Remove #ifdef. Add VFP regset.
2403 (the_low_target): Use arm_arch_setup.
2404
12b42a12
DJ
24052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2406
2407 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2408 the main thread again.
2409
ac8c974e
AR
24102009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2411
2412 Adding Neutrino gdbserver.
2413 * configure: Regenerated.
2414 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2415 * configure.srv (i[34567]86-*-nto*): New target.
2416 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2417 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2418 (nto_comctrl) [__QNX__]: New function.
2419 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2420
4424e0c3 24212009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
2422
2423 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2424 srv_tgtobj.
2425
912cf4ba
PA
24262009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2427 Pedro Alves <pedro@codesourcery.com>
2428
2429 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2430 don't support CONTEXT_EXTENDED_REGISTERS.
2431 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2432 (the_low_target): Install them.
2433 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2434 failing with ERROR_PIPE_NOT_CONNECTED.
2435
aa5ca48f
DE
24362009-06-30 Doug Evans <dje@google.com>
2437 Pierre Muller <muller@ics.u-strasbg.fr>
2438
2439 Add h/w watchpoint support to x86-linux, win32-i386.
2440 * Makefile.in (SFILES): Add i386-low.c
2441 (i386_low_h): Define.
2442 (i386-low.o): Add dependencies.
2443 (linux-x86-low.o): Add i386-low.h dependency.
2444 (win32-i386-low.o): Ditto.
2445 * i386-low.c: New file.
2446 * i386-low.h: New file.
2447 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2448 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2449 * linux-low.c (linux_add_process): Initialize arch_private.
2450 (linux_remove_process): Free arch_private.
2451 (add_lwp): Initialize arch_private.
2452 (delete_lwp): Free arch_private.
2453 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2454 provided.
2455 * linux-low.h (process_info_private): New member arch_private.
2456 (lwp_info): New member arch_private.
2457 (linux_target_ops): New members new_process, new_thread,
2458 prepare_to_resume.
2459 (ptid_of): New macro.
2460 * linux-x86-low.c: Include stddef.h, i386-low.h.
2461 (arch_process_info): New struct.
2462 (arch_lwp_info): New struct.
2463 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2464 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2465 (i386_dr_low_get_status): New function.
2466 (x86_insert_point, x86_remove_point): New functions.
2467 (x86_stopped_by_watchpoint): New function.
2468 (x86_stopped_data_address): New function.
2469 (x86_linux_new_process, x86_linux_new_thread): New functions.
2470 (x86_linux_prepare_to_resume): New function.
2471 (the_low_target): Add entries for insert_point, remove_point,
2472 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2473 prepare_to_resume.
2474 * server.c (debug_hw_points): New global.
2475 (monitor_show_help): Document set debug-hw-points.
2476 (handle_query): Process "set debug-hw-points".
2477 * server.h (debug_hw_points): Declare.
2478 (paddress): Declare.
2479 * utils.c (NUMCELLS, CELLSIZE): New macros.
2480 (get_sell, xsnprintf, paddress): New functions.
2481 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2482 remove_point, stopped_by_watchpoint, stopped_data_address.
2483 * win32-i386-low.c: Include i386-low.h.
2484 (debug_reg_state): Replaces dr.
2485 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2486 (i386_dr_low_get_status): New function.
2487 (i386_insert_point, i386_remove_point): New functions.
2488 (i386_stopped_by_watchpoint): New function.
2489 (i386_stopped_data_address): New function.
2490 (i386_initial_stuff): Update.
2491 (get_thread_context,set_thread_context,i386_thread_added): Update.
2492 (the_low_target): Add entries for insert_point,
2493 remove_point, stopped_by_watchpoint, stopped_data_address.
2494 * win32-low.c (win32_insert_watchpoint): New function.
2495 (win32_remove_watchpoint): New function.
2496 (win32_stopped_by_watchpoint): New function.
2497 (win32_stopped_data_address): New function.
2498 (win32_target_ops): Add entries for insert_watchpoint,
2499 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2500 * win32-low.h (win32_target_ops): New members insert_point,
2501 remove_point, stopped_by_watchpoint, stopped_data_address.
2502
d993e290
PA
25032009-06-25 Pedro Alves <pedro@codesourcery.com>
2504
2505 * server.c (process_serial_event): Re-return unsupported, not
2506 error, if the type isn't recognized. Re-allow supporting only
2507 insert or remove packets. Also call require_running for
2508 breakpoints. Add missing break statement to default case. Tidy.
2509 * target.h (struct target_ops): Rename insert_watchpoint to
2510 insert_point, and remove_watchpoint to remove_point.
2511
2512 * linux-low.h (struct linux_target_ops): Likewise.
2513 * linux-low.c (linux_insert_watchpoint): Rename to ...
2514 (linux_insert_point): ... this. Adjust.
2515 (linux_remove_watchpoint): Rename to ...
2516 (linux_remove_point): ... this. Adjust.
2517 (linux_target_ops): Adjust.
2518 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2519 (cris_insert_point): ... this.
2520 (cris_remove_watchpoint): Rename to ...
2521 (cris_remove_point): ... this.
2522 (the_low_target): Adjust.
2523
0f54c268
PM
25242009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2525
2526 * server.c (handle_v_kill): Pass signal_pid to
2527 kill_inferior if multi_process is zero.
2528
c6314022
AR
25292009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2530
2531 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2532 * target.h (target_ops): Comment for *_watchpoint to make it clear
2533 the functions can get types '0' and '1'.
2534
4463ce24
AR
25352009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2536
2537 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2538 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2539 * regcache.c (get_regcache): Likewise.
2540 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2541 * win32-low.c (child_fetch_inferior_registers): Remove check for
2542 regno 0.
2543
cf8fd78b
PA
25442009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2545 Pedro Alves <pedro@codesourcery.com>
2546
2547 * target.h (struct target_ops) <supports_multi_process>: New
2548 callback.
2549 (target_supports_multi_process): New.
2550 * server.c (handle_query): Even if GDB reports support, only
2551 enable multi-process if the target also supports it. Report
2552 multi-process support only if the target backend supports it.
2553 * linux-low.c (linux_supports_multi_process): New function.
2554 (linux_target_ops): Install it as target_supports_multi_process
2555 callback.
2556
47c0c975
DE
25572009-05-24 Doug Evans <dje@google.com>
2558
e09875d4
DE
2559 Global renaming of find_thread_pid to find_thread_ptid.
2560 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2561 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2562 All callers updated.
2563
e27d73f6
DE
2564 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2565 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2566 directly.
2567
47c0c975
DE
2568 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2569 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2570 (linux_resume_one_lwp): Ditto.
2571
2acc282a
DE
25722009-05-23 Doug Evans <dje@google.com>
2573
2574 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2575 from struct inferior_list_entry * to struct lwp_info *.
2576 All callers updated.
2577
9f1036c1
DE
25782009-05-13 Doug Evans <dje@google.com>
2579
2580 * linux-x86-low.c: Don't include assert.h.
2581 (x86_siginfo_fixup): Use fatal, not assert.
2582 (x86_arch_setup): Fix comment.
2583
d0722149
DE
25842009-05-12 Doug Evans <dje@google.com>
2585
2586 Biarch support for i386/amd64 gdbserver.
2587 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2588 Add linux-x86-low.c.
2589 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2590 (linux-x86-low.o): Add.
2591 * linux-x86-64-low.c: Delete.
2592 * linux-i386-low.c: Delete.
2593 * linux-x86-low.c: New file.
2594 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2595 linux-x86-low.o.
2596 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2597 linux-x86-low.o.
2598 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2599 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2600 (linux_child_pid_to_exec_file): New function.
2601 (elf_64_header_p, elf_64_file_p): New functions.
2602 (siginfo_fixup): New function.
2603 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2604 give target a chance to convert layout.
2605 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2606 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2607
fdeb2a12
DE
26082009-05-07 Doug Evans <dje@google.com>
2609
2610 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2611 (regsets_store_inferior_registers): Ditto.
2612
a6dbe5df
PA
26132009-05-06 Pedro Alves <pedro@codesourcery.com>
2614
2615 PR server/10048
2616
2617 * linux-low.c (must_set_ptrace_flags): Delete.
2618 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2619 of the global.
2620 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2621 `lwp->must_set_ptrace_flags' instead.
ba42693b 2622 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
2623 (linux_wait_1): ... not here.
2624
5091eb23
DE
26252009-04-30 Doug Evans <dje@google.com>
2626
9f767825
DE
2627 * inferiors.c (started_inferior_callback): New function.
2628 (attached_inferior_callback): New function.
2629 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2630 * server.c (print_started_pid, print_attached_pid): New functions.
2631 (detach_or_kill_for_exit): New function.
2632 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2633 * server.h (have_started_inferiors_p): Declare.
2634 (have_attached_inferiors_p): Declare.
2635
5091eb23
DE
2636 * inferiors.c (remove_process): Fix memory leak, free process.
2637 * linux-low.c (linux_remove_process): New function.
2638 (linux_kill): Call it instead of remove_process.
2639 (linux_detach, linux_wait_1): Ditto.
2640
155c8968
PA
26412009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2642
2643 * configure.srv: Add x86 Windows CE target.
2644
7fe519cb
UW
26452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2646
2647 * inferiors.c (get_thread_process): Make global.
2648 * server.h (get_thread_process): Add prototype.
2649 * thread-db.c (find_one_thread): Use get_thread_process
2650 instead of current_process.
2651 (thread_db_get_tls_address): Do not crash if called when
2652 thread layer is not yet initialized.
2653
5472f405
UW
26542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2655
2656 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2657 * spu-low.c (current_tid): Rename to ...
2658 (current_ptid): ... this.
2659 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2660 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2661 ptid_get_lwp (current_ptid) instead of current_tid.
2662 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2663 instead of current_tid. Use find_process_pid to verify pid
2664 argument is valid. Pass proper argument to remove_process.
2665 (spu_thread_alive): Compare current_ptid instead of current_tid.
2666 (spu_resume): Likewise.
2667
55ac2b99
PA
26682009-04-02 Pedro Alves <pedro@codesourcery.com>
2669
2670 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2671 variable.
2672
95954743
PA
26732009-04-01 Pedro Alves <pedro@codesourcery.com>
2674
2675 Implement the multiprocess extensions, and add linux multiprocess
2676 support.
2677
2678 * server.h (ULONGEST): Declare.
2679 (struct ptid, ptid_t): New.
2680 (minus_one_ptid, null_ptid): Declare.
2681 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2682 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2683 (struct inferior_list_entry): Change `id' type from unsigned from
2684 to ptid_t.
2685 (struct sym_cache, struct breakpoint, struct
2686 process_info_private): Forward declare.
2687 (struct process_info): Declare.
2688 (current_process): Declare.
2689 (all_processes): Declare.
2690 (initialize_inferiors): Declare.
2691 (add_thread): Adjust to use ptid_t.
2692 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2693 (add_process, remove_process, find_thread_pid): Declare.
2694 (find_inferior_id): Adjust to use ptid_t.
2695 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2696 (multi_process): Declare.
2697 (push_event): Adjust to use ptid_t.
2698 (read_ptid, write_ptid): Declare.
2699 (prepare_resume_reply): Adjust to use ptid_t.
2700 (clear_symbol_cache): Declare.
2701 * inferiors.c (all_processes): New.
2702 (null_ptid, minus_one_ptid): New.
2703 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2704 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2705 (add_thread): Change unsigned long to ptid. Remove gdb_id
2706 parameter. Adjust.
2707 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2708 (gdb_id_to_thread): Rename to ...
2709 (find_thread_pid): ... this. Change unsigned long to ptid.
2710 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2711 (loaded_dll, pull_pid_from_list): Adjust.
2712 (add_process, remove_process, find_process_pid)
2713 (get_thread_process, current_process, initialize_inferiors): New.
2714 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2715 (struct target_waitstatus) <related_pid>: Ditto.
2716 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2717 return type to int.
2718 (struct target_ops) <join>: Add `pid' argument.
2719 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2720 (struct target_ops) <wait>: Add `ptid' field. Change return type
2721 to ptid.
2722 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2723 (mywait): Add `ptid' argument. Change return type to ptid_t.
2724 (target_pid_to_str): Declare.
2725 * target.c (set_desired_inferior): Adjust to use ptids.
2726 (mywait): Add new `ptid' argument. Adjust.
2727 (target_pid_to_str): New.
2728 * mem-break.h (free_all_breakpoints): Declare.
2729 * mem-break.c (breakpoints): Delelete.
2730 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2731 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2732 to use per-process breakpoint list.
2733 (free_all_breakpoints): New.
2734 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2735 (symbol_cache, all_symbols_looked_up): Delete.
2736 (hexchars): New.
2737 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2738 read_ptid): New.
2739 (prepare_resume_reply): Change ptid argument's type from unsigned
2740 long to ptid_t. Adjust. Implement W;process and X;process.
2741 (free_sym_cache, clear_symbol_cache): New.
2742 (look_up_one_symbol): Adjust to per-process symbol cache. *
2743 * server.c (cont_thread, general_thread, step_thread): Change type
2744 to ptid_t.
2745 (attached): Delete.
2746 (multi_process): New.
2747 (last_ptid): Change type to ptid_t.
2748 (struct vstop_notif) <ptid>: Change type to ptid_t.
2749 (queue_stop_reply, push_event): Change `ptid' argument's type to
2750 ptid_t.
2751 (discard_queued_stop_replies): Add `pid' argument.
2752 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2753 changes. Don't reference the `attached' global.
2754 (attach_inferior): Adjust to mywait interface changes.
2755 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2756 features. Handle and report "multiprocess+". Handle
2757 "qAttached:PID".
2758 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2759 changes.
2760 (handle_v_kill): New.
2761 (handle_v_stopped): Adjust to use target_pid_to_str.
2762 (handle_v_requests): Allow multiple attaches and runs when
2763 multiprocess extensions are in effect. Handle "vKill".
2764 (myresume): Adjust to use ptids.
2765 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2766 (handle_status): Adjust to discard_queued_stop_replies interface
2767 change.
2768 (first_thread_of, kill_inferior_callback)
2769 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2770 (main): Call initialize_inferiors. Adjust to use ptids, killing
2771 and detaching from all inferiors. Handle multiprocess packet
2772 variants.
2773 * linux-low.h: Include gdb_proc_service.h.
2774 (struct process_info_private): New.
2775 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2776 <lwpid_of>: Use ptid_get_lwp.
2777 (get_lwp_thread): Adjust.
2778 (struct lwp_info): Add `dead' member.
2779 (find_lwp_pid): Declare.
2780 * linux-low.c (thread_db_active): Delete.
2781 (new_inferior): Adjust comment.
2782 (inferior_pid): Delete.
2783 (linux_add_process): New.
2784 (handle_extended_wait): Adjust.
2785 (add_lwp): Change unsigned long to ptid.
2786 (linux_create_inferior): Add process to processes table. Adjust
2787 to use ptids. Don't set new_inferior here.
2788 (linux_attach_lwp): Rename to ...
2789 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2790 it. Adjust to use ptids.
2791 (linux_attach_lwp): New.
2792 (linux_attach): Add process to processes table. Don't set
2793 new_inferior here.
2794 (struct counter): New.
2795 (second_thread_of_pid_p, last_thread_of_process_p): New.
2796 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2797 multiple processes.
2798 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2799 processes. Remove process from process table.
2800 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2801 to multiple processes.
2802 (any_thread_of): New.
2803 (linux_detach): Add `pid' argument, and handle it. Remove process
2804 from processes table.
2805 (linux_join): Add `pid' argument. Handle it.
2806 (linux_thread_alive): Change unsighed long argument to ptid_t.
2807 Consider dead lwps as not being alive.
2808 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2809 threads we're not interested in.
2810 (same_lwp, find_lwp_pid): New.
2811 (linux_wait_for_lwp): Change `pid' argument's type from int to
2812 ptid_t. Adjust.
2813 (linux_wait_for_event): Rename to ...
2814 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2815 from int to ptid_t. Adjust.
2816 (linux_wait_for_event): New.
2817 (linux_wait_1): Add `ptid' argument. Change return type to
2818 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2819 that exit from the process table.
2820 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2821 Adjust.
2822 (mark_lwp_dead): New.
2823 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2824 stopping all threads, mark its main lwp as dead.
2825 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2826 ptids.
2827 (fetch_register, usr_store_inferior_registers)
2828 (regsets_fetch_inferior_registers)
2829 (regsets_store_inferior_registers, linux_read_memory)
2830 (linux_write_memory): Inline `inferior_pid'.
2831 (linux_look_up_symbols): Adjust to use per-process
2832 `thread_db_active'.
2833 (linux_request_interrupt): Adjust to use ptids.
2834 (linux_read_auxv): Inline `inferior_pid'.
2835 (initialize_low): Don't reference thread_db_active.
2836 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2837 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2838 (ps_getpid): Return the pid of the current inferior.
2839 * thread-db.c (proc_handle, thread_agent): Delete.
2840 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2841 per-process data.
2842 (find_one_thread): Change argument type to ptid_t. Adjust to
2843 per-process data.
2844 (maybe_attach_thread): Adjust to per-process data and ptids.
2845 (thread_db_find_new_threads): Ditto.
2846 (thread_db_init): Ditto.
2847 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2848 processes table. Adjust to use ptids.
2849 (spu_kill, spu_detach): Adjust interface. Remove process from
2850 processes table.
2851 (spu_join, spu_thread_alive): Adjust interface.
2852 (spu_wait): Adjust interface. Remove process from processes
2853 table. Adjust to use ptids.
2854 * win32-low.c (current_inferior_tid): Delete.
2855 (current_inferior_ptid): New.
2856 (debug_event_ptid): New.
2857 (thread_rec): Take a ptid. Adjust.
2858 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2859 (child_delete_thread): Ditto.
2860 (do_initial_child_stuff): Add `attached' argument. Add process to
2861 processes table.
2862 (child_fetch_inferior_registers, child_store_inferior_registers):
2863 Adjust.
2864 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2865 (win32_attach): Pass 1 to do_initial_child_stuff.
2866 (win32_kill): Adjust interface. Remove process from processes
2867 table.
2868 (win32_detach): Ditto.
2869 (win32_join): Adjust interface.
2870 (win32_thread_alive): Take a ptid.
2871 (win32_resume): Adjust to use ptids.
2872 (get_child_debug_event): Ditto.
2873 (win32_wait): Adjust interface. Remove exiting process from
2874 processes table.
2875
bd99dc85
PA
28762009-04-01 Pedro Alves <pedro@codesourcery.com>
2877
2878 Non-stop mode support.
2879
2880 * server.h (non_stop): Declare.
2881 (gdb_client_data, handler_func): Declare.
2882 (delete_file_handler, add_file_handler, start_event_loop):
2883 Declare.
2884 (handle_serial_event, handle_target_event, push_event)
2885 (putpkt_notif): Declare.
2886 * target.h (enum resume_kind): New.
2887 (struct thread_resume): Replace `step' field by `kind' field.
2888 (TARGET_WNOHANG): Define.
2889 (struct target_ops) <wait>: Add `options' argument.
2890 <supports_non_stop, async, start_non_stop>: New fields.
2891 (target_supports_non_stop, target_async): New.
2892 (start_non_stop): Declare.
2893 (mywait): Add `options' argument.
2894 * target.c (mywait): Add `options' argument. Print child exit
2895 notifications here.
2896 (start_non_stop): New.
2897 * server.c (non_stop, own_buf, mem_buf): New globals.
2898 (struct vstop_notif): New.
2899 (notif_queue): New global.
2900 (queue_stop_reply, push_event, discard_queued_stop_replies)
2901 (send_next_stop_reply): New.
2902 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2903 interface changes.
2904 (attach_inferior): In non-stop mode, don't wait for the target
2905 here.
2906 (handle_general_set): Handle QNonStop.
2907 (handle_query): When handling qC, return the current general
2908 thread, instead of the first thread of the list.
2909 (handle_query): If the backend supports non-stop mode, include
2910 QNonStop+ in the qSupported query response.
2911 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2912 and non-stop mode.
2913 (handle_v_attach, handle_v_run): Handle non-stop mode.
2914 (handle_v_stopped): New.
2915 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2916 (myresume): Adjust to use resume_kind. Handle non-stop.
2917 (queue_stop_reply_callback): New.
2918 (handle_status): Handle non-stop mode.
2919 (main): Clear non_stop flag on reconnection. Use the event-loop.
2920 Refactor serial protocol handling from here ...
2921 (process_serial_event): ... to this new function. When GDB
2922 selects any thread, select one here. In non-stop mode, wait until
2923 GDB acks all pending events before exiting.
2924 (handle_serial_event, handle_target_event): New.
2925 * remote-utils.c (remote_open): Install remote_desc in the event
2926 loop.
2927 (remote_close): Remove remote_desc from the event loop.
2928 (putpkt_binary): Rename to...
2929 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2930 (putpkt_binary): New as wrapper around putpkt_binary_1.
2931 (putpkt_notif): New.
2932 (prepare_resume_reply): In non-stop mode, don't change the
2933 general_thread.
2934 * event-loop.c: New.
2935 * Makefile.in (OBJ): Add event-loop.o.
2936 (event-loop.o): New rule.
2937
2938 * linux-low.h (pid_of): Moved here.
2939 (lwpid_of): New.
2940 (get_lwp_thread): Use lwpid_of.
2941 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2942 * linux-low.c (pid_of): Delete.
2943 (inferior_pid): Use lwpid_of.
2944 (linux_event_pipe): New.
2945 (target_is_async_p): New.
2946 (delete_lwp): New.
2947 (handle_extended_wait): Use lwpid_of.
2948 (add_lwp): Don't set lwpid field.
2949 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2950 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2951 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2952 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2953 first. Adjust to linux_wait_for_event interface changes. Use
2954 lwpid_of.
2955 (linux_detach): Don't delete the main lwp here.
2956 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2957 (status_pending_p): Don't consider explicitly suspended lwps.
2958 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2959 pointer. Add OPTIONS argument. Change return type to int. Use
2960 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2961 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2962 pointer. Add status pointer argument. Return a pid instead of a
2963 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2964 changes. In non-stop mode, don't switch to a random thread.
2965 (linux_wait): Rename to...
2966 (linux_wait_1): ... this. Add target_options argument, and handle
2967 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2968 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2969 clean exit and signal exit code. Don't stop all threads in
2970 non-stop mode. In all-stop mode, only stop all threads when
2971 reporting a stop to GDB. Handle explicit thread stop requests.
2972 (async_file_flush, async_file_mark): New.
2973 (linux_wait): New.
2974 (send_sigstop): Use lwpid_of.
2975 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2976 interface changes. In non-stop mode, don't switch to a random
2977 thread.
2978 (linux_resume_one_lwp): Use lwpid_of.
2979 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2980 (linux_resume_one_thread): ... this. Handle resume_stop. In
2981 non-stop mode, don't look for pending flag in all threads.
2982 (resume_status_pending_p): Don't consider explicitly suspended
2983 threads.
2984 (my_waitpid): Reimplement. Emulate __WALL.
2985 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2986 Use lwpid_of.
2987 (sigchld_handler, linux_supports_non_stop, linux_async)
2988 (linux_start_non_stop): New.
2989 (linux_target_ops): Register linux_supports_non_stop, linux_async
2990 and linux_start_non_stop.
2991 (initialize_low): Install SIGCHLD handler.
2992 * thread-db.c (thread_db_create_event, find_one_thread)
2993 (thread_db_get_tls_address): Use lwpid_of.
2994 * win32-low.c (win32_detach): Adjust to use resume_kind.
2995 (win32_wait): Add `options' argument.
2996 * spu-low.c (spu_resume): Adjust to use resume_kind.
2997 (spu_wait): Add `options' argument.
2998
5b1c542e
PA
29992009-04-01 Pedro Alves <pedro@codesourcery.com>
3000
3001 Decouple target code from remote protocol.
3002
3003 * target.h (enum target_waitkind): New.
3004 (struct target_waitstatus): New.
3005 (struct target_ops) <wait>: Return an unsigned long. Take a
3006 target_waitstatus pointer instead of a char pointer.
3007 (mywait): Likewise.
3008 * target.c (mywait): Change prototype to return an unsigned long.
3009 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3010 * server.h (thread_from_wait, old_thread_from_wait): Delete
3011 declarations.
3012 (prepare_resume_reply): Change prototype to take a
3013 target_waitstatus.
3014 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3015 (last_status, last_ptid): New.
3016 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3017 pid instead of a signal.
3018 (attach_inferior): Remove "status" and "signal" parameters.
3019 Adjust.
3020 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3021 not as an address.
3022 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3023 (handle_v_requests, myresume): Remove "status" and "signal"
3024 parameters. Adjust.
3025 (handle_status): New.
3026 (main): Delete local `status'. Adjust.
3027 * remote-utils.c: Include target.h.
3028 (prepare_resume_reply): Change prototype to take a
3029 target_waitstatus. Adjust.
3030
3031 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3032 interface.
3033 * spu-low.c (spu_wait): Adjust.
3034 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3035 Delete.
3036 (win32_wait): Adjust.
3037
2bd7c093
PA
30382009-04-01 Pedro Alves <pedro@codesourcery.com>
3039
3040 * target.h (struct thread_resume): Delete leave_stopped member.
3041 (struct target_ops): Add a `n' argument to the `resume' callback.
3042 * server.c (start_inferior): Adjust.
3043 (handle_v_cont, myresume): Adjust.
3044 * linux-low.c (check_removed_breakpoint): Adjust to resume
3045 interface change, and to removed leave_stopped field.
3046 (resume_ptr): Delete.
3047 (struct thread_resume_array): New.
3048 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3049 resume interface change.
3050 (linux_continue_one_thread, linux_queue_one_thread)
3051 (resume_status_pending_p): Check if the resume field is NULL
3052 instead of checking the leave_stopped member.
3053 (linux_resume): Adjust to the target resume interface change.
3054 * spu-low.c (spu_resume): Adjust to the target resume interface
3055 change.
3056 * win32-low.c (win32_detach, win32_resume): Ditto.
3057
c35fafde
PA
30582009-04-01 Pedro Alves <pedro@codesourcery.com>
3059
3060 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3061 flag.
3062 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3063 pending.
3064 (linux_continue_one_thread): Only preserve the stepping flag if
3065 there's a pending breakpoint.
3066
0a59d50b
PA
30672009-03-31 Pedro Alves <pedro@codesourcery.com>
3068
3069 * server.c (main): After the inferior having exited, call
3070 remote_close before exiting gdbserver.
3071
f04c6d38
TJB
30722009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3073
3074 Fix size of FPSCR in Power 7 processors.
3075 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3076 (PPC_FEATURE_HAS_DFP): New #define.
3077 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3078 size of the FPSCR.
3079
78e5cee6
PA
30802009-03-23 Pedro Alves <pedro@codesourcery.com>
3081
3082 * server.c (handle_query) Whitespace and formatting.
3083
1b3f6016
PA
30842009-03-22 Pedro Alves <pedro@codesourcery.com>
3085
3086 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3087 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3088 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3089 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3090 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3091 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3092 Makefile.in, configure.ac: Fix whitespace throughout.
3093 * configure: Regenerate.
3094
a07b2135
PA
30952009-03-22 Pedro Alves <pedro@codesourcery.com>
3096
3097 * inferiors.c (find_inferior): Make it safe for the callback
3098 function to delete the currently iterated inferior.
3099
67cc2626
PA
31002009-03-22 Pedro Alves <pedro@codesourcery.com>
3101
3102 * Makefile.in (linuw_low_h): Move higher.
3103 (thread-db.o): Depend on $(linux_low_h).
3104
54a0b537
PA
31052009-03-17 Pedro Alves <pedro@codesourcery.com>
3106
3107 Rename "process" to "lwp" throughout.
3108
3109 * linux-low.c (all_processes): Rename to...
3110 (all_lwps): ... this.
3111 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3112 (add_process): Rename to ...
3113 (add_lwp): ... this. Adjust.
3114 (linux_create_inferior): Adjust.
3115 (linux_attach_lwp): Adjust.
3116 (linux_attach): Adjust.
3117 (linux_kill_one_process): Rename to ...
3118 (linux_kill_one_lwp): ... this. Adjust.
3119 (linux_kill): Adjust.
3120 (linux_detach_one_process): Rename to ...
3121 (linux_detach_one_lwp): ... this. Adjust.
3122 (linux_detach): Adjust.
3123 (check_removed_breakpoint): Adjust.
3124 (status_pending_p): Adjust.
3125 (linux_wait_for_process): Rename to ...
3126 (linux_wait_for_lwp): ... this. Adjust.
3127 (linux_wait_for_event): Adjust.
3128 (send_sigstop): Adjust.
3129 (wait_for_sigstop): Adjust.
3130 (stop_all_processes): Rename to ...
3131 (stop_all_lwps): ... this.
3132 (linux_resume_one_process): Rename to ...
3133 (linux_resume_one_lwp): ... this. Adjust.
3134 (linux_set_resume_request, linux_continue_one_thread)
3135 (linux_queue_one_thread, resume_status_pending_p)
3136 (usr_store_inferior_registers, regsets_store_inferior_registers)
3137 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3138 Adjust.
3139 * linux-low.h (get_process): Rename to ...
3140 (get_lwp): ... this. Adjust.
3141 (get_thread_process): Rename to ...
3142 (get_thread_lwp): ... this. Adjust.
3143 (get_process_thread): Rename to ...
3144 (get_lwp_thread): ... this. Adjust.
3145 (struct process_info): Rename to ...
3146 (struct lwp_info): ... this.
3147 (all_processes): Rename to ...
3148 (all_lwps): ... this.
3149 * proc-service.c (ps_lgetregs): Adjust.
3150 * thread-db.c (thread_db_create_event, find_one_thread)
3151 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3152
0b16c5cf
PA
31532009-03-14 Pedro Alves <pedro@codesourcery.com>
3154
3155 * server.c (handle_query): Handle "qAttached".
3156
32de4b9d
NS
31572009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3158
3159 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3160 GPLv3, update license URL.
3161
2aecd87f
DE
31622009-03-01 Doug Evans <dje@google.com>
3163
93efd302 3164 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
3165 (server_h): Add gdb_signals.h.
3166 (signals.o): Update.
3167 * server.h (target_signal_from_host,target_signal_to_host_p)
3168 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3169
86b1f9c5
PM
31702009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3171
3172 * remote-utils.c (getpkt): Also generate remote-debug
3173 information if noack_mode is set.
3174
4aa995e1
PA
31752009-02-06 Pedro Alves <pedro@codesourcery.com>
3176
3177 * server.c (handle_query): Report qXfer:siginfo:read and
3178 qXfer:siginfo:write as supported and handle them.
3179 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3180 * linux-low.c (linux_xfer_siginfo): New.
3181 (linux_target_ops): Set it.
3182
62709adf
PA
31832009-01-26 Pedro Alves <pedro@codesourcery.com>
3184
3185 * server.c (gdbserver_usage): Mention --remote-debug.
3186 (main): Accept '--remote-debug' switch.
3187
aef93bd7
DE
31882009-01-18 Doug Evans <dje@google.com>
3189
3190 * regcache.c (new_register_cache): No need to check result of xcalloc.
3191 * server.c (handle_search_memory): Back out calls to xmalloc,
3192 result is checked and error is returned to user upon failure.
3193 (handle_query): Ditto. Add more checks for result of malloc.
3194 (handle_v_cont): Check result of malloc, report error back to
3195 user upon failure.
3196 (handle_v_run): Ditto. Call freeargv.
3197 * server.h (freeargv): Declare.
3198 * utils.c (freeargv): New fn.
3199
54363045
DE
32002009-01-15 Doug Evans <dje@google.com>
3201
f626972c
DE
3202 * gdbreplay.c (perror_with_name): Make arg const char *.
3203 * server.h (target_signal_to_name): Make return type const char *.
0842e787 3204 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 3205 * utils.c (perror_with_name): Make arg const char *.
54363045 3206
18aae699
PA
32072009-01-14 Pedro Alves <pedro@codesourcery.com>
3208
3209 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3210 when handling a EXIT_PROCESS_DEBUG_EVENT.
3211
ff703abe
JB
32122009-01-06 Joel Brobecker <brobecker@adacore.com>
3213
3214 * gdbreplay.c (gdbreplay_version): Update copyright year.
3215 * server.c (gdbserver_version): Likewise.
3216
f21cc1a2 32172009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
3218
3219 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 3220 (handle_extended_wait): Improve comment.
0e21c1ec 3221
bca929d3
DE
32222008-12-13 Doug Evans <dje@google.com>
3223
3224 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3225 * server.h (ATTR_MALLOC): New macro.
3226 (xmalloc,xcalloc,xstrdup): Declare.
3227 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3228 * inferiors.c: Ditto.
3229 * linux-low.c: Ditto.
3230 * mem-break.c: Ditto.
3231 * regcache.c: Ditto.
3232 * remote-utils.c: Ditto.
3233 * server.c: Ditto.
3234 * target.c: Ditto.
3235 * win32-low.c: Ditto.
3236
97438e3f
DE
32372008-12-12 Doug Evans <dje@google.com>
3238
896c7fbb
DE
3239 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3240 in debugging printf.
3241
97438e3f
DE
3242 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3243
e3b886f8
DE
32442008-12-09 Doug Evans <dje@google.com>
3245
3246 * linux-low.h (struct process_info): Delete member tid, unused.
3247 * thread-db.c (find_one_thread): Update.
3248 (maybe_attach_thread): Update.
3249
07e059b5
VP
32502008-12-02 Pedro Alves <pedro@codesourcery.com>
3251
889bf7c5
PA
3252 * target.h (struct target_ops): Add qxfer_osdata member.
3253 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3254 and dirent.h.
3255 (linux_qxfer_osdata): New functions.
3256 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3257 callback.
3258 * server.c (handle_query): Handle "qXfer:osdata:read:".
3259 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3260 (buffer_xml_printf): New functions.
3261 * server.h (struct buffer): New.
3262 (buffer_grow_str, buffer_grow_str0): New macros.
3263 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3264 (buffer_xml_printf): Declare.
07e059b5 3265
4cab47ab
DE
32662008-11-24 Doug Evans <dje@google.com>
3267
3268 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3269
f142445f
DJ
32702008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3271
3272 * server.c (handle_v_run): Always use the supplied argument list.
3273
d0107bb6 32742008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 3275
d0107bb6
BW
3276 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3277 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 3278
2c4ad781
TJB
32792008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3280
3281 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3282 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3283 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3284 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3285 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3286 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3287 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3288 XML target descriptions.
3289 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3290 when inferior is running on an ISA 2.05 or later processor. Add
3291 special case to return offset for full 64-bit slot of FPSCR when
3292 in 32-bits.
3293
dfb64f85
DJ
32942008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3295
3296 * Makefile.in (SFILES, clean): Added sparc64 files.
3297 (reg-sparc64.o, reg-sparc64.c): New.
3298 * configure.srv (sparc*-*-linux*): New configuration.
3299 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3300 syscall arguments for SPARC.
3301 (regsets_store_inferior_registers): Likewise.
3302 * linux-sparc-low.c: New file.
3303
66b6e1dd
DE
33042008-10-21 Doug Evans <dje@google.com>
3305
3306 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3307 (READLINE_DIR,READLINE_DEP): Delete.
3308 (INTERNAL_CFLAGS): Update.
3309 (LINTFLAGS): Update.
3310
9b710a42
PA
33112008-10-10 Pedro Alves <pedro@codesourcery.com>
3312
3313 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3314 whole argv from the last run, not just argv[0].
3315
5822d809
PA
33162008-09-08 Pedro Alves <pedro@codesourcery.com>
3317
3318 * regcache.c (new_register_cache): Return NULL if the register
3319 cache size isn't known yet.
3320 (free_register_cache): Avoid dereferencing a NULL regcache.
3321
74aac56f
DJ
33222008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3323
3324 * configure.srv: Merge MIPS and MIPS64.
3325
400b20f5
MR
33262008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3327
3328 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3329
677c5bb1
LM
33302008-08-18 Luis Machado <luisgpm@br.ibm.com>
3331
3332 * Makefile.in: Add required vsx dependencies.
3333
3334 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3335 Declare init_registers_powerpc_vsx32l.
3336 Declare init_registers_powerpc_vsx64l.
3337 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3338 (ppc_arch_setup): Check for VSX in hwcap.
3339 (ppc_fill_vsxregset): New function.
3340 (ppc_store_vsxregset): New function.
3341 Add new VSX entry in regset_info target_regsets.
3342
3343 * configure.srv: Add new VSX dependencies.
3344
a6f3e723
SL
33452008-08-12 Pedro Alves <pedro@codesourcery.com>
3346
3347 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3348 (remote_open): Set or clear transport_is_reliable.
3349 (putpkt_binary): Don't expect acks in noack mode.
3350 (getpkt): Don't send ack/nac in noack mode.
3351 * server.c (handle_general_set): Handle QStartNoAckMode.
3352 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3353 qSupported.
3354 (main): Reset noack_mode on every connection.
3355 * server.h (noack_mode): Declare.
3356
a417dc56
RW
33572008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3358
3359 * Makefile.in (GDBREPLAY_OBS): New variable.
3360 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3361
3221518c
UW
33622008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3363 Daniel Jacobowitz <dan@codesourcery.com>
3364
3365 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3366 (usr_store_inferior_registers): Likewise.
3367 (regsets_store_inferior_registers): Likewise.
3368
ec56be1b
PA
33692008-07-31 Rolf Jansen <rj@surtec.com>
3370 Pedro Alves <pedro@codesourcery.com>
3371
3372 * configure.ac: Check for memmem declaration.
3373 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3374 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3375 (disable_packet_qfThreadInfo): Unconditionally compile.
3376 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3377 * configure, config.in: Regenerate.
3378
2fe5e3ff
DE
33792008-07-28 Doug Kwan <dougkwan@google.com>
3380
3381 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3382 (linux_write_memory): Remove declaration of errno.
3383
836acd6d
UW
33842008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3385
3386 * linux-low.c (handle_extended_wait): Do not use "status"
3387 variable uninitialized.
3388
aeba519e
PA
33892008-07-07 Pedro Alves <pedro@codesourcery.com>
3390
3391 * server.c (handle_v_attach): Inhibit reporting dll changes.
3392
db42f210
PA
33932008-06-27 Pedro Alves <pedro@codesourcery.com>
3394
3395 * remote-utils.c (prepare_resume_reply): If requested, don't
3396 output "thread:TID" in the T stop reply.
3397
3398 * server.c (disable_packet_vCont, disable_packet_Tthread)
3399 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3400 (handle_query): If requested, disable support for qC, qfThreadInfo
3401 and qsThreadInfo.
3402 (handle_v_requests): If requested, disable support for vCont.
3403 (gdbserver_show_disableable): New.
3404 (main): Handle --disable-packet and --disable-packet=LIST.
3405
3406 * server.h (disable_packet_vCont, disable_packet_Tthread)
3407 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3408
8e4c5421
CD
34092008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3410
3411 * server.c (gdbserver_usage): Mention --version.
3412
6e23a804
DJ
34132008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3414
3415 * Makefile.in (gdbreplay.o): New rule.
3416
90aa6a40
JM
34172008-06-06 Joseph Myers <joseph@codesourcery.com>
3418
3419 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3420 message, not gdbserver.
3421
c16158bc 34222008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
3423 Nathan Sidwell <nathan@codesourcery.com>
3424 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
3425
3426 * acinclude.m4: Include ../../config/acx.m4.
3427 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3428 * configure, config.in: Regenerate.
3429 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3430 * server.c (gdbserver_version): Print PKGVERSION.
3431 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3432 (main): Adjust gdbserver_usage calls.
3433 * gdbreplay.c (version, host_name): Add declarations.
3434 (gdbreplay_version, gdbreplay_usage): New.
3435 (main): Accept --version and --help options.
3436
aeb75bf5
DJ
34372008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3438
3439 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3440 (arm_breakpoint_at): Handle Thumb.
3441 (the_low_target): Add comment.
3442
76b233dd
UW
34432008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3444
3445 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3446
08388c79
DE
34472008-05-09 Doug Evans <dje@google.com>
3448
a3c83fae
DE
3449 * server.h (decode_search_memory_packet): Declare.
3450 * remote-utils.c (decode_search_memory_packet): New fn.
3451 * server.c (handle_search_memory_1): New fn.
08388c79
DE
3452 (handle_search_memory): New fn.
3453 (handle_query): Process qSearch:memory packets.
3454
bb9c3d36
UW
34552008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3456
3457 * regcache.c (registers_length): Remove.
3458 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3459 full register packet.
3460 * regcache.h (registers_length): Remove prototype.
3461 * server.h (PBUFSIZ): Define to 16384.
3462
7284e1be
UW
34632008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3464
3465 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3466 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3467 powerpc-64l.o, and powerpc-altivec64l.o.
3468 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3469 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3470 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3471 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3472 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3473 to srv_xmlfiles.
3474
3475 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3476 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3477 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3478 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3479 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3480 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3481 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3482 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3483 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3484 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3485 (clean): Update.
3486
3487 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3488 (init_registers_powerpc_32l): ... this new prototype.
3489 (init_registers_powerpc_32): Remove, replace by ...
3490 (init_registers_powerpc_altivec32l): ... this new prototype.
3491 (init_registers_powerpc_e500): Remove, replace by ...
3492 (init_registers_powerpc_e500l): ... this new prototype.
3493 (init_registers_ppc64): Remove, replace by ...
3494 (init_registers_powerpc_64l): ... this new prototype.
3495 (init_registers_powerpc_64): Remove, replace by ...
3496 (init_registers_powerpc_altivec64l): ... this new prototype.
3497 (ppc_num_regs): Set to 73.
3498 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3499 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3500 (ppc_cannot_store_register): Handle orig_r3 and trap.
3501 (ppc_arch_setup): Update init_registers_... calls.
3502 (ppc_fill_gregset): Handle orig_r3 and trap.
3503
3504 * inferiors.c (clear_inferiors): Reset current_inferior.
3505
fdc59709
PB
35062008-04-23 Paolo Bonzini <bonzini@gnu.org>
3507
889bf7c5
PA
3508 * acinclude.m4: Add override.m4.
3509 * configure: Regenerate.
fdc59709 3510
c9b2f845
UW
35112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3512
3513 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3514 initial call to init_register_ppc64.
3515
550512b8
UW
35162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3517
3518 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3519 powerpc*-*-linux* case.
3520 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3521
b6430ec3
UW
35222008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3523
3524 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 3525 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
3526 from reg_xmlfiles.
3527 * linux-ppc-low.c: Include <elf.h>.
3528 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3529 (ppc_hwcap): New global variable.
3530 (ppc_regmap): Remove __SPE__ #ifdef sections.
3531 (ppc_regmap_e500): New global variable.
3532 (ppc_cannot_store_register): Update __SPE__ special case.
3533 (ppc_get_hwcap): New function.
3534 (ppc_arch_setup): Use it to determine whether inferior supports
3535 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3536 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3537 Do not access registers if target does not support AltiVec.
3538 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3539 Do not access registers if target does not support SPE.
3540 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3541
52fa2412
UW
35422008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3543
3544 * linux-low.c (disabled_regsets, num_regsets): New.
3545 (use_regsets_p): Delete.
3546 (linux_wait_for_process): Clear disabled_regsets.
3547 (regsets_fetch_inferior_registers): Check and set it.
3548 (regsets_store_inferior_registers): Likewise.
3549 (linux_fetch_registers, linux_store_registers): Do not use
3550 use_regsets_p.
3551 (initialize_low): Allocate disabled_regsets.
3552
e28b3332
DJ
35532008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3554
3555 * Makefile.in (LIBOBJS): New.
3556 (OBS): Use LIBOBJS.
3557 (memmem.o): New rule.
3558 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3559 * configure: Regenerated.
3560
4536995d
UW
35612008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3562
3563 * server.c (handle_query): Never return "unsupported" for
3564 qXfer:features:read queries.
3565
221c031f
UW
35662008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3567
3568 * server.c (get_features_xml): Fix inverted condition.
3569 (handle_query): Always support qXfer:feature:read.
3570
ccd213ac
DJ
35712008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3572
3573 * server.c (wrapper_argv): New.
3574 (start_inferior): Handle wrapper_argv. If set, expect an extra
3575 trap.
3576 (gdbserver_usage): Document --wrapper.
3577 (main): Parse --wrapper.
3578
6fe305f7
UW
35792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3580
3581 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3582 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3583 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3584 (ppc_set_pc): Likewise.
3585 (ppc_arch_setup): New function.
3586 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3587 of collect_register.
889bf7c5 3588 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 3589
5b0a002e
UW
35902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3591
3592 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3593 instead of linux-ppc64-low.o.
3594 * linux-ppc64-low.c: Remove file.
3595 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3596 (linux-ppc64-low.o): Remove rule.
3597
3598 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3599 (init_registers_powerpc_64): Likewise.
3600 (ppc_regmap): Conditionally define depending on __powerpc64__.
3601 (ppc_cannot_store_register): Do not special-case "fpscr" when
3602 compiled on __powerpc64__.
3603 (ppc_collect_ptrace_register): New function.
3604 (ppc_supply_ptrace_register): New function.
3605 (ppc_breakpoint): Change type to "unsigned int".
3606 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3607 (the_low_target): Conditionally provide initializers for the
889bf7c5 3608 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
3609 collect_ptrace_register and supply_ptrace_register members.
3610
9b4b61c8
UW
36112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3612
3613 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3614 * server.c (gdbserver_xmltarget): Define.
3615 (get_features_xml): Use it to replace "target.xml" and arch_string.
3616
3617 * configure.srv: Remove srv_xmltarget. Add XML files that were
3618 mentioned there to srv_xmlfiles instead. Remove conditional tests
3619 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3620 srv_xmlfiles and srv_regobj to include all possible choices.
3621 * configure.ac (srv_xmltarget): Remove.
3622 (srv_xmlfiles): Do not add "target.xml".
3623 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3624 checks for supplementary target information.
3625 * configure: Regenerate.
3626 * Makefile.in (XML_TARGET): Remove.
3627 (target.xml): Remove rule.
3628 (clean): Do not clean up target.xml.
3629 (.PRECIOUS): Do not mention target.xml.
3630
3631 * target.h (struct target_ops): Remove arch_string member.
3632 * linux-low.c (linux_arch_string): Remove.
3633 (linux_target_ops): Remove arch_string initializer.
3634 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3635 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3636 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3637 * spu-low.c (spu_arch_string): Remove.
3638 (spu_target_ops): Remove arch_string initializer.
3639 * win32-low.c (win32_arch_string): Remove.
3640 (win32_target_ops): Remove arch_string initializer.
3641 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3642 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3643 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3644
ee1a7ae4
UW
36452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3646
3647 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3648 by collect_ptrace_register and supply_ptrace_register hooks.
3649 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3650 instead of checking for the_low_target.left_pad_xfer.
3651 (usr_store_inferior_registers): Use collect_ptrace_register callback
3652 instead of checking for the_low_target.left_pad_xfer.
3653
3654 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3655 (s390_supply_ptrace_register): Likewise.
3656 (s390_fill_gregset): Call s390_collect_ptrace_register.
3657 (the_low_target): Update.
3658
3659 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3660 (ppc_supply_ptrace_register): Likewise.
3661 (the_low_target): Update.
3662
3663 * linux-i386-low.c (the_low_target): Update.
3664 * linux-x86-64-low.c (the_low_target): Update.
3665
d61ddec4
UW
36662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3667
3668 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3669 reg-s390.o and reg-s390x.o.
3670
3671 * linux-low.c (new_inferior): New global variable.
3672 (linux_create_inferior, linux_attach): Set it.
3673 (linux_wait_for_process): Call the_low_target.arch_setup after the
3674 target has stopped for the first time.
3675 (initialize_low): Do not call the_low_target.arch_setup.
3676
3677 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3678 (s390_set_pc): Likewise.
3679 (s390_arch_setup): New function.
3680 (the_low_target): Use s390_arch_setup as arch_setup routine.
3681
3682 * regcache.c (realloc_register_cache): New function.
3683 (set_register_cache): Call it for each existing regcache.
3684
d05b4ac3
UW
36852008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3686
3687 * server.h (init_registers): Remove prototype.
3688
3689 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3690 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3691 instead of init_registers ().
3692 * linux-arm-low.c (init_registers_arm): Add prototype.
3693 (init_registers_arm_with_iwmmxt): Likewise.
3694 (the_low_target): Add initializer for arch_setup field.
3695 * linux-cris-low.c (init_registers_cris): Add prototype.
3696 (the_low_target): Add initializer for arch_setup field.
3697 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3698 (the_low_target): Add initializer for arch_setup field.
3699 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3700 (the_low_target): Add initializer for arch_setup field.
3701 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3702 (the_low_target): Add initializer for arch_setup field.
3703 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3704 (the_low_target): Add initializer for arch_setup field.
3705 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3706 (the_low_target): Add initializer for arch_setup field.
3707 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3708 (init_registers_mips64_linux): Likewise.
3709 (the_low_target): Add initializer for arch_setup field.
3710 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3711 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3712 (the_low_target): Add initializer for arch_setup field.
3713 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3714 (init_registers_powerpc_64): Likewise.
3715 (the_low_target): Add initializer for arch_setup field.
3716 * linux-s390-low.c (init_registers_s390): Add prototype.
3717 (init_registers_s390x): Likewise.
3718 (the_low_target): Add initializer for arch_setup field.
3719 * linux-sh-low.c (init_registers_sh): Add prototype.
3720 (the_low_target): Add initializer for arch_setup field.
3721 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3722 (the_low_target): Add initializer for arch_setup field.
3723 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3724 (the_low_target): Add initializer for arch_setup field.
3725
3726 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3727 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3728 instead of init_registers ().
3729 * win32-arm-low.c (init_registers_arm): Add prototype.
3730 (the_low_target): Add initializer for arch_setup field.
3731 * win32-i386-low.c (init_registers_i386): Add prototype.
3732 (the_low_target): Add initializer for arch_setup field.
3733
3734 * spu-low.c (init_registers_spu): Add prototype.
3735 (initialize_low): Call initialie_registers_spu () instead of
3736 initialize_registers ().
3737
fd96d250
PA
37382008-02-19 Pedro Alves <pedro@codesourcery.com>
3739
3740 * server.c (handle_v_requests): When handling the vRun and vAttach
3741 packets, if already debugging a process, don't kill it. Return an
3742 error instead.
3743
d41b6bb4
DJ
37442008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3745
3746 * server.c (handle_query): Correct length check.
3747
5ac588cf
PA
37482008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3749
3750 * win32-low.c (do_initial_child_stuff): Add process handle
3751 parameter. Set current_process_handle and current_process_id from the
3752 parameters. Clear globals.
3753 (win32_create_inferior): Don't set current_process_handle and
3754 current_process_id here. Instead pass them on the call to
3755 do_initial_child_stuff.
3756 (win32_attach): Likewise.
3757 (win32_clear_inferiors): New.
3758 (win32_kill): Don't close the current process handle or the
3759 current thread handle here. Instead call win32_clear_inferiors.
3760 (win32_detach): Don't open a new handle to the process. Call
3761 win32_clear_inferiors.
3762 (win32_join): Don't rely on current_process_handle; open a new
3763 handle using the process id.
3764 (win32_wait): Call win32_clear_inferiors when the inferior process
3765 has exited.
3766
ecd7ecbc
DJ
37672008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3768
3769 * server.c (monitor_show_help): Add "exit".
3770
1525d545
MG
37712008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3772
ecd7ecbc 3773 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
3774 (clean): Add reg-xtensa.c.
3775 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
3776 * configure.srv (xtensa*-*-linux*) New target.
3777 * linux-xtensa-low.c: New.
3778 * xtensa-xtregs.c: New.
1525d545 3779
59a016f0
PA
37802008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3781
3782 * hostio.c: Don't include errno.h.
3783 (errno_to_fileio_errno): Move to hostio-errno.
3784 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3785 error number outputting to the target->hostio_last_error callback.
3786 (hostio_packet_error): Use FILEIO_EINVAL directly.
3787 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3788 calls to hostio_error.
3789 * hostio-errno.c: New.
3790 * server.h (hostio_last_error_from_errno): Declare.
3791 * target.h (target_ops): Add hostio_last_error member.
3792 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3793 as hostio_last_error handler.
889bf7c5 3794 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
3795 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3796 (wince_hostio_last_error): New functions.
3797 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3798 as hostio_last_error handler.
3799 (win32_target_ops) [!_WIN32_WCE]: Register
3800 hostio_last_error_from_errno as hostio_last_error handler.
3801 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3802 (hostio-errno.o): New rule.
3803 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3804 * configure.srv (srv_hostio_err_objs): New variable. Default to
3805 hostio-errno.o.
3806 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3807 * configure: Regenerate.
3808
2d717e4f
DJ
38092008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3810
3811 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3812 (linux_kill, linux_detach): Clean up the process list.
3813 * remote-utils.c (remote_open): Improve port number parsing.
3814 (putpkt_binary, input_interrupt): Only send interrupts if the target
3815 is running.
3816 * server.c (extended_protocol): Make static.
3817 (attached): Define earlier.
3818 (exit_requested, response_needed, program_argv): New variables.
3819 (target_running): New.
3820 (start_inferior): Clear attached here.
3821 (attach_inferior): Set attached here.
3822 (require_running): Define.
3823 (handle_query): Use require_running and target_running. Implement
3824 "monitor exit".
3825 (handle_v_attach, handle_v_run): New.
3826 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3827 (gdbserver_usage): Update.
3828 (main): Redo argument parsing. Handle --debug and --multi. Handle
3829 --attach along with other options or after the port. Save
3830 program_argv. Support no initial program. Resynchronize
3831 communication with GDB after an error. Handle "monitor exit".
3832 Use require_running and target_running. Always allow the extended
3833 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3834 restart in extended mode.
3835 * README: Refer to the GDB manual. Update --attach usage.
3836
7407e2de
AS
38372007-12-20 Andreas Schwab <schwab@suse.de>
3838
3839 * linux-low.c (STACK_SIZE): Define.
3840 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3841 (linux_test_for_tracefork): Likewise.
3842
b65d95c5
DJ
38432007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3844
3845 * linux-low.c (linux_wait_for_event): Update messages. Do not
3846 reinsert auto-delete breakpoints.
3847 * mem-break.c (struct breakpoint): Change return type of handler to
3848 int.
3849 (set_breakpoint_at): Update handler type.
3850 (reinsert_breakpoint_handler): Return 1 instead of calling
3851 delete_breakpoint.
3852 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3853 setting a new one.
3854 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3855 * mem-break.h (set_breakpoint_at): Update handler type.
3856 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3857 * win32-low.c (auto_delete_breakpoint): New.
3858 (get_child_debug_event): Use it.
3859
4e799345
DJ
38602007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3861
3862 * configure.ac: Check for pread and pwrite.
3863 * hostio.c (handle_pread): Fall back to lseek and read.
3864 (handle_pwrite): Fall back to lseek and write.
3865 * config.in, configure: Regenerated.
3866
27524b67
DJ
38672007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3868
3869 * server.c (myresume): Add own_buf argument.
3870 (main): Update calls.
3871
a20d5e98
DJ
38722007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3873
3874 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3875 * remote-utils.c (remote_open): Do not call disable_async_io.
3876 (block_async_io): Delete.
3877 (unblock_async_io): Make static.
3878 (initialize_async_io): New.
3879 * server.c (handle_v_cont): Handle async I/O here.
3880 (myresume): Likewise. Move other common resume tasks here...
3881 (main): ... from here. Call initialize_async_io. Disable async
3882 I/O before the main loop.
3883 * server.h (initialize_async_io): Declare.
3884 (block_async_io, unblock_async_io): Delete prototypes.
3885 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3886
b79d787e
DJ
38872007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3888
3889 * remote-utils.c (readchar): Allow binary data in received messages.
3890
d97903b2
PA
38912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3892
3893 * win32-low.c (attaching): New global.
3894 (win32_create_inferior): Clear the `attaching' global.
3895 (win32_attach): Set the `attaching' global.
3896 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3897 attaching. Only set a breakpoint at the entry point if not
3898 attaching.
3899
311de423
PA
39002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3901
3902 * server.c (main): Don't report dll events on the initial
3903 connection on attaches.
3904
6c2d16d2
PA
39052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3906
3907 * server.c (main): Relax numerical bases supported for the pid of
3908 the --attach command line argument.
3909
5ca906e6
PA
39102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3911
3912 * win32-low.c (win32_attach): Call OpenProcess before
3913 DebugActiveProcess, not after. Add last error output to error
3914 call.
3915
9c6c8194
PA
39162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3917
3918 * win32-low.c (win32_get_thread_context)
3919 (win32_set_thread_context): New functions.
3920 (thread_rec): Use win32_get_thread_context.
3921 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3922 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3923 field.
3924
4d5d1aaa
PA
39252007-12-03 Leo Zayas
3926 Pedro Alves <pedro_alves@portugalmail.pt>
3927
3928 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3929 global variables.
3930 (child_add_thread): Minor cleanup.
3931 (child_continue): Resume artificially suspended threads before
3932 calling ContinueDebugEvent.
3933 (suspend_one_thread): New.
3934 (fake_breakpoint_event): New.
3935 (get_child_debug_event): Change return type to int. Check here if
3936 gdb sent an interrupt request. If a soft interrupt was requested,
3937 fake a breakpoint event. Return 0 if there is no event to handle,
3938 and 1 otherwise.
3939 (win32_wait): Don't check here if gdb sent an interrupt request.
3940 Ensure there is a valid event to handle.
3941 (win32_request_interrupt): Add soft interruption method as last
3942 resort.
3943
c436e841
PA
39442007-12-03 Leo Zayas
3945 Pedro Alves <pedro_alves@portugalmail.pt>
3946
3947 * win32-low.h (win32_thread_info): Add descriptions to the
3948 structure members. Replace `suspend_count' counter by a
3949 `suspended' flag.
3950 * win32-low.c (thread_rec): Update condition of when to get the
3951 context from the inferior. Rely on ContextFlags being set if it
3952 has already been retrieved. Only suspend the inferior thread if
3953 we haven't already. Warn if that fails.
3954 (continue_one_thread): s/suspend_count/suspended/. Only call
3955 ResumeThread once. Warn if that fails.
3956
e7b5fa67
PA
39572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3958
3959 * win32-low.c (win32_wait): Don't read from the inferior when it
3960 has already exited.
3961
a385171d
PA
39622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3963
3964 * Makefile.in (win32_low_h): New variable.
3965 (win32-low.o): Add dependency on $(win32_low_h).
3966 (win32-arm-low.o, win32-i386-low.o): New rules.
3967
f80c84b3
DJ
39682007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3969
3970 * hostio.c: Correct copyright year.
3971
a6b151f1
DJ
39722007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3973
3974 * Makefile.in (OBS): Add hostio.o.
3975 (hostio.o): New rule.
3976 * server.h (handle_vFile): Declare.
3977 * hostio.c: New file.
3978 * server.c (handle_v_requests): Take packet_len and new_packet_len
3979 for binary packets. Call handle_vFile.
3980 (main): Update call to handle_v_requests.
3981
f9387fc3
DJ
39822007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3983
3984 * linux-low.c: Include <sched.h>.
3985
51c2684e
DJ
39862007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3987
3988 * linux-low.c (linux_tracefork_grandchild): New.
3989 (linux_tracefork_child): Use clone.
3990 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3991
75f83163
JB
39922007-10-31 Joel Brobecker <brobecker@adacore.com>
3993
3994 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3995
da5898ce
DJ
39962007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3997
3998 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3999
24a09b5f
DJ
40002007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4001
4002 * inferiors.c (change_inferior_id): Delete.
4003 (add_pid_to_list, pull_pid_from_list): New.
4004 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4005 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4006 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4007 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4008 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4009 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4010 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4011 (using_threads): Always set to 1.
4012 (handle_extended_wait): New.
4013 (add_process): Do not set TID.
4014 (linux_create_inferior): Set must_set_ptrace_flags.
4015 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4016 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4017 (linux_thread_alive): Rename TID argument to LWPID.
4018 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4019 (linux_wait_for_event): Do not use TID or check using_threads. Update
4020 call to dead_thread_notify. Call handle_extended_wait.
4021 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4022 (send_sigstop): Delete sigstop_sent.
4023 (wait_for_sigstop): Avoid TID.
4024 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4025 (linux_test_for_tracefork): New.
4026 (linux_lookup_signals): Use thread_db_active and
4027 linux_supports_tracefork_flag.
4028 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4029 * linux-low.h (get_process_thread): Avoid TID.
4030 (struct process_ifo): Move thread_known and tid to the end. Remove
4031 sigstop_sent.
4032 (linux_attach_lwp, thread_db_init): Update prototypes.
4033 * server.h (change_inferior_id): Delete prototype.
4034 (add_pid_to_list, pull_pid_from_list): New prototypes.
4035 * thread-db.c (thread_db_use_events): New.
4036 (find_first_thread): Rename to...
4037 (find_one_thread): ...this. Update callers and messages. Do not
4038 call fatal. Check thread_db_use_events. Do not call
4039 change_inferior_id or new_thread_notify.
4040 (maybe_attach_thread): Update. Do not call new_thread_notify.
4041 (thread_db_init): Set thread_db_use_events. Check use_events.
4042 * utils.c (fatal, warning): Correct message prefix.
4043
30ed0a8f
DJ
40442007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4045
4046 * Makefile.in (clean): Remove new files.
4047 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4048 (powerpc-64.o, powerpc-64.c): New rules.
4049 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4050 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4051 with SPE.
4052 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4053 SPE targets.
4054 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4055 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4056 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4057 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4058 (target_regsets): Add AltiVec and SPE register sets.
4059 * configure.ac: Check for AltiVec and SPE.
4060 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4061 (ppc_fill_vrregset, ppc_store_vrregset): New.
4062 (target_regsets): Add AltiVec register set.
4063 * configure: Regenerated.
4064
fd462a61
DJ
40652007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4066
4067 * linux-low.c (O_LARGEFILE): Define.
4068 (linux_read_memory): Use /proc/PID/mem.
4069 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4070 * configure, config.in: Regenerated.
4071
69f223ed
DJ
40722007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4073
4074 * linux-low.c (linux_wait_for_event): Do not pass signals while
4075 single-stepping.
4076
aec18585
PA
40772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4078
4079 * win32-low.c (create_process): New.
4080 (win32_create_inferior): Use create_process instead of
4081 CreateProcess. If create_process failed retry appending an ".exe"
4082 suffix. Store the GetLastError result immediatelly after
4083 create_process calls and use it on the call to error.
4084
34d86ddd
PA
40852007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4086
4087 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4088
5a0e3bd0
JB
40892007-08-23 Joel Brobecker <brobecker@adacore.com>
4090
4091 * configure.ac: Switch license to GPLv3.
4092
f88c79e6
MS
40932007-08-01 Michael Snyder <msnyder@access-company.com>
4094
4095 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4096
6b3d9b83
PA
40972007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4098
4099 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4100 typedef.
4101 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4102 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4103 CloseToolhelp32Snapshot.
4104 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4105 CloseToolhelp32Snapshot.
4106
c588c53c
MS
41072007-07-27 Michael Snyder <michael.snyder@access-company.com>
4108
4109 * server.c (main): Check for inferior exit before main loop.
4110
aa0403d9
PA
41112007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4112
4113 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4114 instead of on tmp_desc.
4115
255e7678
DJ
41162007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4117 Daniel Jacobowitz <dan@codesourcery.com>
4118
4119 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4120 (add_thread): Minor cleanups.
4121 (clear_inferiors): Move lower in the file. Clear the DLL
4122 list.
4123 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4124 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4125 (xml_escape_text): New.
4126 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4127 for qSupported.
4128 (handle_v_cont): Report errors.
4129 (gdbserver_version): Update.
4130 (main): Correct size of own_buf. Do not report initial DLL events.
4131 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4132 (unloaded_dll, xml_escape_text): New.
4133 * win32-low.c (enum target_waitkind): Update comments.
4134 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4135 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4136 (win32_EnumProcessModules, win32_GetModuleInformation)
4137 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4138 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4139 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4140 (win32_Module32First, win32_Module32Next, load_toolhelp)
4141 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4142 (get_child_debug_event): Handle DLL events.
4143 (win32_wait): Likewise.
4144
0d37add9
DJ
41452007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4146
4147 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4148 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4149
45e2715e
PA
41502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4151
4152 * win32-low.c (handle_output_debug_string): Ignore event if not
4153 waiting.
4154
c5674cf1
PA
41552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4156
4157 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4158
2bbe3cc1
DJ
41592007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4160
4161 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4162
ae13219e
DJ
41632007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4164
4165 * inferiors.c (change_inferior_id): Add comment.
4166 * linux-low.c (check_removed_breakpoint): Add an early
4167 prototype. Improve debug output.
4168 (linux_attach): Doc update.
4169 (linux_detach_one_process, linux_detach): Clean up before releasing
4170 each process.
4171 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4172 * linux-low.h (struct process_info): Doc improvement.
4173 * mem-break.c (delete_all_breakpoints): New.
4174 * mem-break.h (delete_all_breakpoints): New prototype.
4175 * thread-db.c (find_first_thread): New.
4176 (thread_db_create_event): Call it instead of
4177 thread_db_find_new_threads. Clean up unused variables.
4178 (maybe_attach_thread): Remove first thread handling.
4179 (thread_db_find_new_threads): Use find_first_thread.
4180 (thread_db_get_tls_address): Likewise.
4181
4105de34
DJ
41822007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4183
4184 * thread-db.c (thread_db_find_new_threads): Add prototype.
4185 (thread_db_create_event): Check for the main thread before adding
4186 a new thread.
4187 (maybe_attach_thread): Only enable event reporting if TID == 0.
4188 (thread_db_get_tls_address): Check for new threads.
4189
2b876972
DJ
41902007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4191
4192 * linux-low.c (linux_create_inferior): Try execv before execvp.
4193 * spu-low.c (spu_create_inferior): Likewise.
4194
7a245884
DJ
41952007-06-13 Mike Frysinger <vapier@gentoo.org>
4196
4197 * linux-low.c (linux_create_inferior): Change execv to execvp.
4198 * spu-low.c (spu_create_inferior): Likewies.
4199
117ce543
DJ
42002007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4201
4202 * Makefile.in (clean): Clean new files instead of deleted ones.
4203 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4204 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4205 rules.
4206 * configure.srv: Specify XML files and new regformats for MIPS and
4207 MIPS64 GNU/Linux.
4208 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4209 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4210 an entry for the restart register.
4211 (mips_cannot_fetch_register, mips_cannot_store_register)
4212 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4213 register names to match the XML descriptions.
4214 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4215 restart register instead of $0.
4216
0e7f50da
UW
42172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4218 Markus Deuling <deuling@de.ibm.com>
4219
4220 * remote-utils.c (decode_xfer_write): New function.
4221 * server.h (decode_xfer_write): Add prototype.
4222 * server.c (handle_query): Add PACKET_LEN argument. Support
4223 qXfer:spu:read and qXfer:spu:write packets.
4224 (main): Pass packet_len to handle_query.
4225 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4226 * target.h (target_ops): Add qxfer_spu.
4227
374c1d38
UW
42282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4229
4230 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4231 accessing non-seekable spufs files.
4232
bb63802a
UW
42332007-05-16 Markus Deuling <deuling@de.ibm.com>
4234
889bf7c5 4235 * server.c (handle_query): Add reply for qC packet.
bb63802a 4236
7390519e
PA
42372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4238 Leo Zayas <lerele@champenstudios@com>
4239
4240 * server.h (check_remote_input_interrupt_request): New function.
4241 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4242 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4243 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4244 (check_remote_input_interrupt_request): New function.
4245 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 4246 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
4247 winapi_GenerateConsoleCtrlEvent): New typedefs.
4248 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4249 to 250 ms.
4250 (win32_wait): Check for remote interrupt request
4251 with check_remote_input_interrupt_request.
4252 (win32_request_interrupt): New function.
4253 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4254
34b34921
PA
42552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4256
4257 * win32-low.c (debug_registers_changed,
4258 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4259 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4260 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4261 (thread_rec): Get context using the low target.
4262 (child_add_thread): Call thread_added on the low target,
4263 which does the same thing.
4264 (regptr): Delete.
4265 (do_initial_child_stuff): Remove debug registers references.
4266 Set context using the low target. Resume threads after
4267 setting the contexts.
4268 (child_continue): Remove dead variable. Remove debug
4269 registers references.
4270 (child_fetch_inferior_registers): Go through the low target.
4271 (do_child_store_inferior_registers): Remove.
4272 (child_store_inferior_registers): Go through the low target.
4273 (win32_resume): Remove debug registers references.
4274 Set context using the low target.
4275 (handle_exception): Change return type to void. Don't record
4276 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4277 first chance exception.
889bf7c5 4278 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
4279 goto loop. Always return after waiting for debug event.
4280 (win32_wait): Convert to switch statement. Handle spurious
4281 events.
4282
4283 * win32-i386-low.c (debug_registers_changed,
4284 debug_registers_used): New.
4285 (initial_stuff): Rename to ...
4286 (i386_initial_stuff): ... this. Clear debug registers
4287 state variables.
4288 (store_debug_registers): Delete.
4289 (i386_get_thread_context): New.
4290 (load_debug_registers): Delete.
4291 (i386_set_thread_context): New.
4292 (i386_thread_added): New.
4293 (single_step): Rename to ...
4294 (i386_single_step): ... this.
4295 (do_fetch_inferior_registers): Rename to ...
4296 (i386_fetch_inferior_register): ... this.
4297 (i386_store_inferior_register): New.
4298 (the_low_target): Adapt to new interface.
4299
4300 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4301 (arm_get_thread_context): New.
4302 (arm_set_thread_context): New.
4303 (regptr): New.
4304 (do_fetch_inferior_registers): Rename to ...
4305 (arm_fetch_inferior_register): ... this.
4306 (arm_store_inferior_register): New.
4307 (arm_wince_breakpoint): Reimplement as unsigned long.
4308 (arm_wince_breakpoint_len): Define.
4309 (the_low_target): Adapt to new interface.
4310
4311 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4312 load_debug_registers. Add get_thread_context, set_thread_context,
4313 thread_added and store_inferior_register. Rename
4314 fetch_inferior_registers to fetch_inferior_register.
4315 (regptr): Remove declaration.
4316
dd6953e1
PA
43172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4318
4319 * linux-low.c (linux_detach): Change return type to int. Return 0.
4320 * spu-low.c (spu_detach): Likewise.
4321
444d6139
PA
43222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4323
4324 * target.h (target_ops): Change return type of detach to int.
4325 Add join.
4326 (join_inferior): New.
4327 * server.c (main): Don't skip detach support on mingw32.
4328 If the inferior doesn't support detaching return error.
4329 Call join_inferior instead of using waitpid.
4330 * linux-low.c (linux_join): New.
4331 (linux_target_op): Add linux_join.
4332 * spu-low.c (spu_join): New.
4333 (spu_target_ops): Add spu_join.
4334 * win32-low.c (win32_detach): Adapt to new interface.
4335 Reopen current_process_handle before detaching. Issue a child
4336 resume before detaching.
4337 (win32_join): New.
4338 (win32_target_op): Add win32_join.
4339
1d5315fe
PA
43402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4341
4342 * win32-low.c (win32-attach): Fix return value.
4343 * target.h (target_ops): Describe ATTACH return values.
4344
bf914831
PA
43452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4346
4347 * win32-low.c (GETPROCADDRESS): Define.
4348 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4349 (winapi_DebugSetProcessKillOnExit): Likewise.
4350 (win32_create_inferior): Force usage of ansi CreateProcessA.
4351 (win32_attach): Use GETPROCADDRESS.
4352 (win32_detach): Likewise.
4353
f72f3e60
PA
43542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4355
4356 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4357
ed50f18f
PA
43582007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4359
4360 * win32-low.c: Commit leftover changes from 2007-03-29.
4361
0c2ead7e
DJ
43622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4363
4364 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4365 fields short instead of int. Add explicit padding.
4366 (i387_cache_to_fsave): Remove unnecessary casts.
4367 (i387_fsave_to_cache): Doc fix.
4368 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4369
73725ff3
DJ
43702007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4371
4372 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4373 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4374
d99f33d8
PA
43752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4376
4377 * configure.srv (arm*-*-mingw32ce*): Move near the other
4378 arm targets.
4379
68070c10
PA
43802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4381
2482afc6 4382 * configure.ac: Add errno checking.
68070c10
PA
4383 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4384 sys/file.h and malloc.h.
4385 (AC_CHECK_DECLS): Add perror.
4386 (srv_mingwce): Handle.
2482afc6 4387 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
4388 win32-i386-low.o to srv_tgtobj.
4389 (i[34567]86-*-mingw*): Likewise.
4390 (arm*-*-mingw32ce*): Add case.
4391 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4392 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4393 [__MINGW32CE__] (strerror): New function.
4394 [__MINGW32CE__] (errno): Define to GetLastError.
4395 [__MINGW32CE__] (COUNTOF): New macro.
4396 (remote_open): Remove extra close call.
4397 * mem-break.c (delete_breakpoint_at): New function.
4398 * mem-break.h (delete_breakpoint_at): Declare.
4399 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4400 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4401 [USE_WIN32API] (read, write): Add char* casts.
4402 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4403 * server.h: Include wincecompat.h on Windows CE.
4404 [HAVE_ERRNO_H]: Check.
4405 (perror): Declare if not declared.
4406 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4407 (perror_with_name): Remove errno declaration.
4408 * wincecompat.h: New.
4409 * wincecompat.c: New.
4410 * win32-low.h: New.
4411 * win32-arm-low.c: New.
4412 * win32-i386-low.c: New.
4413 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4414 (OUTMSG2): Make it safe.
4415 (_T): New macro.
4416 (COUNTOF): New macro.
4417 (NUM_REGS): Get it from the low target.
4418 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4419 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4420 (thread_rec): Let low target handle debug registers.
4421 (child_add_thread): Likewise.
4422 (child_init_thread_list): Likewise.
4423 (continue_one_thread): Likewise.
4424 (regptr): New.
4425 (do_child_fetch_inferior_registers): Move to ...
4426 * win32-i386-low.c: ... here, and rename to ...
4427 (do_fetch_inferior_registers): ... this.
889bf7c5 4428 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
4429 Go through the low target.
4430 (do_child_store_inferior_registers): Use regptr.
4431 (strwinerror): New function.
4432 (win32_create_inferior): Handle Windows CE.
4433 Use strwinerror instead of strerror on Windows error
4434 codes. Add program to the error output.
4435 Don't close the main thread handle on Windows CE.
4436 (win32_attach): Use coredll.dll on Windows CE.
4437 (win32_kill): Close current process and current
4438 thread handles.
4439 (win32_detach): Use coredll.dll on Windows CE.
4440 (win32_resume): Let low target handle debug registers, and
4441 step request.
4442 (handle_exception): Add/Remove initial breakpoint. Avoid
4443 non-existant WSTOPSIG on Windows CE.
4444 (win32_read_inferior_memory): Cast to remove warning.
4445 (win32_arch_string): Go through the low target.
4446 (initialize_low): Call set_breakpoint_data with the low
4447 target's breakpoint.
4448 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4449 FOP_REGNUM, mappings): Move to ...
4450 * win32-i386-low.c: ... here.
4451 * win32-low.c (win32_thread_info): Move to ...
4452 * win32-low.h: ... here.
4453 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4454 win32-arm-low.c and wincecompat.c.
4455 (all:): Add $EXEEXT.
4456 (install-only:): Likewise.
4457 (gdbserver:): Likewise.
4458 (gdbreplay:): Likewise.
4459 * config.in: Regenerate.
4460 * configure: Regenerate.
4461
41093d81
PA
44622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4463
4464 * win32-low.c: Rename typedef thread_info to
4465 win32_thread_info throughout.
4466
544afa54
PA
44672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4468
4469 * win32-i386-low.c: Rename to ...
4470 * win32-low.c: ... this.
4471 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4472 * Makefile.in: Likewise.
4473
bce7165d
PA
44742007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4475
4476 * remote-utils.c (monitor_output): Constify msg parameter.
4477 * server.h (monitor_output): Likewise.
4478 * win32-i386-low.c (handle_output_debug_string): New.
4479 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4480 handle_output_debug_string.
4481 (get_child_debug_event): Likewise.
4482
506c7aa0
DJ
44832007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4484
4485 * server.c (main): Correct strtoul check.
4486
42c81e2a
DJ
44872007-03-27 Jon Ringle <jon@ringle.org>
4488
4489 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4490
9453113a
DJ
44912007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4492
4493 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4494
64a69107
DJ
44952007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4496
4497 * terminal.h: Check HAVE_SGTTY_H.
4498
44992007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
4500
4501 * remote-utils.c (remote_open): Print out the assigned port number.
4502
c74d0ad8
DJ
45032007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4504
4505 * remote-utils.c (monitor_output): New function.
4506 * server.c (debug_threads): Define here.
4507 (monitor_show_help): New function.
4508 (handle_query): Handle qRcmd.
4509 (main): Do not handle 'd' packet.
4510 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4511 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4512 of debug_threads.
4513
de7c3b4a
PA
45142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4515
4516 * Makefile.in (EXEEXT): New.
4517 (clean): Use $(EXEEXT).
4518
ef57601b
PA
45192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4520
4521 * target.h (target_ops): Rename send_signal to request_interrupt,
4522 and remove enum target_signal parameter.
4523 * linux-low.c (linux_request_interrupt): Rename from
4524 linux_send_signal, and always send SIGINT.
4525 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4526 and always send SIGINT.
4527 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4528 of send_signal.
4529 (input_interrupt): Likewise.
4530
820f2bda
PA
45312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4532
4533 * server.c (get_features_xml): Check if target implemented
4534 arch_string.
4535 * win32-i386-low.c (win32_arch_string): New.
4536 (win32_target_ops): Add win32_arch_string as arch_string member.
4537
ab39bf24
UW
45382007-02-22 Markus Deuling <deuling@de.ibm.com>
4539
4540 * spu-low.c (spu_arch_string): New.
4541 (spu_target_ops): Add spu_arch_string.
4542
61ff6e04
DJ
45432007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4544
4545 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4546 * configure.ac: Do not check for terminal.h.
4547 * configure, config.in: Regenerated.
4548
fb1e4ffc
DJ
45492007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4550
4551 * Makefile.in (OBS): Add $(XML_BUILTIN).
4552 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4553 (clean): Update.
4554 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4555 (arm-with-iwmmxt.c): New.
4556 * config.in, configure: Regenerate.
4557 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4558 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4559 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4560 (arm*-*-linux*): Add iWMMXt and regset support.
4561 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4562 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4563 (arm_store_wmmxregset, target_regsets): New.
4564 * server.c (get_features_xml): Take annex argument. Check builtin
4565 XML documents.
4566 (handle_query): Handle multiple annexes.
4567
0f48aa01
DJ
45682007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4569
4570 * remote-utils.c [USE_WIN32API] (read, write): Define.
4571 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4572 write.
4573
23181151
DJ
45742007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4575
4576 * linux-i386-low.c (the_low_target): Set arch_string.
4577 * linux-x86-64-low.c (the_low_target): Likewise.
4578 * linux-low.c (linux_arch_string): New.
4579 (linux_target_ops): Add it.
4580 * linux-low.h (struct linux_target_ops): Add arch_string.
4581 * server.c (write_qxfer_response): Use const void * for DATA.
4582 (get_features_xml): New.
4583 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4584 * target.h (struct target_ops): Add arch_string method.
4585
9d606399
DJ
45862007-01-03 Denis Pilat <denis.pilat@st.com>
4587 Daniel Jacobowitz <dan@codesourcery.com>
4588
4589 * linux-low.c (linux_kill): Handle being called with no threads.
4590 * win32-i386-low.c (win32_kill): Likewise.
4591 (get_child_debug_event): Clear current_process_handle.
4592
45932006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
4594 Daniel Jacobowitz <dan@codesourcery.com>
4595
4596 * remote-utils.c (remote_open): Check the type of specified
4597 serial port devices before opening them.
4598 * server.c (main): Kill the inferior if an error occurs during
4599 the first remote_open.
4600
a5e13d24
DJ
46012006-12-05 Markus Deuling <deuling@de.ibm.com>
4602
4603 * README: Update supported targets.
4604
186947f7
DJ
46052006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4606
4607 * Makefile.in (clean): Remove reg-mips64.c.
4608 (reg-mips64.c, reg-mips64.o): New rules.
4609 * configure.srv: Handle mips64. Include regset support for mips.
4610 * linux-mips-low.c (union mips_register): New.
4611 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4612 (mips_breakpoint, mips_breakpoint_at): Use int.
4613 (mips_collect_register, mips_supply_register)
4614 (mips_collect_register_32bit, mips_supply_register_32bit)
4615 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4616 (mips_store_fpregset, target_regsets): New.
4617 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4618
a13e2c95
UW
46192006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4620
4621 * configure.srv: Add target "spu*-*-*".
4622 * Makefile.in (clean): Remove reg-spu.c.
4623 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4624 * spu-low.c: New file.
4625
cb7283db
DJ
46262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4627
4628 * configure.ac: Correct td_thr_tls_get_addr test.
4629 * configure: Regenerated.
4630
89be2091
DJ
46312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4632
4633 * linux-low.c (linux_wait_for_event): Reformat. Use the
4634 pass_signals array.
4635 * remote-utils.c (decode_address_to_semicolon): New.
4636 * server.c (pass_signals, handle_general_set): New.
4637 (handle_query): Mention QPassSignals for qSupported.
4638 (main): Call handle_general_set.
4639 * server.h (pass_signals, decode_address_to_semicolon): New.
4640
000ef4f0
DJ
46412006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4642
4643 * server.c (handle_query): Correct error handling for read_auxv.
4644
b7149293
UW
46452005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4646
4647 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4648 and srv_linux_thread_db to yes.
4649 * linux-s390-low.c (s390_fill_gregset): New function.
4650 (target_regsets): Define data structure.
4651
dae5f5cf
DJ
46522006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4653
4654 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4655 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4656 * config.in, configure: Regenerated.
4657 * inferiors.c (gdb_id_to_thread): New function.
4658 (gdb_id_to_thread_id): Use it.
4659 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4660 * linux-low.h (struct process_info): Add th member.
4661 (thread_db_get_tls_address): New prototype.
4662 * remote-utils.c (decode_address): Make non-static.
4663 * server.c (handle_query): Handle qGetTLSAddr.
4664 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4665 * target.h (struct target_ops): Add get_tls_address.
4666 * thread-db.c (maybe_attach_thread): Save the thread handle.
4667 (thread_db_get_tls_address): New.
4668
32ca6d61
DJ
46692006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4670
4671 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4672 (linux_resume_one_process): Take a siginfo_t *. Update all
4673 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4674 (struct pending_signals): Add a siginfo_t.
4675 (linux_wait_for_process): Always set last_status.
4676 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4677 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4678 * linux-low.h (struct process_info): Add last_status.
4679
5ffff7c1
DJ
46802006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4681
4682 * remote-utils.c (try_rle): New function.
4683 (putpkt_binary): Use it.
4684
8695c747
DJ
46852006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4686
4687 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4688 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4689 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4690 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4691 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4692 point registers.
4693
290fadea
RS
46942006-08-08 Richard Sandiford <richard@codesourcery.com>
4695
4696 * server.c (terminal_fd): New variable.
4697 (old_foreground_pgrp): Likewise.
4698 (restore_old_foreground_pgrp): New function.
4699 (start_inferior): Record the terminal file descriptor in terminal_fd
4700 and its original foreground group in old_foreground_pgrp. Register
4701 restore_old_foreground_pgrp with atexit().
4702
9f2e1e63
DJ
47032006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4704
4705 * server.c (handle_query): Correct qPart to qXfer.
4706
b80864fb
DJ
47072006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4708
4709 * configure.ac: Check for more headers which are missing on
4710 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4711 * configure.srv: Add Cygwin and mingw32.
4712 * remote-utils.c: Don't include headers unconditionally which
4713 are missing on mingw32. Include <winsock.h> for mingw32.
4714 (remote_open): Adjust for mingw32 support. Flush
4715 standard error after writing to it.
4716 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4717 (unblock_async_io, enable_async_io, disable_async_io)
4718 (readchar, getpkt): Update for Winsock support.
4719 (prepare_resume_reply): Expect a protocol signal number.
4720 * server.c: Disable <sys/wait.h> on mingw32.
4721 (start_inferior): Adjust for mingw32 support. Flush
4722 standard error after writing to it.
4723 (attach_inferior): Likewise. Use protocol signal
4724 numbers.
4725 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4726 and names.
4727 * win32-i386-low.c: New file.
4728 * Makefile.in (XM_CLIBS): Set.
4729 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4730 (win32-i386-low.o): New dependency rule.
4731 * linux-low.c (linux_wait): Use target signal numbers.
4732 * target.h (struct target_ops): Doc fix.
4733 * server.h (target_signal_to_name): New prototype.
4734 * gdbreplay.c: Don't include headers unconditionally which
4735 are missing on mingw32. Include <winsock.h> for mingw32.
4736 (remote_close, remote_open): Adjust for Winsock support.
4737 * configure, config.in: Regenerated.
4738
0876f84a
DJ
47392006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4740
4741 * server.c (decode_xfer_read, write_qxfer_response): New.
4742 (handle_query): Take a packet length argument. Handle
4743 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4744 the qSupported response.
4745 (main): Update call to handle_query.
4746
01f9e8fa
DJ
47472006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4748
4749 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4750 (putpkt_binary): Renamed from putpkt and adjusted for binary
4751 data.
4752 (putpkt): New wrapper for putpkt_binary.
4753 (readchar): Don't mask off the high bit.
4754 (decode_X_packet): New function.
4755 * server.c (main): Call putpkt_binary if a handler sets the packet
4756 length. Save the length of the incoming packet. Handle 'X'.
4757 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4758
be2a5f71
DJ
47592006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4760
4761 * server.c (handle_query): Handle qSupported.
4762
ea025f5f
DJ
47632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4764
4765 * remote-utils.c (all_symbols_looked_up): New variable.
4766 (look_up_one_symbol): Check it.
4767 * server.h (look_up_one_symbol): New declaration.
4768 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4769
9308fc88
DJ
47702006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4771
4772 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 4773 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
4774 (PTRACE_GET_THREAD_AREA): Define.
4775 (ps_get_thread_area): New function.
4776
52fb6437
NS
47772006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4778
4779 * configure.srv (m68k*-*-uclinux*): New target.
4780 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4781 (linux_resume_one_process): Remove extraneous cast.
4782 (linux_read_offsets): New.
4783 (linux_target_op): Add linux_read_offsets on mmuless systems.
4784 * server.c (handle_query): Add qOffsets logic.
4785 * target.h (struct target_ops): Add read_offsets.
4786
21b0f40c
DJ
47872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4788
4789 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4790 (PTRACE_GET_THREAD_AREA): Define.
4791 (ps_get_thread_area): New function.
4792 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4793 (linux-x86-64-low.o): Update.
4794
0050a760
DJ
47952006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4796
4797 * configure.ac: Remove checks for prfpregset_t.
4798 * gdb_proc_service.h: New file.
4799 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4800 new "gdb_proc_service.h".
4801 * proc-service.c: Likewise.
4802 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4803 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4804 * Makefile.in (gdb_proc_service_h): Updated.
4805 * configure, config.in: Regenerated.
4806
b92a518e
DJ
48072006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4808
4809 * remote-utils.c (prepare_resume_reply): Move declaration
4810 of gdb_id_from_wait to the top of the block.
4811
545587ee
DJ
48122006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4813
4814 * linux-low.c (regsets_store_inferior_registers): Read the regset
4815 from the target before filling it.
4816
9db87ebd
DJ
48172006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4818
4819 * server.c (attach_inferior): Return SIGTRAP for a successful
4820 attach.
4821
dd24457d
DJ
48222006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4823
4824 * Makefile.in (OBS): Add version.o.
4825 (STAGESTUFF): Delete.
4826 (version.o): Add dependencies.
4827 (version.c): Replace rule.
4828 (clean): Remove version.c.
4829 * server.c (gdbserver_version): New.
4830 (gdbserver_usage): Use printf.
4831 (main): Handle --version and --help.
4832 * server.h (version, host_name): Add declarations.
4833
6f0f660e
EZ
48342005-12-23 Eli Zaretskii <eliz@gnu.org>
4835
889bf7c5
PA
4836 * linux-arm-low.c:
4837 * linux-arm-low.c:
4838 * inferiors.c:
4839 * i387-fp.h:
4840 * i387-fp.c:
4841 * gdbreplay.c:
4842 * regcache.c:
4843 * proc-service.c:
4844 * mem-break.h:
4845 * mem-break.c:
4846 * linux-x86-64-low.c:
4847 * linux-sh-low.c:
4848 * linux-s390-low.c:
4849 * linux-ppc64-low.c:
4850 * linux-ppc-low.c:
4851 * linux-mips-low.c:
4852 * linux-m68k-low.c:
4853 * linux-m32r-low.c:
4854 * linux-low.h:
4855 * linux-low.c:
4856 * linux-ia64-low.c:
4857 * linux-i386-low.c:
4858 * linux-crisv32-low.c:
4859 * thread-db.c:
4860 * terminal.h:
4861 * target.h:
4862 * target.c:
4863 * server.h:
4864 * server.c:
4865 * remote-utils.c:
4866 * regcache.h:
4867 * utils.c:
4868 * Makefile.in:
4869 * configure.ac:
6f0f660e
EZ
4870 * gdbserver.1: Add (C) after Copyright. Update the FSF
4871 address.
4872
9d1fb177
DJ
48732005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4874
4875 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4876 (arm_breakpoint_at): Recognize both breakpoints.
4877 (the_low_target): Use the correct breakpoint instruction.
4878
011a70c2
DJ
48792005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4880
4881 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4882 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4883 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4884 (the_low_target): Update.
4885
7fb85e41
AS
48862005-10-25 Andreas Schwab <schwab@suse.de>
4887
4888 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4889
4890 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4891 (ia64_num_regs): Reduce to 462.
4892
3db0444b
DJ
48932005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4894
4895 * acinclude.m4: Correct quoting.
4896 * aclocal.m4: Regenerated.
4897
4898 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4899 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4900 (thread_db_init): Call thread_db_err_str.
4901 * configure.ac: Check for TD_VERSION.
4902 * config.in, configure: Regenerated.
4903
bee0189a
DJ
49042005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4905
4906 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4907
e9d25b98
DJ
49082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4909
4910 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4911 is not available. Define HAVE_PTRACE_GETREGS if it is.
4912 * config.in, configure: Regenerated.
4913 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4914 * linux-i386-low.c, linux-m68k-low.c: Update to use
4915 HAVE_PTRACE_GETREGS.
4916 * linux-low.c (regsets_fetch_inferior_registers)
4917 (regsets_store_inferior_registers): Only return 0 if we processed
4918 GENERAL_REGS.
4919 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4920 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4921
a06660f7
DJ
49222005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4923
4924 * inferiors.c (struct thread_info): Add gdb_id.
4925 (add_thread): Add gdb_id argument.
4926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4927 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4928 calls to add_thread.
4929 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4930 * server.c (handle_query): Use thread_to_gdb_id.
4931 (handle_v_cont, main): Use gdb_id_to_thread_id.
4932 * server.h (add_thread): Update prototype.
4933 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4934 prototypes.
4935
5a1f5858
DJ
49362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4937
4938 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4939 left-padded registers.
4940 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4941 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4942
e122f1f5
SE
49432005-07-01 Steve Ellcey <sje@cup.hp.com>
4944
4945 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4946 * configure: Regenerate.
4947 * config.in: Regenerate.
4948 * server.h (NEED_DECLARATION_STRERROR):
4949 Replace with !HAVE_DECL_STRERROR.
4950
d592fa2f
DJ
49512005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4952
4953 * linux-low.c (linux_wait, linux_send_signal): Don't test
4954 an unsigned long variable for > 0 if it could be MAX_ULONG.
4955 * server.c (myresume): Likewise.
4956 * target.c (set_desired_inferior): Likewise.
4957
ccbd4912
MK
49582005-06-13 Mark Kettenis <kettenis@gnu.org>
4959
4960 * configure.ac: Simplify and improve check for socklen_t.
4961 * configure, config.in: Regenerate.
4962
f450004a
DJ
49632005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4964
4965 * acconfig.h: Remove.
4966 * configure.ac: Add a test for socklen_t. Use three-argument
4967 AC_DEFINE throughout.
4968 * config.in: Regenerated using autoheader 2.59.
4969 * configure: Regenerated.
4970
4971 * gdbreplay.c (socklen_t): Provide a default.
4972 (remote_open): Use socklen_t.
4973 * remote-utils.c (socklen_t): Provide a default.
4974 (remote_open): Use socklen_t.
4975 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4976 unsigned char.
4977
4978 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4979 char for buffers.
4980 * linux-low.c (linux_read_memory, linux_write_memory)
4981 (linux_read_auxv): Likewise.
4982 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4983 (check_mem_write): Likewise.
4984 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4985 Likewise.
4986 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4987 (registers_from_string, register_data): Likewise.
4988 * server.c (handle_query, main): Likewise.
4989 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4990 (decode_M_packet): Likewise.
4991 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4992 * target.h (struct target_ops): Update read_memory, write_memory,
4993 and read_auxv.
4994 (read_inferior_memory, write_inferior_memory): Update.
4995 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4996 to unsigned char *.
4997 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4998 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4999 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5000 linux-s390-low.c, linux-sh-low.c: Update for changes in
5001 read_inferior_memory and the_low_target->breakpoint.
5002
eee84df1
DJ
50032005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5004
5005 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5006 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5007 * configure.srv: Add powerpc64-*-linux*.
5008 * linux-ppc64-low.c: New file.
5009
45b134e5
OF
50102005-05-23 Orjan Friberg <orjanf@axis.com>
5011
5012 * linux-cris-low.c: New file with support for CRIS.
5013 * linux-crisv32-low.c: Ditto for CRISv32.
5014 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5015 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 5016 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
5017 reg-crisv32.o, and reg-crisv32.c to make rules.
5018 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5019 recognized targets.
5020
48d93c75
UW
50212005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5022
5023 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5024 of sizeof (PTRACE_XFER_TYPE).
5025 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5026
e013ee27
OF
50272005-05-12 Orjan Friberg <orjanf@axis.com>
5028
889bf7c5 5029 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
5030 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5031 pointers for hardware watchpoint support.
5032 * linux-low.h (struct linux_target_ops): Ditto.
5033 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5034 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5035 to linux_target_ops.
5036 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5037 reply packet.
5038 * server.c (main): Recognize 'Z' and 'z' packets.
5039
b0ded00b
UW
50402005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5041
5042 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5043 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5044 (the_low_target): Add new members.
5045
8643e2ad
DJ
50462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5047
5048 * proc-service.c (ps_lgetregs): Search all_processes instead of
5049 all_threads.
5050
fc620387
DJ
50512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5052
5053 * server.c (start_inferior): Change return type to int.
5054 (attach_inferior): Change sigptr to int *.
5055 (handle_v_cont, handle_v_requests): Change signal to int *.
5056 (main): Change signal to int.
5057
50582005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
5059
5060 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5061 * configure.srv: Add m32r*-*-linux*.
5062 * linux-m32r-low.c: New file.
5063
e0e76420
DJ
50642005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5065
5066 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5067
a1928bad
DJ
50682005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5069
5070 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5071 Take unsigned long arguments for PIDs.
5072 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5073 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5074 (wait_for_sigstop, linux_resume_one_process)
5075 (regsets_fetch_inferior_registers, linux_send_signal)
5076 (linux_read_auxv): Likewise. Update the types of variables holding
5077 PIDs. Update format string specifiers.
5078 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5079 * remote-utils.c (prepare_resume_reply): Likewise.
5080 * server.c (cont_thread, general_thread, step_thread)
5081 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5082 unsigned long.
5083 (handle_query): Update format specifiers.
5084 (handle_v_cont, main): Use strtoul for thread IDs.
5085 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5086 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5087 (general_thread, step_thread, thread_from_wait)
5088 (old_thread_from_wait): Update.
5089 * target.h (struct thread_resume): Use unsigned long for THREAD.
5090 (struct target_ops): Use unsigned long for arguments to attach and
5091 thread_alive.
5092
dcdb98d2
DJ
50932005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5094
5095 * acinclude.m4: Include bfd/bfd.m4 directly.
5096 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5097 <agriffis@toolchain.org>.
5098 * aclocal.m4, configure: Regenerated.
5099
bec39cab
AC
51002005-01-07 Andrew Cagney <cagney@gnu.org>
5101
5102 * configure.ac: Rename configure.in, require autoconf 2.59.
5103 * configure: Re-generate.
5104
434c4c77
DJ
51052004-12-08 Daniel Jacobowitz <dan@debian.org>
5106
5107 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5108 LIBS when finished.
5109 * aclocal.m4: Regenerated.
5110 * configure: Regenerated.
5111
db1d3e1b
AS
51122004-11-21 Andreas Schwab <schwab@suse.de>
5113
5114 * linux-m68k-low.c (m68k_num_gregs): Define.
5115 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5116 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5117 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5118 (m68k_breakpoint_at): New. Add to the_low_target.
5119
5120 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5121 srv_linux_thread_db to yes.
5122
43360365
JB
51232004-10-20 Joel Brobecker <brobecker@gnat.com>
5124
5125 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5126 (ARCH_SET_FS): Likewise.
5127 (ARCH_GET_FS): Likewise.
5128 (ARCH_GET_GS): Likewise.
5129
fd500816
DJ
51302004-10-16 Daniel Jacobowitz <dan@debian.org>
5131
5132 * linux-i386-low.c (ps_get_thread_area): New.
5133 * linux-x86-64-low.c (ps_get_thread_area): New.
5134 * linux-low.c: Include <sys/syscall.h>.
5135 (linux_kill_one_process): Don't kill the first thread here.
5136 (linux_kill): Kill the first thread here.
5137 (kill_lwp): New function.
5138 (send_sigstop, linux_send_signal): Use it.
5139 * proc-service.c: Clean up #ifdefs.
5140 (fpregset_info): Delete.
5141 (ps_lgetregs): Update and enable implementation.
5142 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5143 implementations.
5144 * remote-utils.c (struct sym_cache, symbol_cache): New.
5145 (input_interrupt): Print a clearer message.
5146 (async_io_enabled): New variable.
5147 (enable_async_io, disable_async_io): Use it. Update comments.
5148 (look_up_one_symbol): Use the symbol cache.
5149 * thread-db.c (thread_db_look_up_symbols): New function.
5150 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5151
f6de3c42
DJ
51522004-10-16 Daniel Jacobowitz <dan@debian.org>
5153
5154 * configure.in: Test for -rdynamic.
5155 * configure: Regenerated.
5156 * Makefile (INTERNAL_LDFLAGS): New.
5157 (gdbserver, gdbreplay): Use it.
5158
2c0fc042
AC
51592004-09-02 Andrew Cagney <cagney@gnu.org>
5160
5161 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5162
075b3282
DJ
51632004-03-23 Daniel Jacobowitz <drow@mvista.com>
5164
5165 * linux-low.c (linux_wait): Clear all_processes list also.
5166
fa6a77dc
DJ
51672004-03-12 Daniel Jacobowitz <drow@mvista.com>
5168
5169 * linux-low.c: Include <errno.h>. Remove extern declaration of
5170 errno.
5171
6d782a97
DJ
51722004-03-12 Daniel Jacobowitz <drow@mvista.com>
5173
5174 * gdbreplay.c, server.h, utils.c: Update copyright years.
5175
3a7fb99b
DJ
51762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5177
5178 * server.c (main): Print child status or termination signal from
5179 variable 'signal', not 'sig'.
5180
c3e735a6
DJ
51812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5182
5183 * linux-low.c (linux_read_memory): Change return type to
5184 int. Check for and return error from ptrace().
5185 * target.c (read_inferior_memory): Change return type to int. Pass
5186 back return status from the_target->read_memory().
5187 * target.h (struct target_ops): Adapt *read_memory() prototype.
5188 Update comment.
5189 (read_inferior_memory): Adapt prototype.
5190 * server.c (main): Return an error packet if
5191 read_inferior_memory() returns an error.
5192
a59d1c82
DJ
51932004-03-04 Daniel Jacobowitz <drow@mvista.com>
5194
5195 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5196 Unify with other clean targets.
5197
dc3f8883
DJ
51982004-02-29 Daniel Jacobowitz <drow@mvista.com>
5199
5200 * server.c (handle_v_cont): Call set_desired_inferior.
5201
89a208da
DJ
52022004-02-29 Daniel Jacobowitz <drow@mvista.com>
5203
5204 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5205
62ea82f5
DJ
52062004-02-29 Daniel Jacobowitz <drow@mvista.com>
5207
5208 * linux-low.c (linux_wait): Unblock async I/O.
5209 (linux_resume): Block and enable async I/O.
5210 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5211 * server.h (block_async_io, unblock_async_io): Add prototypes.
5212
6910d122
DJ
52132004-02-29 Daniel Jacobowitz <drow@mvista.com>
5214
5215 * remote-utils.c (remote_open): Print a status notice after
5216 opening a TCP port.
5217 * server.c (attach_inferior): Print a status notice after
5218 attaching.
5219
52202004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
5221
5222 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5223
c89dc5d4
DJ
52242004-02-26 Daniel Jacobowitz <drow@mvista.com>
5225
5226 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5227 error packet.
5228 * server.c, target.h: Update copyright years.
5229
4b8dad4a
RM
52302004-02-25 Roland McGrath <roland@redhat.com>
5231
5232 * target.h (struct target_ops): New member `read_auxv'.
5233 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5234 * linux-low.c (linux_read_auxv): New function.
5235 (linux_target_ops): Initialize `read_auxv' member to that.
5236
d7446758
JB
52372004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5238
5239 Committed by Jim Blandy <jimb@redhat.com>.
5240
5241 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 5242 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
5243 instead of GPR_SIZE to distiguish s390 and s390x targets.
5244
5544ad89
DJ
52452004-01-31 Daniel Jacobowitz <drow@mvista.com>
5246
5247 * linux-low.c: Update copyright year.
5248 (check_removed_breakpoint): Clear pending_is_breakpoint.
5249 (linux_set_resume_request, linux_queue_one_thread)
5250 (resume_status_pending_p): New functions.
5251 (linux_continue_one_thread): Use process->resume.
5252 (linux_resume): Only resume threads if there are no pending events.
5253 * linux-low.h (struct process_info): Add resume request
5254 pointer.
5255
2a68b70e
DJ
52562004-01-30 Daniel Jacobowitz <drow@mvista.com>
5257
5258 * regcache.c (new_register_cache): Clear the allocated register
5259 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5260
64386c31
DJ
52612003-10-13 Daniel Jacobowitz <drow@mvista.com>
5262
5263 * linux-low.c (linux_resume): Take a struct thread_resume *
5264 argument.
5265 (linux_wait): Update call.
5266 (resume_ptr): New static variable.
5267 (linux_continue_one_thread): Renamed from
5268 linux_continue_one_process. Use resume_ptr.
5269 (linux_resume): Use linux_continue_one_thread.
5270 * server.c (handle_v_cont, handle_v_requests): New functions.
5271 (myresume): New function.
5272 (main): Handle 'v' case.
5273 * target.h (struct thread_resume): New type.
5274 (struct target_ops): Change argument of "resume" to struct
5275 thread_resume *.
5276 (myresume): Delete macro.
5277
c938e9b0
L
52782003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5279
5280 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5281 (uninstall): Support DESTDIR.
5282
7f313d07
BC
5283Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5284
5285 * configure.srv: Add xscale*linux copy of arm*linux entry.
5286
3b2fc2ea
DJ
52872003-07-24 Daniel Jacobowitz <drow@mvista.com>
5288
5289 * linux-arm-low.c (arm_reinsert_addr): New function.
5290 (the_low_target): Add arm_reinsert_addr.
5291
1c0a559e
MK
52922003-07-08 Mark Kettenis <kettenis@gnu.org>
5293
5294 * mem-break.c: Remove whitespace at end of file.
5295
43d5792c
DJ
52962003-06-28 Daniel Jacobowitz <drow@mvista.com>
5297
5298 * configure.in: Check whether we need to prototype strerror.
5299 * server.h: Optionally prototype strerror.
5300 * gdbreplay.c (perror_with_name): Use strerror.
5301 * linux-low.c (linux_attach_lwp): Use strerror.
5302 * utils.c (perror_with_name): Use strerror.
5303 * config.in, configure: Regenerated.
5304
c8a86edf
DJ
53052003-06-28 Daniel Jacobowitz <drow@mvista.com>
5306
5307 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5308 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5309
73d37363
DJ
53102003-06-20 Daniel Jacobowitz <drow@mvista.com>
5311
5312 * Makefile.in (SFILES): Update.
5313 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5314 low-sun3.c: Remove files.
5315
6ad8ae5c
DJ
53162003-06-17 Daniel Jacobowitz <drow@mvista.com>
5317
5318 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5319 (linux_detach_one_process, linux_detach): New functions.
5320 (linux_target_ops): Add linux_detach.
5321 * server.c (main): Handle 'D' packet.
5322 * target.h (struct target_ops): Add "detach" member.
5323 (detach_inferior): Define.
5324
1581182a
MK
53252003-06-13 Mark Kettenis <kettenis@gnu.org>
5326
5327 From Kelley Cook <kelleycook@wideopenwest.com>:
5328 * configure.srv: Accept i[34567]86 variants.
5329
e5379b03
DJ
53302003-06-05 Daniel Jacobowitz <drow@mvista.com>
5331
5332 * linux-low.c (linux_wait_for_event): Correct comment typos.
5333 (linux_resume_one_process): Call check_removed_breakpoint.
5334 (linux_send_signal): New function.
5335 (linux_target_ops): Add linux_send_signal.
5336 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5337 of kill.
5338 * target.h (struct target_ops): Add send_signal.
5339
2ff29de4
JB
53402003-05-29 Jim Blandy <jimb@redhat.com>
5341
5342 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5343 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5344 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5345 away part of the register's value.
5346
254787d4
DJ
53472003-03-26 Daniel Jacobowitz <drow@mvista.com>
5348
5349 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5350 (linux_wait_for_event, linux_init_signals): Likewise.
5351
94e10508
DJ
53522003-03-17 Daniel Jacobowitz <drow@mvista.com>
5353
5354 * configure.in: Check for stdlib.h.
5355 * configure: Regenerated.
5356 * config.in: Regenerated.
5357
4c0711e0
DJ
53582003-01-04 Andreas Schwab <schwab@suse.de>
5359
5360 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5361
ef66e766
AC
53622003-01-02 Andrew Cagney <ac131313@redhat.com>
5363
5364 * Makefile.in: Remove obsolete code.
5365
a1358604
DJ
53662002-11-20 Daniel Jacobowitz <drow@mvista.com>
5367
5368 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5369 defined(PT_FPR0_HI).
5370
23ce3b1c
DJ
53712002-11-17 Stuart Hughes <seh@zee2.com>
5372
5373 * linux-arm-low.c (arm_num_regs): Increase.
5374 (arm_regmap): Include status register.
5375
53762002-11-17 Daniel Jacobowitz <drow@mvista.com>
5377
5378 * linux-low.c (register_addr): Remove incorrect -1 check.
5379
a9fa9f7d
DJ
53802002-08-29 Daniel Jacobowitz <drow@mvista.com>
5381
5382 * linux-low.c (linux_create_inferior): Call setpgid. Return
5383 the new PID.
5384 (unstopped_p, linux_signal_pid): Remove.
5385 (linux_target_ops): Remove linux_signal_pid.
5386 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5387 global instead of target method.
5388 * target.h (struct target_ops): Remove signal_pid. Update comment
5389 for create_inferior.
5390 * server.c (signal_pid): New variable.
5391 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 5392 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
5393 (attach_inferior): Set signal_pid.
5394
17574093
DJ
53952002-08-23 Daniel Jacobowitz <drow@mvista.com>
5396
5397 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5398
53992002-08-20 Jim Blandy <jimb@redhat.com>
5400
5401 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5402 default for this.
5403
54042002-08-01 Andrew Cagney <cagney@redhat.com>
5405
5406 * Makefile.in: Make chill references obsolete.
5407
54082002-07-24 Kevin Buettner <kevinb@redhat.com>
5409
5410 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5411 * configure: Regenerate.
5412 * config.in: Regenerate.
5413
54142002-07-09 David O'Brien <obrien@FreeBSD.org>
5415
5416 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5417 (perror_with_name, remote_close, remote_open, expect, play): Static.
5418
54192002-07-04 Michal Ludvig <mludvig@suse.cz>
5420
4b8dad4a 5421 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
5422 byte offsets instead of an array of indexes.
5423 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5424
54252002-06-13 Daniel Jacobowitz <drow@mvista.com>
5426
5427 * regcache.c: Add comment.
5428
54292002-06-11 Daniel Jacobowitz <drow@mvista.com>
5430
5431 * thread-db.c: New file.
5432 * proc-service.c: New file.
5433 * acinclude.m4: New file.
5434 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5435 proc-service.o, and thread-db.o.
5436 (linux-low.o): Add USE_THREAD_DB.
5437 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5438 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5439 * aclocal.m4: Regenerated.
5440 * config.in: Regenerated.
5441 * configure: Regenerated.
5442 * configure.in: Check for proc_service.h, sys/procfs.h,
5443 thread_db.h, and linux/elf.h headrs.
5444 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5445 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5446 Check for -lthread_db and thread support.
5447 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5448 PowerPC, and SuperH.
5449 * i387-fp.c: Constify arguments.
5450 * i387-fp.h: Likewise.
5451 * inferiors.c: (struct thread_info): Renamed from
5452 `struct inferior_info'. Remove PID member. Use generic inferior
5453 list header. All uses updated.
5454 (inferiors, signal_pid): Removed.
5455 (all_threads): New variable.
5456 (get_thread): Define.
5457 (add_inferior_to_list): New function.
5458 (for_each_inferior): New function.
5459 (change_inferior_id): New function.
5460 (add_inferior): Removed.
5461 (remove_inferior): New function.
5462 (add_thread): New function.
5463 (free_one_thread): New function.
5464 (remove_thread): New function.
5465 (clear_inferiors): Use for_each_inferior and free_one_thread.
5466 (find_inferior): New function.
5467 (find_inferior_id): New function.
5468 (inferior_target_data): Update argument type.
5469 (set_inferior_target_data): Likewise.
5470 (inferior_regcache_data): Likewise.
5471 (set_inferior_regcache_data): Likewise.
5472 * linux-low.c (linux_bp_reinsert): Remove.
5473 (all_processes, stopping_threads, using_thrads)
5474 (struct pending_signals, debug_threads, pid_of): New.
5475 (inferior_pid): Replace with macro.
5476 (struct inferior_linux_data): Remove.
5477 (get_stop_pc, add_process): New functions.
5478 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5479 Use add_process and add_thread.
5480 (linux_attach_lwp): New function, based on old linux_attach. Use
5481 add_process and add_thread. Set stop_expected for new threads.
5482 (linux_attach): New function.
5483 (linux_kill_one_process): New function.
5484 (linux_kill): Kill all LWPs.
5485 (linux_thread_alive): Use find_inferior_id.
5486 (check_removed_breakpoints, status_pending_p): New functions.
5487 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5488 Update. Use WNOHANG. Wait for cloned processes also. Update process
5489 struct for the found process.
5490 (linux_wait_for_event): New function.
5491 (linux_wait): Use it. Support LWPs.
5492 (send_sigstop, wait_for_sigstop, stop_all_processes)
5493 (linux_resume_one_process, linux_continue_one_process): New functions.
5494 (linux_resume): Support LWPs.
5495 (REGISTER_RAW_SIZE): Remove.
5496 (fetch_register): Use register_size instead. Call supply_register.
5497 (usr_store_inferior_registers): Likewise. Call collect_register.
5498 Fix recursive case.
5499 (regsets_fetch_inferior_registers): Improve error message.
5500 (regsets_store_inferior_registers): Add debugging.
5501 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5502 (unstopped_p, linux_signal_pid): New functions.
5503 (linux_target_ops): Add linux_signal_pid.
5504 (linux_init_signals): New function.
5505 (initialize_low): Call it. Initialize using_threads.
5506 * regcache.c (inferior_regcache_data): Add valid
5507 flag.
5508 (get_regcache): Fetch registers lazily. Add fetch argument
5509 and update all callers.
5510 (regcache_invalidate_one, regcache_invalidate): New
5511 functions.
5512 (new_register_cache): Renamed from create_register_cache.
5513 Return the new regcache.
5514 (free_register_cache): Change argument to a void *.
5515 (registers_to_string, registers_from_string): Call get_regcache
5516 with fetch flag set.
5517 (register_data): Make static. Pass fetch flag to get_regcache.
5518 (supply_register): Call get_regcache with fetch flag clear.
5519 (collect_register): Call get_regcache with fetch flag set.
5520 (collect_register_as_string): New function.
5521 * regcache.h: Update.
5522 * remote-utils.c (putpkt): Flush after debug output and use
5523 stderr.
5524 Handle input interrupts while waiting for an ACK.
5525 (input_interrupt): Use signal_pid method.
5526 (getpkt): Flush after debug output and use stderr.
5527 (outreg): Use collect_register_as_string.
5528 (new_thread_notify, dead_thread_notify): New functions.
5529 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5530 and general_thread.
5531 (look_up_one_symbol): Flush after debug output.
5532 * server.c (step_thread, server_waiting): New variables.
5533 (start_inferior): Don't use signal_pid. Update call to mywait.
5534 (attach_inferior): Update call to mywait.
5535 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5536 (main): Don't fetch/store registers explicitly. Use
5537 set_desired_inferior. Support proposed ``Hs'' packet. Update
5538 calls to mywait.
5539 * server.h: Update.
5540 (struct inferior_list, struct_inferior_list_entry): New.
5541 * target.c (set_desired_inferior): New.
5542 (write_inferior_memory): Constify.
5543 (mywait): New function.
5544 * target.h: Update.
5545 (struct target_ops): New signal_pid method.
5546 (mywait): Removed macro, added prototype.
5547
5548 * linux-low.h (regset_func): Removed.
5549 (regset_fill_func, regset_store_func): New.
5550 (enum regset_type): New.
5551 (struct regset_info): Add type field. Use new operation types.
5552 (struct linux_target_ops): stop_pc renamed to get_pc.
5553 Add decr_pc_after_break and breakpoint_at.
5554 (get_process, get_thread_proess, get_process_thread)
5555 (strut process_info, all_processes, linux_attach_lwp)
5556 (thread_db_init): New.
5557
5558 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5559 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5560 (the_low_target): Add new members.
5561 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5562 (i386_store_fpxregset): Constify.
5563 (target_regsets): Add new kind identifier.
5564 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5565 (i386_set_pc): Add debugging.
5566 (i386_breakpoint_at): New function.
5567 (the_low_target): Add new members.
5568 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5569 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5570 (mips_breakpoint_at): New.
5571 (the_low_target): Add new members.
5572 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5573 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5574 (the_low_target): Add new members.
5575 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5576 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5577 (the_low_target): Add new members.
5578 * linux-x86-64-low.c (target_regsets): Add new kind
5579 identifier.
5580
55812002-05-15 Daniel Jacobowitz <drow@mvista.com>
5582
5583 From Martin Pool <mbp@samba.org>:
5584 * server.c (gdbserver_usage): New function.
5585 (main): Call it.
5586
55872002-05-14 Daniel Jacobowitz <drow@mvista.com>
5588
5589 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5590 stop_at -> stop_pc.
5591
55922002-05-04 Andrew Cagney <ac131313@redhat.com>
5593
5594 * Makefile.in: Remove obsolete code.
5595
55962002-04-24 Michal Ludvig <mludvig@suse.cz>
5597
5598 * linux-low.c (regsets_fetch_inferior_registers),
5599 (regsets_store_inferior_registers): Removed cast to int from
5600 ptrace() calls.
5601 * regcache.h: Added declaration of struct inferior_info.
5602
56032002-04-20 Daniel Jacobowitz <drow@mvista.com>
5604
5605 * inferiors.c (struct inferior_info): Add regcache_data.
5606 (add_inferior): Call create_register_cache.
5607 (clear_inferiors): Call free_register_cache.
5608 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5609 * regcache.c (struct inferior_regcache_data): New.
5610 (registers): Remove.
5611 (get_regcache): New function.
5612 (create_register_cache, free_register_cache): New functions.
5613 (set_register_cache): Don't initialize the register cache here.
5614 (registers_to_string, registers_from_string, register_data): Call
5615 get_regcache.
5616 * regcache.h: Add prototypes.
5617 * server.h: Likewise.
5618
56192002-04-20 Daniel Jacobowitz <drow@mvista.com>
5620
5621 * mem-break.c: New file.
5622 * mem-break.h: New file.
5623 * Makefile.in: Add mem-break.o rule; update server.h
5624 dependencies.
5625 * inferiors.c (struct inferior_info): Add target_data
5626 member.
5627 (clear_inferiors): Free target_data member if set.
5628 (inferior_target_data, set_inferior_target_data): New functions.
5629 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5630 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5631 * linux-low.c (linux_bp_reinsert): New variable.
5632 (struct inferior_linux_data): New.
5633 (linux_create_inferior): Use set_inferior_target_data.
5634 (linux_attach): Likewise. Call add_inferior.
5635 (linux_wait_for_one_inferior): New function.
5636 (linux_wait): Call it.
5637 (linux_write_memory): Add const.
5638 (initialize_low): Call set_breakpoint_data.
5639 * linux-low.h (struct linux_target_ops): Add breakpoint
5640 handling members.
5641 * server.c (attach_inferior): Remove extra add_inferior
5642 call.
5643 * server.h: Include mem-break.h. Update inferior.c
5644 prototypes.
5645 * target.c (read_inferior_memory)
5646 (write_inferior_memory): New functions.
5647 * target.h (read_inferior_memory)
5648 (write_inferior_memory): Change macros to prototypes.
5649 (struct target_ops): Update comments. Add const to write_memory
5650 definition.
5651
56522002-04-11 Daniel Jacobowitz <drow@mvista.com>
5653
5654 * linux-low.c (usr_store_inferior_registers): Support
5655 registers which are allowed to fail to store.
5656 * linux-low.h (linux_target_ops): Likewise.
5657 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5658 (ppc_cannot_store_register): FPSCR may not be storable.
5659
56602002-04-09 Daniel Jacobowitz <drow@mvista.com>
5661
5662 * server.h: Include <string.h> if HAVE_STRING_H.
5663 * ChangeLog: Correct paths in last ChangeLog entry.
5664
56652002-04-09 Daniel Jacobowitz <drow@mvista.com>
5666
5667 * linux-low.h: Remove obsolete prototypes.
5668 (struct linux_target_ops): New.
5669 (extern the_low_target): New.
5670 * linux-low.c (num_regs, regmap): Remove declarations.
5671 (register_addr): Use the_low_target explicitly.
5672 (fetch_register): Likewise.
5673 (usr_fetch_inferior_registers): Likewise.
5674 (usr_store_inferior_registers): Likewise.
5675 * linux-arm-low.c (num_regs): Remove.
5676 (arm_num_regs): Define.
5677 (arm_regmap): Renamed from regmap, made static.
5678 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5679 made static.
5680 (arm_cannot_store_register): Renamed from cannot_store_register,
5681 made static.
5682 (the_low_target): New.
5683 * linux-i386-low.c (num_regs): Remove.
5684 (i386_num_regs): Define.
5685 (i386_regmap): Renamed from regmap, made static.
5686 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5687 made static.
5688 (i386_cannot_store_register): Renamed from cannot_store_register,
5689 made static.
5690 (the_low_target): New.
5691 * linux-ia64-low.c (num_regs): Remove.
5692 (ia64_num_regs): Define.
5693 (ia64_regmap): Renamed from regmap, made static.
5694 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5695 made static.
5696 (ia64_cannot_store_register): Renamed from cannot_store_register,
5697 made static.
5698 (the_low_target): New.
5699 * linux-m68k-low.c (num_regs): Remove.
5700 (m68k_num_regs): Define.
5701 (m68k_regmap): Renamed from regmap, made static.
5702 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5703 made static.
5704 (m68k_cannot_store_register): Renamed from cannot_store_register,
5705 made static.
5706 (the_low_target): New.
5707 * linux-mips-low.c (num_regs): Remove.
5708 (mips_num_regs): Define.
5709 (mips_regmap): Renamed from regmap, made static.
5710 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5711 made static.
5712 (mips_cannot_store_register): Renamed from cannot_store_register,
5713 made static.
5714 (the_low_target): New.
5715 * linux-ppc-low.c (num_regs): Remove.
5716 (ppc_num_regs): Define.
5717 (ppc_regmap): Renamed from regmap, made static.
5718 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5719 made static.
5720 (ppc_cannot_store_register): Renamed from cannot_store_register,
5721 made static.
5722 (the_low_target): New.
5723 * linux-s390-low.c (num_regs): Remove.
5724 (s390_num_regs): Define.
5725 (s390_regmap): Renamed from regmap, made static.
5726 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5727 made static.
5728 (s390_cannot_store_register): Renamed from cannot_store_register,
5729 made static.
5730 (the_low_target): New.
5731 * linux-sh-low.c (num_regs): Remove.
5732 (sh_num_regs): Define.
5733 (sh_regmap): Renamed from regmap, made static.
5734 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5735 made static.
5736 (sh_cannot_store_register): Renamed from cannot_store_register,
5737 made static.
5738 (the_low_target): New.
5739 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5740 (the_low_target): New.
5741
57422002-04-09 Daniel Jacobowitz <drow@mvista.com>
5743
5744 * Makefile.in: Add stamp-h target.
5745 * configure.in: Create stamp-h.
5746 * configure: Regenerated.
5747
57482002-04-09 Daniel Jacobowitz <drow@mvista.com>
5749
5750 * inferiors.c: New file.
5751 * target.c: New file.
5752 * target.h: New file.
5753 * Makefile.in: Add target.o and inferiors.o. Update
5754 dependencies.
5755 * linux-low.c (inferior_pid): New static variable,
5756 moved from server.c.
5757 (linux_create_inferior): Renamed from create_inferior.
5758 Call add_inferior. Return 0 on success instead of a PID.
5759 (linux_attach): Renamed from myattach.
5760 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5761 (linux_thread_alive): Renamed from mythread_alive.
5762 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5763 child dies.
5764 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5765 (regsets_store_inferior_registers): Correct error message.
5766 Add missing ``return 0''.
5767 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5768 (linux_store_registers): Renamed from store_inferior_registers.
5769 (linux_read_memory): Renamed from read_inferior_memory.
5770 (linux_write_memory): Renamed from write_inferior_memory.
5771 (linux_target_ops): New structure.
5772 (initialize_low): Call set_target_ops ().
5773 * remote-utils.c (unhexify): New function.
5774 (hexify): New function.
5775 (input_interrupt): Send signals to ``signal_pid''.
5776 * server.c (inferior_pid): Remove.
5777 (start_inferior): Update create_inferior call.
5778 (attach_inferior): Call add_inferior.
5779 (handle_query): New function.
5780 (main): Call handle_query for `q' packets.
5781 * server.h: Include "target.h". Remove obsolete prototypes.
5782 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5783
57842002-04-09 Daniel Jacobowitz <drow@mvista.com>
5785
5786 * Makefile.in: Add WARN_CFLAGS. Update configury
5787 dependencies.
5788 * configure.in: Check for <string.h>
5789 * configure: Regenerate.
5790 * config.in: Regenerate.
5791 * gdbreplay.c: Include needed system headers.
5792 (remote_open): Remove strchr prototype.
5793 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5794 * regcache.c (supply_register): Change buf argument to const void *.
5795 (supply_register_by_name): Likewise.
5796 (collect_register): Change buf argument to void *.
5797 (collect_register_by_name): Likewise.
5798 * regcache.h: Add missing prototypes.
5799 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5800 * server.c (handle_query): New function.
5801 (attached): New static variable, moved out of main.
5802 (main): Quiet longjmp clobber warnings.
5803 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5804 * utils.c (error): Remove NORETURN.
5805 (fatal): Likewise.