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