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