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