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