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