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