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