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