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