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