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