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