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