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