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