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