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