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