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