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